[mythtv] free/malloc seg. fault in mythbackend

Gregorio Gervasio Jr. gtgj at pacbell.net
Mon Apr 14 20:08:37 EDT 2003


        I am getting some backend seg. faults in free and malloc.
They occur usually when changing channels or exiting live TV, although
I've seen a few that occured when the backend was finishing a
recording and starting a new one.  Attached are two backtraces:  the
first for a seg. fault while changing channels through the EPG (using
CVS from about three days ago), the second while exiting live TV
(using CVS a few days older).

        Unfortunately, the failure is pretty random.  It may not
happen for more than a day or it may happen within a few minutes.
I switched to qt-3.1.2 (built from source) from qt-3.0.5 but the
problem remains.

------------------------------------------------------------------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 573476 (LWP 20136)]
0x40b5f00e in _int_malloc () from /lib/libc.so.6
(gdb) bt full
#0  0x40b5f00e in _int_malloc () from /lib/libc.so.6
No symbol table info available.
#1  0x40b5e484 in malloc () from /lib/libc.so.6
No symbol table info available.
#2  0x4065c392 in QGArray::QGArray(int) ()
   from /usr/local/qt3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x405bebbb in QSocket::writeBlock(char const*, unsigned long) ()
   from /usr/local/qt3/lib/libqt-mt.so.3
No symbol table info available.
#4  0x4009d3a2 in WriteBlock(QSocket*, void*, int) (socket=0x82bb640, 
    data=0x86e8f50, len=128000) at util.cpp:119
	temp = 141463376
	size = 128000
	written = 0
#5  0x0809b04b in TVRec::DoReadThread() (this=0x828ee18) at tv_rec.cpp:1712
	ret = 128000
	buffer = 0x86e8f50 "\f½8ç\205\202ó¢»\201c\207Y00T\025±XÒ\215\002ø9\e\202\221xn+\v÷\001\203\024En\037\203\fÂå\032\a\002±r\200Ä\001|d\025\205ò\200\230(\vôkB¡é\006Ag\030@§\032&\006\nB\224\024\024c°\035í\030\002­!Àq\037 \200ù©\213^\026H\e¹YÄ\202\233"
#6  0x0809b0a8 in TVRec::ReadThread(void*) (param=0x828ee18) at tv_rec.cpp:1725
No locals.
#7  0x408dec0e in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
(gdb) thread apply all bt full

Thread 44 (Thread 688171 (LWP 20325)):
#0  0x40b96816 in nanosleep () from /lib/libc.so.6
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.

Thread 41 (Thread 639016 (LWP 20140)):
#0  0x40bc15b1 in select () from /lib/libc.so.6
No symbol table info available.
#1  0x08771b10 in ?? ()
No symbol table info available.
#2  0x080acef6 in NuppelVideoRecorder::VbiThread(void*) (param=0x8771b10)
    at NuppelVideoRecorder.cpp:1493
No locals.
#3  0x408dec0e in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.

Thread 40 (Thread 622631 (LWP 20139)):
#0  0x408e4bbb in read () from /lib/libpthread.so.0
No symbol table info available.
#1  0x00000013 in ?? ()
No symbol table info available.
#2  0x080acee0 in NuppelVideoRecorder::AudioThread(void*) (param=0x8771b10)
    at NuppelVideoRecorder.cpp:1484
No locals.
#3  0x408dec0e in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.

Thread 39 (Thread 606246 (LWP 20138)):
#0  0x40b96816 in nanosleep () from /lib/libc.so.6
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.

Thread 38 (Thread 589861 (LWP 20137)):
#0  0x40bc0d04 in ioctl () from /lib/libc.so.6
No symbol table info available.
#1  0x427ba000 in ?? ()
No symbol table info available.
#2  0x0808f2b7 in SpawnEncode(void*) (param=0xfffffffc) at tv_rec.cpp:31
No locals.
#3  0x408dec0e in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.

Thread 37 (Thread 573476 (LWP 20136)):
#0  0x40b5f00e in _int_malloc () from /lib/libc.so.6
No symbol table info available.
#1  0x40b5e484 in malloc () from /lib/libc.so.6
No symbol table info available.
#2  0x4065c392 in QGArray::QGArray(int) ()
   from /usr/local/qt3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x405bebbb in QSocket::writeBlock(char const*, unsigned long) ()
   from /usr/local/qt3/lib/libqt-mt.so.3
No symbol table info available.
#4  0x4009d3a2 in WriteBlock(QSocket*, void*, int) (socket=0x82bb640, 
    data=0x86e8f50, len=128000) at util.cpp:119
	temp = 141463376
	size = 128000
	written = 0
#5  0x0809b04b in TVRec::DoReadThread() (this=0x828ee18) at tv_rec.cpp:1712
	ret = 128000
	buffer = 0x86e8f50 "\f½8ç\205\202ó¢»\201c\207Y00T\025±XÒ\215\002ø9\e\202\221xn+\v÷\001\203\024En\037\203\fÂå\032\a\002±r\200Ä\001|d\025\205ò\200\230(\vôkB¡é\006Ag\030@§\032&\006\nB\224\024\024c°\035í\030\002­!Àq\037 \200ù©\213^\026H\e¹YÄ\202\233"
#6  0x0809b0a8 in TVRec::ReadThread(void*) (param=0x828ee18) at tv_rec.cpp:1725
No locals.
#7  0x408dec0e in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.

Thread 4 (Thread 32771 (LWP 18991)):
#0  0x40b96816 in nanosleep () from /lib/libc.so.6
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.

Thread 3 (Thread 16386 (LWP 18990)):
#0  0x40b96816 in nanosleep () from /lib/libc.so.6
No symbol table info available.
#1  0x00000034 in ?? ()
No symbol table info available.
#2  0x080944a6 in TVRec::RunTV() (this=0xbf7ffa8c) at tv_rec.cpp:703
No locals.
#3  0x0809444e in TVRec::EventThread(void*) (param=0x828ee18) at tv_rec.cpp:677
No locals.
#4  0x408dec0e in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.

Thread 2 (Thread 32769 (LWP 18989)):
#0  0x40bbfb11 in poll () from /lib/libc.so.6
No symbol table info available.
#1  0x408ddeff in __pthread_manager () from /lib/libpthread.so.0
No symbol table info available.
#2  0x408de96d in __pthread_manager_event () from /lib/libpthread.so.0
No symbol table info available.

Thread 1 (Thread 16384 (LWP 18984)):
#0  0x408e127d in __pthread_sigsuspend () from /lib/libpthread.so.0
No symbol table info available.
#1  0x408e008d in __pthread_wait_for_restart_signal ()
   from /lib/libpthread.so.0
No symbol table info available.
#2  0x408e2c1d in __pthread_alt_lock () from /lib/libpthread.so.0
No symbol table info available.
#3  0x408df1e2 in pthread_mutex_lock () from /lib/libpthread.so.0
No symbol table info available.
#4  0x406462a9 in QRecursiveMutexPrivate::lock() ()
   from /usr/local/qt3/lib/libqt-mt.so.3
No symbol table info available.
#5  0x406466d6 in QMutex::lock() () from /usr/local/qt3/lib/libqt-mt.so.3
No symbol table info available.
#6  0x4038cfac in QApplication::lock() () from /usr/local/qt3/lib/libqt-mt.so.3
No symbol table info available.
#7  0x0809af57 in TVRec::RequestRingBufferBlock(int) (this=0x828ee18, 
    size=128000) at tv_rec.cpp:1690
No locals.
#8  0x0805dee5 in EncoderLink::RequestRingBufferBlock(int) (this=0xfffffffc, 
    size=128000) at encoderlink.cpp:510
No locals.
#9  0x0806a20e in MainServer::HandleRecorderQuery(QStringList&, QStringList&, PlaybackSock*) (this=0x8295980, slist=@0xbfffe180, commands=@0xbfffe160, 
    pbs=0xfffffffc) at mainserver.cpp:1036
	size = -4
	recnum = 1
	iter = {node = 0x82956f0}
	enc = (EncoderLink *) 0x8295980
	command = {static null = Cannot access memory at address 0x0
#0  0x40b5f00e in _int_malloc ()
   from /lib/libc.so.6
------------------------------------------------------------------------

rec Changing from WatchingLiveTV to None

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1900661 (LWP 5581)]
0x40b5f251 in _int_free () from /lib/libc.so.6
(gdb) thread apply all bt full

Thread 121 (Thread 1949816 (LWP 5595)):
#0  0x40b96816 in nanosleep () from /lib/libc.so.6
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.

Thread 118 (Thread 1900661 (LWP 5581)):
#0  0x40b5f251 in _int_free () from /lib/libc.so.6
No symbol table info available.
#1  0x40b5ff70 in free () from /lib/libc.so.6
No symbol table info available.
#2  0x081b3d27 in cc_close (cc=0x8363b38) at cc.c:203
No locals.
#3  0x080ad481 in NuppelVideoRecorder::doVbiThread() (this=0x417bb008)
    at NuppelVideoRecorder.cpp:2074
	vbi = (vbi *) 0x0
	cc = (cc *) 0x8363b38
	vbifd = 21
	subtitle = {row = 15 '\017', rowcount = 0 '\0', resumedirect = 0 '\0', 
  resumetext = 0 '\0', clr = 1 '\001', len = 0 '\0'}
	vbicallbackdata = {nvr = 0x417bb008, teletextpage = {pgno = 0, 
    subno = 0, lang = 0, flags = 0, errors = 0, lines = 0, data = {
      '\0' <repeats 39 times>, '\0' <repeats 39 times>, 
      '\0' <repeats 39 times>, 
      '\0' <repeats 16 times>, "\216Î\234@üÿÿÿ\034ú\037±\004ú\037±ø|±@ \0\0", 
      "\a\0\0\0\0\0\0\0+\0\0\0+\0\0\0\034ú\037±x \235@\004ú\037±\0ú\037±\034ú\037±\0\0\0", 
      "\b\0\0\0üÿÿÿ\001\0\0\0\0\0\0\0}Ò\234@#\0\0\0\202\002\0\0\0ú\037±+\0\0\0\200÷\037±", "ïþûÿ\0\0\0\0\177\003ÿÿ \0ÿÿÿÿÿÿ", '\0' <repeats 19 times>, 
      '\0' <repeats 39 times>, 
      '\0' <repeats 23 times>, "\200ÿ?\0\0\0\0\0\0\0°\002@ \0\0", 
      "\177\003 ", '\0' <repeats 21 times>, "\200\037", '\0' <repeats 13 times>, '\0' <repeats 39 times>, '\0' <repeats 39 times>, 
      '\0' <repeats 15 times>, "\200ÿ?", '\0' <repeats 13 times>, "°\002@\0\0\0\0\0", 'ÿ' <repeats 40 times>, 'ÿ' <repeats 40 times>, 'ÿ' <repeats 40 times>, 
      "ÿÿÿÿÿÿÿÿ", '\0' <repeats 31 times>, '\0' <repeats 39 times>, 
      '\0' <repeats 39 times>, '\0' <repeats 39 times>, 
      '\0' <repeats 39 times>, '\0' <repeats 32 times>, "þÿÿÿ\0\0\0", 
      "\005\207±@4L\235 at 4L\235@´ú\037±\215À\234@\034ú\037± \0\0\0\034ú\037±\0\0\0\0ïþû\177", "þÿÿÿ", '\0' <repeats 35 times>, '\0' <repeats 39 times>}, 
    flof = 0, link = {{pgno = 0, subno = 0}, {pgno = 0, subno = 0}, {pgno = 0, 
        subno = 0}, {pgno = 0, subno = 0}, {pgno = 0, subno = 0}, {pgno = 0, 
        subno = 0}}}, foundteletextpage = false}
#4  0x080ac272 in NuppelVideoRecorder::VbiThread(void*) (param=0x417bb008)
    at NuppelVideoRecorder.cpp:1493
No locals.
#5  0x409cac0e in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.

Thread 117 (Thread 1884276 (LWP 5580)):
#0  0x409d0bbb in read () from /lib/libpthread.so.0
No symbol table info available.
#1  0x00000014 in ?? ()
No symbol table info available.
#2  0x080ac25c in NuppelVideoRecorder::AudioThread(void*) (param=0x417bb008)
    at NuppelVideoRecorder.cpp:1484
No locals.
#3  0x409cac0e in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.

Thread 116 (Thread 1867891 (LWP 5579)):
#0  dct_quantize_MMX2 (s=0x42ee0110, block=0x42eea9f8, n=5, qscale=2, 
    overflow=0xb15e5e14) at i386/mpegvideo_mmx_template.c:39
#1  0x080f76e9 in encode_mb (s=0x42ee0110, motion_x=0, motion_y=0)
    at mpegvideo.c:2616
#2  0x080f9920 in encode_picture (s=0x42ee0110, picture_number=1871)
    at mpegvideo.c:2785
#3  0x080f5e8f in MPV_encode_picture (avctx=0x4352e890, buf=0x82beb20 "", 
    buf_size=460800, data=0x418cf1c0) at mpegvideo.c:1314
	s = (struct MpegEncContext *) 0x42ee0110
	i = 1122894096
#4  0x080f2bcc in avcodec_encode_video (avctx=0x4352e890, buf=0x82beb20 "", 
    buf_size=460800, pict=0x418cf1c0) at utils.c:313
	ret = 1122937336
#5  0x080ae4c0 in NuppelVideoRecorder::WriteVideo(Frame_*) (this=0x417bb008, 
    frame=0xb15ffa8c) at NuppelVideoRecorder.cpp:2717
#6  0x080ad77a in NuppelVideoRecorder::doWriteThread() (this=0x417bb008)
    at NuppelVideoRecorder.cpp:2201
#7  0x080ac246 in NuppelVideoRecorder::WriteThread(void*) (param=0x417bb008)
    at NuppelVideoRecorder.cpp:1475
#8  0x409cac0e in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.
Current language:  auto; currently c

Thread 115 (Thread 1851506 (LWP 5578)):
#0  0x409cd27d in __pthread_sigsuspend () from /lib/libpthread.so.0
No symbol table info available.
#1  0x409cc08d in __pthread_wait_for_restart_signal ()
   from /lib/libpthread.so.0
No symbol table info available.
#2  0x409c94b6 in pthread_join () from /lib/libpthread.so.0
No symbol table info available.
#3  0x080ab85d in NuppelVideoRecorder::KillChildren() (this=0x417bb008)
    at NuppelVideoRecorder.cpp:1141
No locals.
#4  0x080ab37f in NuppelVideoRecorder::StartRecording() (this=0x417bb008)
    at NuppelVideoRecorder.cpp:943
	vc = {name = "BT878(Hauppauge (bt878))\0\t²÷\0\0\0", type = 235, 
  channels = 4, audios = 1, maxwidth = 768, maxheight = 480, minwidth = 48, 
  minheight = 32}
	mm = {frame = 1, height = 480, width = 640, format = 15}
	vm = {size = 8519680, frames = 4, offsets = {0, 2129920, 4259840, 
    6389760, 0 <repeats 28 times>}}
	vchan = {channel = 0, name = "Television", '\0' <repeats 21 times>, 
  tuners = 1, flags = 3, type = 1, norm = 1}
	va = {audio = 0, volume = 65535, bass = 32768, treble = 32768, 
  flags = 30, name = "TV", '\0' <repeats 13 times>, mode = 7, balance = 32768, 
  step = 0}
	vt = {tuner = 0, name = '\0' <repeats 31 times>, rangelow = 0, 
  rangehigh = 0, flags = 0, mode = 0, signal = 0}
	frame = 1
	buf = (unsigned char *) 0x43600000 <Address 0x43600000 out of bounds>
