Bugs item #1601295, was opened at 2006-11-22 19:13
Message generated for change (Settings changed) made by duncanwebb
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1601295&group_id=46652

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: plugins
Group: 1.6.0
>Status: Pending
Resolution: Accepted
Priority: 5
Private: No
Submitted By: Frank Naude (naudefj)
Assigned to: Nobody/Anonymous (nobody)
Summary: 100% CPU when browsing headlines

Initial Comment:
Python is using 100% CPU when I browse through some headlines.

# ps -fp 12429
UID        PID  PPID  C STIME TTY          TIME CMD
naudefj  12429     1 83 20:04 pts/2    00:07:26 python 
/usr/lib/python2.4/site-packages/freevo/main.py

# strace -p 12429
futex(0x820dc28, FUTEX_WAKE, 1)         = 0
futex(0x820dc28, FUTEX_WAKE, 1)         = 0
futex(0x820dc28, FUTEX_WAKE, 1)         = 0
futex(0x820dc28, FUTEX_WAKE, 1)         = 0
futex(0x820dc28, FUTEX_WAKE, 1)         = 0
futex(0x820dc28, FUTEX_WAKE, 1)         = 0
...

Not sure what it's waiting for. The only solution is to kill and restart freevo.

----------------------------------------------------------------------

Comment By: Duncan Webb (duncanwebb)
Date: 2006-11-26 10:33

Message:
Logged In: YES 
user_id=104395
Originator: NO

That's a simple patch :-)

Nothing to do with headlines then, but a good spot.

The patch has been applied to rel-1-6 and rel-1.

----------------------------------------------------------------------

Comment By: Frank Naude (naudefj)
Date: 2006-11-26 09:30

Message:
Logged In: YES 
user_id=143611
Originator: YES

I've traced the problem to drawstringframed() in osd.py. The
"num_lines_left" variable becomes negative and the while-loop is never
terminated. Example:

1) A newline is removed and num_lines_left is decremented from 1 to 0.
2) The variable is the decremented to -1 before the next while-loop
iteration.
3) Stuck in while loop as negative values evaluate to TRUE

Attached is a simple patch.

Just in case you are still interested: 

# rpm -q libxml2 python
libxml2-2.6.26-2mdv2007.0
python-2.4.3-3.1mdv2007.0


----------------------------------------------------------------------

Comment By: Duncan Webb (duncanwebb)
Date: 2006-11-25 23:55

Message:
Logged In: YES 
user_id=104395
Originator: NO

Works perfectly for me.

The only thing that I can think that this could be caused by is a bug in
one of the dependencies.

I'm using:
Python-2.4.3
libxml2-2.6.26

There are is no threading in the headlines module, so I guess that the
problem could be with Python. A quick google on futex shows some problems
with 2.4.x that were solved by using 2.3.4.

----------------------------------------------------------------------

Comment By: Frank Naude (naudefj)
Date: 2006-11-25 22:21

Message:
Logged In: YES 
user_id=143611
Originator: YES

Looks like a unicode problem. Here is a simplified test feed that can be
used to simulate the problem:

HEADLINES_LOCATIONS = [("FREEVO BUG", "http://www.orafaq.com/freevo.xml";)]

----------------------------------------------------------------------

Comment By: Duncan Webb (duncanwebb)
Date: 2006-11-22 22:33

Message:
Logged In: YES 
user_id=104395
Originator: NO

Need more information, such as which headlines.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1601295&group_id=46652

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to