[mythtv] [BT] of segfault related to In-progress recording and GetNextFreeRecorder..

Oscar Carlsson oscar.carlsson at home.se
Fri Feb 27 05:39:19 EST 2004


Hello Development,

  at least that's what i think it's about..

  This happens if i'm at card 1 (i've got two cards), watching live tv, bring up
  the  epg  and  start  a recording on something. Strange thing is that it works
  sometimes, and it does seem to work better when run under gdb, took a while to
  get a segfault.

  If  I first switch to card 2, then do the rec from the epg, it doesn't seem to
  happen.  Also,  i  see the getnextfreerecorder return -1, is it supposed to do
  that? (when there's a card left not in use)

  Below is the trace.


mythtv at dragon mythtv $ gdb mythbackend
GNU gdb 6.0
Copyright 2003 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 "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /usr/local/bin/mythbackend
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 2059)]
Starting up as the master server.
[New Thread 32769 (LWP 2068)]
[New Thread 16386 (LWP 2069)]
[New Thread 32771 (LWP 2071)]
[New Thread 49156 (LWP 2072)]
[New Thread 65541 (LWP 2073)]
[New Thread 81926 (LWP 2074)]
2004-02-27 11:29:36 mythbackend version: 0.15.20040225-1 www.mythtv.org
2004-02-27 11:29:36 Enabled verbose msgs : important general
[New Thread 98311 (LWP 2075)]
[New Thread 114696 (LWP 2076)]
[New Thread 131081 (LWP 2077)]
[New Thread 147466 (LWP 2078)]
[New Thread 163851 (LWP 2079)]
2004-02-27 11:29:36 Found changes in the todo list.
2004-02-27 11:29:37 Started recording "Tune in" on channel: 8 on cardid: 1, sourceid 1
[New Thread 180236 (LWP 2080)]
2004-02-27 11:29:37 Changing from None to RecordingOnly
[New Thread 196621 (LWP 2081)]
2004-02-27 11:30:01 MainServer::HandleAnnounce Playback
2004-02-27 11:30:01 adding: dragon as a client (events: 0)
2004-02-27 11:30:01 MainServer::HandleAnnounce Playback
2004-02-27 11:30:01 adding: dragon as a client (events: 1)
2004-02-27 11:30:04 Changing from RecordingOnly to None
[New Thread 213006 (LWP 2092)]
2004-02-27 11:30:04 Found changes in the todo list.
2004-02-27 11:30:06 Getting next free recorder : -1
2004-02-27 11:30:06 MainServer::HandleAnnounce Playback
2004-02-27 11:30:06 adding: dragon as a client (events: 0)
[New Thread 229391 (LWP 2095)]
2004-02-27 11:30:06 MainServer::HandleAnnounce Playback
2004-02-27 11:30:06 adding: dragon as a client (events: 0)
2004-02-27 11:30:06 adding: dragon as a remote ringbuffer
2004-02-27 11:30:08 Changing from None to WatchingLiveTV
[New Thread 245776 (LWP 2096)]
2004-02-27 11:30:22 Found changes in the todo list.
2004-02-27 11:30:23 Changing from WatchingLiveTV to None
2004-02-27 11:30:23 Started recording "Hitparad" on channel: 6 on cardid: 1, sourceid 1
[New Thread 262161 (LWP 2102)]
2004-02-27 11:30:24 Changing from None to RecordingOnly
[New Thread 278546 (LWP 2103)]
2004-02-27 11:30:24 MainServer::HandleAnnounce Playback
2004-02-27 11:30:24 adding: dragon as a client (events: 0)
2004-02-27 11:30:24 MainServer::HandleAnnounce Playback
2004-02-27 11:30:24 adding: dragon as a client (events: 0)
2004-02-27 11:31:17 Getting next free recorder : -1
2004-02-27 11:31:17 MainServer::HandleAnnounce Playback
2004-02-27 11:31:17 adding: dragon as a client (events: 0)
[New Thread 294931 (LWP 2110)]
2004-02-27 11:31:17 MainServer::HandleAnnounce Playback
2004-02-27 11:31:17 adding: dragon as a client (events: 0)
2004-02-27 11:31:17 adding: dragon as a remote ringbuffer
2004-02-27 11:31:19 Changing from None to WatchingLiveTV
[New Thread 311316 (LWP 2111)]
2004-02-27 11:31:24 Changing from WatchingLiveTV to None
2004-02-27 11:31:24 Getting next free recorder : 2
2004-02-27 11:31:24 MainServer::HandleAnnounce Playback
2004-02-27 11:31:24 adding: dragon as a client (events: 0)
[New Thread 327701 (LWP 2116)]
2004-02-27 11:31:24 MainServer::HandleAnnounce Playback
2004-02-27 11:31:24 adding: dragon as a client (events: 0)
2004-02-27 11:31:24 adding: dragon as a remote ringbuffer
2004-02-27 11:31:26 Changing from None to WatchingLiveTV
[New Thread 344086 (LWP 2117)]
2004-02-27 11:31:32 Changing from WatchingLiveTV to None
2004-02-27 11:31:37 Changing from RecordingOnly to None
2004-02-27 11:31:37 Found changes in the todo list.
[New Thread 360471 (LWP 2122)]
2004-02-27 11:31:39 Getting next free recorder : -1
2004-02-27 11:31:39 MainServer::HandleAnnounce Playback
2004-02-27 11:31:39 adding: dragon as a client (events: 0)
[New Thread 376856 (LWP 2125)]
2004-02-27 11:31:39 MainServer::HandleAnnounce Playback
2004-02-27 11:31:39 adding: dragon as a client (events: 0)
2004-02-27 11:31:39 adding: dragon as a remote ringbuffer
2004-02-27 11:31:41 Changing from None to WatchingLiveTV
[New Thread 393241 (LWP 2126)]
2004-02-27 11:31:45 Changing from WatchingLiveTV to None
2004-02-27 11:31:46 Getting next free recorder : 1
2004-02-27 11:31:46 MainServer::HandleAnnounce Playback
2004-02-27 11:31:46 adding: dragon as a client (events: 0)
[New Thread 409626 (LWP 2131)]
2004-02-27 11:31:46 MainServer::HandleAnnounce Playback
2004-02-27 11:31:46 adding: dragon as a client (events: 0)
2004-02-27 11:31:46 adding: dragon as a remote ringbuffer
2004-02-27 11:31:48 Changing from None to WatchingLiveTV
[New Thread 426011 (LWP 2132)]
2004-02-27 11:31:58 Found changes in the todo list.
2004-02-27 11:31:58 Started recording "Dr Phil" on channel: 4 on cardid: 1, sourceid 1
[New Thread 442396 (LWP 2138)]
2004-02-27 11:31:58 Changing from None to RecordingOnly
[New Thread 458781 (LWP 2139)]
2004-02-27 11:32:21 Changing from WatchingLiveTV to None
2004-02-27 11:32:25 Changing from RecordingOnly to None
[New Thread 475166 (LWP 2140)]
2004-02-27 11:32:26 Found changes in the todo list.
2004-02-27 11:32:28 Getting next free recorder : -1
2004-02-27 11:32:28 MainServer::HandleAnnounce Playback
2004-02-27 11:32:28 adding: dragon as a client (events: 0)
[New Thread 491551 (LWP 2143)]
2004-02-27 11:32:28 MainServer::HandleAnnounce Playback
2004-02-27 11:32:28 adding: dragon as a client (events: 0)
2004-02-27 11:32:28 adding: dragon as a remote ringbuffer
2004-02-27 11:32:29 Changing from None to WatchingLiveTV
[New Thread 507936 (LWP 2144)]
2004-02-27 11:32:39 Found changes in the todo list.
2004-02-27 11:32:59 Changing from WatchingLiveTV to None

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 147466 (LWP 2078)]
0x0805a7b8 in RingBuffer::GetStopReads() (this=0x0) at RingBuffer.h:50
50      RingBuffer.h: No such file or directory.
        in RingBuffer.h
