[mythtv] Segfault when recording hdtv

Steve Bower sbower at cisco.com
Fri Oct 10 18:58:05 EDT 2003


Howdy,

When recording a station with less-than-stellar signal on my pchdtv, I
get a frequent seg fault in the backend.  This is with CVS as of 18:00
EDT yesterday.

Backtrace is below; I've had a hard time trying to figure out the real
cause.  It looks like the destruct function pointer in the AVPacket is
being set to an invalid value, and it's the same value in every crash
(so far).

Setting breakpoints lets me see that it usually has an appropriate value
(pointing to av_destruct_packet), but something is changing it.
Hopefully somebody with more clue can track it down, but I'll keep
looking regardless.

Further debugging hints are welcome as well!

  Thanks,
    Steve.

Program terminated with signal 11, Segmentation fault.
...
#0  0x46b3df2d in ?? ()
(gdb) thr app all bt full

Thread 12 (process 9715):
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x40589cf6 in QEventLoop::enterLoop() ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
No symbol table info available.
#2  0x40589b98 in QEventLoop::exec() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
No symbol table info available.
#3  0x40576151 in QApplication::exec() ()
   from /usr/lib/qt-3.1/lib/libqt-mt.so.3
No symbol table info available.
#4  0x08072b1d in main (argc=5, argv=0xbffff6c4) at main.cpp:447
        a = <incomplete type>
        logfile = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x83fc728, static shared_null = 0x83fc728}, d = 0x84029e0, 
  static shared_null = 0x83fc728}
        verboseString = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x83fc728, static shared_null = 0x83fc728}, d = 0x8402a20, 
  static shared_null = 0x83fc728}
        daemonize = false
        printsched = false
        printexpire = false
        logfd = 3
        pidfs = <incomplete type>
        db = (struct QSqlDatabase *) 0x8408980
        subthread = (struct QSqlDatabase *) 0x8403df0
        expthread = (struct QSqlDatabase *) 0x840a5c0
        transthread = (struct QSqlDatabase *) 0x840a9d8
        msdb = (struct QSqlDatabase *) 0x840a1c0
        port = 6543
        statusport = 6544
        myip = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x83fc728, static shared_null = 0x83fc728}, d = 0x841d5b0, 
  static shared_null = 0x83fc728}
        masterip = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x83fc728, static shared_null = 0x83fc728}, d = 0x841cca8, 
  static shared_null = 0x83fc728}
        ismaster = true
        runsched = true
        expdb = (struct QSqlDatabase *) 0x840a5c0
        trandb = (struct QSqlDatabase *) 0x840a9d8
        nfsfd = 10
#5  0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6
No symbol table info available.

Thread 11 (process 9723):
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x080cc070 in TVRec::RunTV() (this=0x841ccc0) at tv_rec.cpp:835
No locals.
#2  0x080cc00d in TVRec::EventThread(void*) (param=0x841ccc0) at tv_rec.cpp:817
        thetv = (TVRec *) 0x841ccc0
#3  0x409e9332 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.

Thread 10 (process 9724):
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x08092498 in Scheduler::RunScheduler() (this=0x841d200)
    at scheduler.cpp:1299
        prerollseconds = 0
        secsleft = 80273
        resetIter = false
        nexttv = (EncoderLink *) 0x8421a60
        nextRecording = (ProgramInfo *) 0x8447818
        nextrectime = {d = {jd = 2452923}, t = {ds = 79200000}}
        curtime = {d = {jd = 2452922}, t = {ds = 85327764}}
        lastupdate = {d = {jd = 2452922}, t = {ds = 79447934}}
        recordfileprefix = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x83fc728, static shared_null = 0x83fc728}, d = 0x8428738, 
  static shared_null = 0x83fc728}
        recIter = {<_List_iterator_base> = {
    _M_node = 0x8401a60}, <No data fields>}
#2  0x080924e7 in Scheduler::SchedulerThread(void*) (param=0x841d200)
    at scheduler.cpp:1306
        sched = (Scheduler *) 0x841d200
#3  0x409e9332 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.

Thread 9 (process 9725):
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x08069060 in AutoExpire::RunExpirer() (this=0x8424550)
    at autoexpire.cpp:121
        statbuf = {f_type = 61267, f_bsize = 4096, f_blocks = 29542469, 
  f_bfree = 16765287, f_bavail = 15264616, f_files = 15007744, 
  f_ffree = 15007722, f_fsid = {__val = {0, 0}}, f_namelen = 255, f_spare = {
    0, 0, 0, 0, 0, 0}}
        freespace = 58
        minFree = 0
        recordfileprefix = {static null = {
    static null = <same as static member of an already seen type>, 
    d = 0x83fc728, static shared_null = 0x83fc728}, d = 0x84286b0, 
  static shared_null = 0x83fc728}
#2  0x080690e9 in AutoExpire::ExpirerThread(void*) (param=0x8424550)
    at autoexpire.cpp:128
        expirer = (AutoExpire *) 0x8424550
#3  0x409e9332 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.

Thread 8 (process 9726):
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x0809bb73 in Transcoder::TranscodePoll() (this=0x8426628)
    at transcoder.cpp:367
        transData = (TranscodeData *) 0x0
#2  0x0809bc53 in Transcoder::TranscodePollThread(void*) (param=0x8426628)
    at transcoder.cpp:385
        thetv = (Transcoder *) 0x8426628
#3  0x409e9332 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.

Thread 7 (process 9727):
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x0808a9a2 in ProcessRequestThread::run() (this=0x8428498)
    at mainserver.cpp:56
No locals.
#2  0x4056ac78 in QProc::~QProc() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
No symbol table info available.
#3  0x409e9332 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.

Thread 6 (process 9728):
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x0808a9a2 in ProcessRequestThread::run() (this=0x84267b0)
    at mainserver.cpp:56
No locals.
#2  0x4056ac78 in QProc::~QProc() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
No symbol table info available.
#3  0x409e9332 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.

Thread 5 (process 9729):
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x0808a9a2 in ProcessRequestThread::run() (this=0x840b6b8)
    at mainserver.cpp:56
No locals.
#2  0x4056ac78 in QProc::~QProc() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
No symbol table info available.
#3  0x409e9332 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.

Thread 4 (process 9730):
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x0808a9a2 in ProcessRequestThread::run() (this=0x8426730)
    at mainserver.cpp:56
No locals.
#2  0x4056ac78 in QProc::~QProc() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
No symbol table info available.
#3  0x409e9332 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.

Thread 3 (process 9731):
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x0808a9a2 in ProcessRequestThread::run() (this=0x8426be8)
    at mainserver.cpp:56
No locals.
#2  0x4056ac78 in QProc::~QProc() () from /usr/lib/qt-3.1/lib/libqt-mt.so.3
No symbol table info available.
#3  0x409e9332 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.

Thread 2 (process 9755):
#0  0xffffe002 in ?? ()
No symbol table info available.
#1  0x080adb49 in ThreadedFileWriter::DiskLoop() (this=0x8432ca8)
    at RingBuffer.cpp:200
        size = 0
        lastsynctime = {d = {jd = 2452922}, t = {ds = 85326954}}
        curtime = {d = {jd = 2452922}, t = {ds = 85327684}}
#2  0x080ad631 in ThreadedFileWriter::boot_writer(void*) (wotsit=0x8432ca8)
    at RingBuffer.cpp:84
        fw = (ThreadedFileWriter *) 0x8432ca8
#3  0x409e9332 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.

Thread 1 (process 9756):
#0  0x46b3df2d in ?? ()
No symbol table info available.
#1  0x080e19a1 in HDTVRecorder::ProcessData(unsigned char*, int) (
    this=0x8431b90, buffer=0x836f1c0 "T*Çi¶\020Æ·mú", len=255868)
    at hdtvrecorder.cpp:404
        curstream = (AVStream *) 0x84397d0
        pkt = {pts = 3623938989, data = 0x0, size = 0, stream_index = 1, 
  flags = 0, duration = 1084149531, startpos = 22801, destruct = 0x46b3df20, 
  priv = 0x8431b90}
#2  0x080e13b7 in HDTVRecorder::StartRecording() (this=0x8431b90)
    at hdtvrecorder.cpp:201
        buf = (uint8_t *) 0x836f1c0 "T*Çi¶\020Æ·mú"
        end = (
    uint8_t *) 0x836f27c "\226*À¸ÛÈ\235?yR\203[0®\215ä¹K\ekt>\223i2àê\207\017\tdÎ\026ßOÓV\aX\030\201\025»½i±\006·/Ùñù$Xpæí\nyãÖ²dßH§ÀЦÉÕ¸«àÕuPó\233\227\201ØÃ6ùçã#g£\a3ØÔØ\203\030fÞÄF¬ñÌ,cJ\003Ù4·k,RK~\217"
        errors = 0
        i = 10
        len = 184
        data_byte = "GÆÊ\200"
        pids = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        counts = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        insync = 10
        ret = 255868
        buffer = "T*Çi¶\020Æ·mú\000~(«(úÚ\037[ÌÁ\224k}ÝÙóÄ\231\002\024j·Ñ°¾m´$¶ÏWvÚ\203\e£Ó±ï-\e\214à¦ë\203BÛô\210\216ÎtbQíè:B\000È´caö\206ºÜ\201M\227\210Næ\2345\223k\eÔ)\034ùb!Ç5]\025B\0065\"\213\236¬8\210PUa\206÷\212\205\227X\212\2200)²q\v)\227\210PÆm¤-½G\000!\eâ¤\220cN\221\e#°\aÌs\022\036q)\223Lnü\025\0065N\221\222al\020¦M1½.\210\203\031¡Á-¢Æ¢â\006øµ´7I\226*À¸ÛÈ\235?yR\203["...
#3  0x080c561a in SpawnEncode(void*) (param=0x8431b90) at tv_rec.cpp:34
        nvr = (class RecorderBase *) 0x8431b90
#4  0x409e9332 in start_thread () from /lib/tls/libpthread.so.0


More information about the mythtv-dev mailing list