#5  0x0808f26b in SpawnEncode(void*) (param=0xfffffffc) at tv_rec.cpp:30
No locals.
#6  0x409cac0e in pthread_start_thread_event () from /lib/libpthread.so.0
No symbol table info available.

Thread 114 (Thread 1835121 (LWP 5577)):
#0  0x40b96816 in nanosleep () from /lib/libc.so.6
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.

Thread 4 (Thread 32771 (LWP 1195)):
#0  0x40b96816 in nanosleep () from /lib/libc.so.6
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.

Thread 3 (Thread 16386 (LWP 1194)):
#0  0x409cd27d in __pthread_sigsuspend () from /lib/libpthread.so.0
No symbol table info available.
#1  0x409cc08d in __pthread_wait_for_restart_signal ()
   from /lib/libpthread.so.0
No symbol table info available.
#2  0x409c94b6 in pthread_join () from /lib/libpthread.so.0
No symbol table info available.
#3  0x080932f0 in TVRec::TeardownRecorder(bool) (this=0x828d720, killFile=true)
    at tv_rec.cpp:540
	message = {static null = Cannot access memory at address 0x0
#0  0x40b5f251 in _int_free ()
   from /lib/libc.so.6
(gdb) info thr
  121 Thread 1949816 (LWP 5595)  0x40b96816 in nanosleep () from /lib/libc.so.6
* 118 Thread 1900661 (LWP 5581)  0x40b5f251 in _int_free () from /lib/libc.so.6
  117 Thread 1884276 (LWP 5580)  0x409d0bbb in read ()
   from /lib/libpthread.so.0
  116 Thread 1867891 (LWP 5579)  dct_quantize_MMX2 (s=0x42ee0110, 
    block=0x42eea9f8, n=5, qscale=2, overflow=0xb15e5e14)
    at i386/mpegvideo_mmx_template.c:39
  115 Thread 1851506 (LWP 5578)  0x409cd27d in __pthread_sigsuspend ()
   from /lib/libpthread.so.0
  114 Thread 1835121 (LWP 5577)  0x40b96816 in nanosleep () from /lib/libc.so.6
  4 Thread 32771 (LWP 1195)  0x40b96816 in nanosleep () from /lib/libc.so.6
  3 Thread 16386 (LWP 1194)  0x409cd27d in __pthread_sigsuspend ()
   from /lib/libpthread.so.0
  2 Thread 32769 (LWP 1193)  0x40bbfb11 in poll () from /lib/libc.so.6
  1 Thread 16384 (LWP 1188)  0x40b96816 in nanosleep () from /lib/libc.so.6
(gdb) up
#1  0x40b5ff70 in free () from /lib/libc.so.6
(gdb) up
#2  0x081b3d27 in cc_close (cc=0x8363b38) at cc.c:203
(gdb) p cc
$1 = (struct cc *) 0x8363b38
(gdb) up
#3  0x080ad481 in NuppelVideoRecorder::doVbiThread() (this=0x417bb008)
    at NuppelVideoRecorder.cpp:2074
Current language:  auto; currently c++
(gdb) p cc
$2 = (cc *) 0x8363b38
(gdb) p *cc
$3 = {fd = 21, 
  buffer = "44543222433456765653324653444444544543422443454422444555643554433445654545655443433554323566776643555544532334433445665543423443422554455532455543543445543443344543445554653455543432354432455654433444"..., lastcode = 32896, 
  ccmode = 0, ccbuf = {"[ CHEERS AND APPLAUSE ]", '\0' <repeats 232 times>, 
    ":200712][AE8A] <http://www.kidswb.com>[n: ][e:20010712][AE8A] <hp://www.kidswb.com>[n: ][e:2001071[AE8A] <http://www.kidswb.com>[n:[e:20010712][AE8A] <http://www.kidswb.com>[n: ][e:20010712][AE8A] <ht"...}}

-- 
Gregorio Gervasio, Jr.
gtgj at pacbell.net



More information about the mythtv-dev mailing list