(gdb) thread apply all bt full

Thread 12 (Thread 163851 (LWP 2079)):
#0  0x410cb724 in __pthread_sigsuspend () from /lib/libpthread.so.0
No symbol table info available.
#1  0x410cb568 in __pthread_wait_for_restart_signal () from /lib/libpthread.so.0
No symbol table info available.
#2  0x410ccd80 in __pthread_alt_lock () from /lib/libpthread.so.0
No symbol table info available.
#3  0x410c9e57 in pthread_mutex_lock () from /lib/libpthread.so.0
No symbol table info available.
#4  0x40ef898c in QRecursiveMutexPrivate::lock() () from /usr/qt/3/lib/libqt-mt.so.3
No symbol table info available.
#5  0x40ef8d94 in QMutex::lock() () from /usr/qt/3/lib/libqt-mt.so.3
No symbol table info available.
#6  0x0808b94f in QMutexLocker (this=0x44e94804, m=0x80d0da8) at qmutex.h:96
No locals.
#7  0x08080d0b in Scheduler::getAllPending(QStringList&) (this=0x80d8330, strList=@0x44e94854)
    at scheduler.cpp:519
        lockit = {mtx = 0x80d0da8}
        now = {d = {jd = 0}, t = {ds = 1091358331}}
        i = {<_List_iterator_base> = {_M_node = 0x410d3d78}, <No data fields>}
#8  0x0806b91e in MainServer::HandleGetPendingRecordings(PlaybackSock*) (this=0x80d8148,
    pbs=0x80db520) at mainserver.cpp:1329
        pbssock = (struct QSocket *) 0x8104a00
        strList = {<QValueList<QString>> = {sh = 0x4730f160}, <No data fields>}
#9  0x080616a9 in MainServer::ProcessRequest(QSocket*) (this=0x80d8148, sock=0x8104a00)
    at mainserver.cpp:266
        listline = {<QValueList<QString>> = {sh = 0x4730f1e0}, <No data fields>}
        line = {static null = {static null = <same as static member of an already seen type>,
    d = 0x80a8aa0, static shared_null = 0x80a8aa0}, d = 0x4730f950,
  static shared_null = 0x80a8aa0}
        tokens = {<QValueList<QString>> = {sh = 0x4730edf0}, <No data fields>}
        command = {static null = {static null = <same as static member of an already seen type>,
    d = 0x80a8aa0, static shared_null = 0x80a8aa0}, d = 0x4730f950,
  static shared_null = 0x80a8aa0}
        pbs = (PlaybackSock *) 0x80db520
