MP3-plugin problems with slow cpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21 Apr 2005 Stefan Huelswitt <s.huelswitt at gmx.de> wrote:
 >> Markku Tavasti wrote:
 >>
 >> With version 0.9.12 of the plugin I get the following (Intel Celeron
 >> 433Mhz, output via OSS, black background) :
 >> - Only stable when playing streams over network.
 >> - Always crashes (well VDR takes 99% of CPU time) when playing songs
 >> from harddrive which are "new"
 >> (ie. no id3-tag got scanned). The next time the song gets played it
 >> works, besides this :
 >> - Frequent crashes when changing songs from harddrive (again, VDR takes
 >> 99% of CPU time),
 >>
 >> AFAIS, the plugin got some ugly race conditions concering threads.
 >
 >This might be possible, but I don't know how to debug this as
 >nothing of it happens on my machine (playing a lot song from
 >harddisc, right now for 6 hours continiously).
 >
 >My suggestion is that somebody with that problem, please wait
 >until vdr hangs with 100% cpu and then hook gdb to this process
 >to see which thread it is and where it hangs.
 >
 >I'm sorry, but I'm currently rather busy with other stuff, so
 >that I cannot spent time on this myself. I'm be back on this in a
 >week or two...
 >

Hi,

first, my apologies for my really late reply.

Back to the problem above: I did a backtrace with gdb, and it seems the 
plugin itself isn't the problem (my setup?),
read() blocks infinitely trying to read the mp3-file. I don't know why 
and I'm asking for your help/comments.

Oh, here's the backtrace:
(gdb) thread 2
[Switching to thread 2 (Thread -1320977488 (LWP 4039))]#0  0xb7f796a1 in 
__read_nocancel () from /lib/tls/libpthread.so.0
(gdb) bt
#0  0xb7f796a1 in __read_nocancel () from /lib/tls/libpthread.so.0
#1  0xb76cc58c in cStream::Stream (this=0x93610c8, data=@0xb1427618, 
len=@0xb142761c, rest=0x93611d0 "") at stream.c:271
#2  0xb76d30e6 in cScanID3::DoScan (this=0x9361170) at decoder-mp3.c:39
#3  0xb76d1f6e in cMP3Decoder::Start (this=0x935f7a8) at decoder-mp3.c:159
#4  0xb76cae7d in cMP3Player::Action (this=0x9360580) at player-mp3.c:1798
#5  0x080ef2a2 in cThread::StartThread ()
#6  0xb7f74b63 in start_thread () from /lib/tls/libpthread.so.0
#7  0xb7e2918a in clone () from /lib/tls/libc.so.6
(gdb) *sigh*

Today I tried to set O_NONBLOCK to the open()-calls (the code does a 
"do{ r = read(...); }while(r!=-1 && r != EINTR);" at stream.c:271 so 
this works out-of-the-box), then again I tried a select() on the 
filedescriptor before stream.c:271. None of the mentioned worked.

I can comment out the call to doScan() in cMP3Player::Action to avoid 
scanning id3-tags. This makes the plugin work without id3-tags though 
(as one might expect...).

That's all I can think of for now, if you need more information, please 
let me know.

-- 
---
Regards,
Martin Cap


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux