Mailing List archive

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

[vdr] Re: Driver or VDR Problem setting and jusageing cutmarks on Nexus 2.1



On Sun, Jun 06, 2004 at 03:37:14PM +0200, Ludwig Nussel wrote:
> Ludwig Nussel wrote:
> 
> No clue how to properly debug this with gdb, here is a try. vdr
> doesn't respond to keypresses in this state:

Be sure that _all_ object files are compiled with `-fPIC' and
`-D_REENTRANT' , the best would be if  the CFLAGS would include

          -fPIC -pthread

... the last option should include `-D_REENTRANT' (hopefully
all distribution now include this switch in the gcc specs
file).  Remember the CFLAGS in the Makefiles of the subdirectories.

> 
> [0] root@defiant:/var/tmp/build-root.compiler.9.1-i386/usr/src/packages/BUILD/vdr-1.2.6 # gdb /var/tmp/build-root.compiler.9.1-i386/usr/src/packages/BUILD/vdr-1.2.6/vdr `pidof vdr`
> GNU gdb 6.1
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i586-suse-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
> 
> Attaching to program: /var/tmp/build-root.compiler.9.1-i386/usr/src/packages/BUILD/vdr-1.2.6/vdr, process 8483
> Reading symbols from /lib/libcap.so.1...done.
> Loaded symbols for /lib/libcap.so.1
> Reading symbols from /usr/lib/libjpeg.so.62...done.
> Loaded symbols for /usr/lib/libjpeg.so.62
> Reading symbols from /lib/tls/libpthread.so.0...done.
> [Thread debugging using libthread_db enabled]
> [New Thread 1076287616 (LWP 8483)]
> [New Thread 1085340592 (LWP 8494)]
> [New Thread 1083239344 (LWP 8493)]
> [New Thread 1080683440 (LWP 8486)]
> [New Thread 1078582192 (LWP 8485)]
> Loaded symbols for /lib/tls/libpthread.so.0
> Reading symbols from /lib/libdl.so.2...done.
> Loaded symbols for /lib/libdl.so.2
> Reading symbols from /usr/lib/libstdc++.so.5...done.
> Loaded symbols for /usr/lib/libstdc++.so.5
> Reading symbols from /lib/tls/libm.so.6...done.
> Loaded symbols for /lib/tls/libm.so.6
> Reading symbols from /lib/libgcc_s.so.1...done.
> Loaded symbols for /lib/libgcc_s.so.1
> Reading symbols from /lib/tls/libc.so.6...done.
> Loaded symbols for /lib/tls/libc.so.6
> Reading symbols from /lib/ld-linux.so.2...done.
> Loaded symbols for /lib/ld-linux.so.2
> Reading symbols from /lib/libnss_compat.so.2...done.
> Loaded symbols for /lib/libnss_compat.so.2
> Reading symbols from /lib/libnsl.so.1...done.
> Loaded symbols for /lib/libnsl.so.1
> Reading symbols from /lib/libnss_nis.so.2...done.
> Loaded symbols for /lib/libnss_nis.so.2
> Reading symbols from /lib/libnss_files.so.2...done.
> Loaded symbols for /lib/libnss_files.so.2
> 0xffffe410 in ?? ()
> (gdb) bt
> #0  0xffffe410 in ?? ()
> #1  0xbfffef18 in ?? ()
> #2  0x00000002 in ?? ()
> #3  0x00000000 in ?? ()
> #4  0x40067bfe in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0
> #5  0x40064c00 in _L_mutex_lock_33 () from /lib/tls/libpthread.so.0
> #6  0x00000000 in ?? ()
> #7  0xffffffff in ?? ()
> #8  0x08123228 in __JCR_LIST__ ()
> #9  0x08160adc in ?? ()
> #10 0x00000270 in ?? ()
> #11 0xbfffef38 in ?? ()
> #12 0x080c8ff2 in cMutex::Lock (this=0x40067bfe) at thread.c:101
> Previous frame identical to this frame (corrupt stack?)
> (gdb) thread 1
> [Switching to thread 1 (Thread 1076287616 (LWP 8483))]#0  0xffffe410 in ?? ()
> (gdb) bt
> #0  0xffffe410 in ?? ()
> #1  0xbfffef18 in ?? ()
> #2  0x00000002 in ?? ()
> #3  0x00000000 in ?? ()
> #4  0x40067bfe in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0
> #5  0x40064c00 in _L_mutex_lock_33 () from /lib/tls/libpthread.so.0
> #6  0x00000000 in ?? ()
> #7  0xffffffff in ?? ()
> #8  0x08123228 in __JCR_LIST__ ()
> #9  0x08160adc in ?? ()
> #10 0x00000270 in ?? ()
> #11 0xbfffef38 in ?? ()
> #12 0x080c8ff2 in cMutex::Lock (this=0x40067bfe) at thread.c:101
> Previous frame identical to this frame (corrupt stack?)
> (gdb) thread 2
> [Switching to thread 2 (Thread 1085340592 (LWP 8494))]#0  0xffffe410 in ?? ()
> (gdb) bt
> #0  0xffffe410 in ?? ()
> #1  0x40b0f968 in ?? ()
> #2  0x00000389 in ?? ()
> #3  0x00000000 in ?? ()
> #4  0x400658e0 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
> #5  0x080c9543 in cCondVar::TimedWait (this=0xfffffffc, Mutex=@0x8163b4c, TimeoutMs=1000) at thread.c:65
> #6  0x08086bcd in cNonBlockingFileReader::Action (this=0x8163b08) at dvbplayer.c:166
> #7  0x080c8cd1 in cThread::StartThread (Thread=0x8163b08) at thread.c:178
> #8  0x400639dd in start_thread () from /lib/tls/libpthread.so.0
> #9  0x4020fffa in clone () from /lib/tls/libc.so.6
> (gdb) thread 3
> [Switching to thread 3 (Thread 1083239344 (LWP 8493))]#0  0xffffe410 in ?? ()
> (gdb) bt
> #0  0xffffe410 in ?? ()
> #1  0x4090e868 in ?? ()
> #2  0x00000064 in ?? ()
> #3  0x00000001 in ?? ()
> #4  0x40206dc4 in poll () from /lib/tls/libc.so.6
> #5  0x080cc803 in cPoller::Poll (this=0x1, TimeoutMs=-4) at tools.c:530
> #6  0x0807f34a in cDvbDevice::Poll (this=0x8160ad0, Poller=@0x4090e930, TimeoutMs=-4) at dvbdevice.c:1222
> #7  0x08087fa9 in cDvbPlayer::Action (this=0x81636e0) at dvbplayer.c:538
> #8  0x080c8cd1 in cThread::StartThread (Thread=0x81636ec) at thread.c:178
> #9  0x400639dd in start_thread () from /lib/tls/libpthread.so.0
> #10 0x4020fffa in clone () from /lib/tls/libc.so.6
> (gdb) thread 4
> [Switching to thread 4 (Thread 1080683440 (LWP 8486))]#0  0xffffe410 in ?? ()
> (gdb) bt
> #0  0xffffe410 in ?? ()
> #1  0x4069e8c8 in ?? ()
> #2  0x00000064 in ?? ()
> #3  0x00000001 in ?? ()
> #4  0x40206dc4 in poll () from /lib/tls/libc.so.6
> #5  0x080cc803 in cPoller::Poll (this=0x1, TimeoutMs=-4) at tools.c:530
> #6  0x080bf6e6 in cKbdRemote::Action (this=0x8163658) at remote.c:252
> #7  0x080c8cd1 in cThread::StartThread (Thread=0x8163668) at thread.c:178
> #8  0x400639dd in start_thread () from /lib/tls/libpthread.so.0
> #9  0x4020fffa in clone () from /lib/tls/libc.so.6
> (gdb) thread 5
> [Switching to thread 5 (Thread 1078582192 (LWP 8485))]#0  0xffffe410 in ?? ()
> (gdb) bt
> #0  0xffffe410 in ?? ()
> #1  0x4049c908 in ?? ()
> #2  0x00000267 in ?? ()
> #3  0x00000000 in ?? ()
> #4  0x400658e0 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
> #5  0x080c9543 in cCondVar::TimedWait (this=0xfffffffc, Mutex=@0x8160a2c, TimeoutMs=1000) at thread.c:65
> #6  0x08083662 in cDvbTuner::Action (this=0x8160910) at dvbdevice.c:287
> #7  0x080c8cd1 in cThread::StartThread (Thread=0x8160910) at thread.c:178
> #8  0x400639dd in start_thread () from /lib/tls/libpthread.so.0
> #9  0x4020fffa in clone () from /lib/tls/libc.so.6
> (gdb) thread 6
> Thread ID 6 not known.
> (gdb) 
> 
> Debug printf's showed me:
> 
> cDvbTuner thread started (pid=8483, tid=1078582192)
> cKbdRemote thread started (pid=8483, tid=1080683440)
> entering main loop with tid 1076287616
> cDvbPlayer thread started (pid=8483, tid=1083239344)
> cNonBlockingFileReader thread started (pid=8483, tid=1085340592)
> 
> An external sent SIGTERM arrives at 1076287616, SIGIO at 1078582192,
> SIGPIPE at 1076287616. All three trigger the signal handler but vdr
> keeps unresponsive. SIGALRM terminated vdr.
> 
> I'm going to make a patch of the modifications. I lost track what I
> modified at some point so it's a mess atm.

Guess: The thread polling in pthread_cond_wait() or
pthread_cond_timedwait() won't be woken by
pthread_cond_broadcast() ??
On the other hand other threads are hanging within poll()
... maybe we should unblock SIGIO for all threads and main
VDR program.  And the rest are hanging within locks  which
seems never be freed by the holder of the lock.

          Werner

-- 
AC3 loop through sound card http://bitstreamout.sourceforge.net/
Howto http://www.vdr-portal.de/board/thread.php?threadid=1958
------------------------------------------------------------------
 "Having a smoking section in a restaurant is like having
         a  peeing section in a swimming pool." -- Edward Burr




Home | Main Index | Thread Index