#10 0x0807c110 in ProcessRequestThread::run() (this=0x80cfc50) at mainserver.cpp:66
No locals.
#11 0x40c0a60a in QThreadInstance::start(void*) () from /usr/qt/3/lib/libqt-mt.so.3
No symbol table info available.
#12 0x410c8f60 in pthread_start_thread () from /lib/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#13 0x410c9062 in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#14 0x412cd6ba in clone () from /lib/libc.so.6
No symbol table info available.

Thread 11 (Thread 147466 (LWP 2078)):
#0  0x0805a7b8 in RingBuffer::GetStopReads() (this=0x0) at RingBuffer.h:50
No locals.
#1  0x40307ad6 in TVRec::RequestRingBufferBlock(int) (this=0x80d03b8, size=256000)
    at tv_rec.cpp:2014
        buffer = "\000\000\001D\002w\204\001\0013\237\000\000\001\a\200\000\001I\204;\204\025\000\177\001g\000\036\030NL\212!\205A}i\aN\235\207.\211\233\006/\226F\035y\23416G\211g*$\202\f(5\030\024@\eK\214\023q(2\e[BqL\"]|q\224Pd\025\205\035\a\222\222\001\216!\026,\224\203\027\203I\016\235W\\\a'2\230T-p\000\000\001\0272\025<\036Dp\r@쳨m6\032?=\016\"**\2305K"...
        tot = 0
        ret = 0
#2  0x08059e70 in EncoderLink::RequestRingBufferBlock(int) (this=0x80d3578, size=256000)
    at encoderlink.cpp:609
No locals.
#3  0x08070d55 in MainServer::HandleRecorderQuery(QStringList&, QStringList&, PlaybackSock*) (
    this=0x80d8148, slist=@0x44c94a14, commands=@0x44c949f4, pbs=0x4730d4f0)
    at mainserver.cpp:1944
        size = 256000
        ret = 1
        pbssock = (struct QSocket *) 0x8110cf0
        recnum = 1
        iter = {node = 0x80ba060}
        enc = (EncoderLink *) 0x80d3578
        command = {static null = {static null = <same as static member of an already seen type>,
    d = 0x80a8aa0, static shared_null = 0x80a8aa0}, d = 0x80e4680, static shared_null = 0x80a8aa0}
        retlist = {<QValueList<QString>> = {sh = 0x8105338}, <No data fields>}
#4  0x08061a6d in MainServer::ProcessRequest(QSocket*) (this=0x80d8148, sock=0x8110cf0)
    at mainserver.cpp:292
        listline = {<QValueList<QString>> = {sh = 0x8105420}, <No data fields>}
        line = {static null = {static null = <same as static member of an already seen type>,
    d = 0x80a8aa0, static shared_null = 0x80a8aa0}, d = 0x80db0e8, static shared_null = 0x80a8aa0}
        tokens = {<QValueList<QString>> = {sh = 0x811b088}, <No data fields>}
        command = {static null = {static null = <same as static member of an already seen type>,
    d = 0x80a8aa0, static shared_null = 0x80a8aa0}, d = 0x80fc088, static shared_null = 0x80a8aa0}
---Type <return> to continue, or q <return> to quit---
        pbs = (PlaybackSock *) 0x4730d4f0
#5  0x0807c110 in ProcessRequestThread::run() (this=0x80ceb60) at mainserver.cpp:66
No locals.
#6  0x40c0a60a in QThreadInstance::start(void*) () from /usr/qt/3/lib/libqt-mt.so.3
No symbol table info available.
#7  0x410c8f60 in pthread_start_thread () from /lib/libpthread.so.0
No symbol table info available.
#8  0x410c9062 in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
#9  0x412cd6ba in clone () from /lib/libc.so.6
No symbol table info available.

Thread 10 (Thread 131081 (LWP 2077)):
#0  0x410cb724 in __pthread_sigsuspend () from /lib/libpthread.so.0
No symbol table info available.
#1  0x410cb568 in __pthread_wait_for_restart_signal () from /lib/libpthread.so.0
No symbol table info available.
#2  0x410c7f3b in pthread_cond_wait at GLIBC_2.0 () from /lib/libpthread.so.0
No symbol table info available.
#3  0x40ef9dc8 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/qt/3/lib/libqt-mt.so.3
No symbol table info available.
#4  0x080d84bc in ?? ()
No symbol table info available.
#5  0x44a94a1c in ?? ()
No symbol table info available.
#6  0x40ef84d2 in QRealMutexPrivate::lock() () from /usr/qt/3/lib/libqt-mt.so.3
No symbol table info available.
Previous frame inner to this frame (corrupt stack?)
0x0805a7b8      50      in RingBuffer.h
(gdb)


  

/Oscar



More information about the mythtv-dev mailing list