[mythtv] mythbackend crashes with segmentation fault after the specific sequences of events.

Mudit Wahal mwahal at gmail.com
Thu Jun 16 21:27:39 UTC 2005


Hi all,

I'm trying to write some scripts which can change the mode to the
Watch Live TV and change channels up and down. When I run my script
first time, every thing is fine. But when I run it second time, the
mythbackend crashes when I send QUERY_RECORDER 1[]:[]STOP_LIVETV.

My system is Semprom 3000+, HD3000 card. Knoppix Myth R5A15.1 release.

I was running 0.18 release image.

Then I build 0.18.1 released image (not cvs version) so I can run gdb.
I started mythbackend 0.18.1 from gdb and here is what I see in the stack trace.

[New Thread -1349403728 (LWP 7206)]
[Thread -1349403728 (LWP 7206) exited]
[Thread -1341015120 (LWP 7205) exited]
[New Thread -1341015120 (LWP 7209)]
[New Thread -1349403728 (LWP 7210)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1236113824 (LWP 7183)]
0x00000000 in ?? ()
(gdb) where
#0  0x00000000 in ?? ()
#1  0xb6e769e4 in QMutex::lock () from /usr/lib/libqt-mt.so.3
#2  0x080757a7 in MainServer::customEvent (this=0x810ea38, e=0x813a5d8)
    at server.h:22
#3  0xb6bd8dbc in QObject::event () from /usr/lib/libqt-mt.so.3
#4  0xb6b7ebff in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#5  0xb6b7e1fe in QApplication::notify () from /usr/lib/libqt-mt.so.3
#6  0xb6b7f9f6 in QApplication::sendPostedEvents () from /usr/lib/libqt-mt.so.3
#7  0xb6b7f876 in QApplication::sendPostedEvents () from /usr/lib/libqt-mt.so.3
#8  0xb6b2789a in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#9  0xb6b90f58 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#10 0xb6b90e08 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#11 0xb6b7ee51 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#12 0x0806a159 in main (argc=1, argv=0x8114420) at main.cpp:587

========
Here is my debug output from the script.

========= first iteration =============
+++ connect
REQUEST->req: 'MYTH_PROTO_VERSION 15'
REPLY LEN: 13
REPLY: 'ACCEPT[]:[]15'
REQUEST->req: 'ANN Playback mythtvbe 0'
REPLY LEN: 2
REPLY: 'OK'
+++ TL : recorder_get_free_recorder
REQUEST->req: 'GET_NEXT_FREE_RECORDER[]:[]-1'
REPLY LEN: 28
REPLY: '1[]:[]192.168.123.3[]:[]6543'
REQUEST->req: 'MYTH_PROTO_VERSION 15'
REPLY LEN: 13
REPLY: 'ACCEPT[]:[]15'
REQUEST->req: 'ANN Playback mythtvbe 0'
REPLY LEN: 2
REPLY: 'OK'
REQUEST->req: 'QUERY_RECORDER 1[]:[]SETUP_RING_BUFFER[]:[]0'
REPLY LEN: 92
REPLY: 'rbuf://192.168.123.3:6543/cache/cache/ringbuf1.nuv[]:[]2[]:[]-1073741824[]:[]0[]:[]104857600'
+++ TL : recorder_start_stream
REQUEST->req: 'ANN Playback mythtvbe 0'
REPLY LEN: 2
REPLY: 'OK'
REQUEST->req: 'ANN RingBuffer mythtvbe 1'
REPLY LEN: 2
REPLY: 'OK'
REQUEST->req: 'QUERY_RECORDER 1[]:[]SPAWN_LIVETV'
REPLY LEN: 2
REPLY: 'ok'
+++ TL : recorder_get_program_info
REQUEST->req: 'QUERY_RECORDER 1[]:[]GET_PROGRAM_INFO'
REPLY LEN: 436
REPLY: General Hospital[]:[] []:[]Evan threatens to expose Reese's
lies to Sonny; Sonny takes Reese to his house for her safety; Carly
confronts Reese; Courtney receives discouraging news from Dr. Meadows;
Elizabeth makes an offer to Jax; Courtney and Jax get a surprising
offer of help.[]:[]Soap[]:[]2005-06-16T14:00:00[]:[]2005-06-16T15:00:00[]:[]KGODT[]:[]none[]:[]7_1[]:[]1034[]:[]SH001807[]:[]EP0018070648[]:[]
[]:[]0[]:[]2005-06-16[]:[]0
Channel 7_1: General Hospital -- Evan threatens to expose Reese's lies
to Sonny; Sonny takes Reese to his house for her safety; Carly
confronts Reese; Courtney receives discouraging news from Dr. Meadows;
Elizabeth makes an offer to Jax; Courtney and Jax get a surprising
offer of help.
++++ recorder_pause
REQUEST->req: 'QUERY_RECORDER 1[]:[]PAUSE'
REPLY LEN: 2
REPLY: ok
+++++ recorder_change_channel CHANNEL_DIRECTION_UP
REQUEST->req: 'QUERY_RECORDER 1[]:[]CHANGE_CHANNEL[]:[]0'
REPLY LEN: 2
REPLY: ok
++++ recorder_get_program_info
REQUEST->req: 'QUERY_RECORDER 1[]:[]GET_PROGRAM_INFO'
REPLY LEN: 301
REPLY: NYPD 24/7[]:[] []:[]Members of the NYPD, including a beat cop,
a rescue squad, detectives and the police commissioner; narrator
Dennis Franz.[]:[]Reality[]:[]2005-06-16T14:00:00[]:[]2005-06-16T15:00:00[]:[]KGODT2[]:[]none[]:[]7_2[]:[]1041[]:[]SH658051[]:[]SH6580510000[]:[]
[]:[]1[]:[]2004-06-22[]:[]0
++++ recorder_pause
REQUEST->req: 'QUERY_RECORDER 1[]:[]PAUSE'
REPLY LEN: 2 
REPLY: ok
+++++ recorder_set_channel 5_1
REQUEST->req: 'QUERY_RECORDER 1[]:[]SET_CHANNEL[]:[]5_1'
REPLY LEN: 2
REPLY: ok
++++ recorder_get_program_info
REQUEST->req: 'QUERY_RECORDER 1[]:[]GET_PROGRAM_INFO'
REPLY LEN: 249
REPLY: Guiding Light[]:[] []:[]Trials and tribulations of the Bauer,
Lewis and Spaulding
families.[]:[]Soap[]:[]2005-06-16T14:00:00[]:[]2005-06-16T15:00:00[]:[]KPIX
DT[]:[]none[]:[]5_1[]:[]1032[]:[]SH001966[]:[]SH0019660000[]:[]
[]:[]1[]:[]2000-01-01[]:[]0
+++ TL : recorder_end_stream
REQUEST->req: 'QUERY_RECORDER 1[]:[]STOP_LIVETV'
REPLY LEN: 2
REPLY: 'ok'
REQUEST->req: 'QUERY_RECORDER 1[]:[]DONE_RINGBUF'
REPLY LEN: 2
REPLY: 'OK'
REQUEST->req: 'QUERY_IS_ACTIVE_BACKEND[]:[]mythtvbe'
REPLY LEN: 4
REPLY: 'TRUE'

========== second iteration ==========

+++ connect
REQUEST->req: 'MYTH_PROTO_VERSION 15'
REPLY LEN: 13
REPLY: 'ACCEPT[]:[]15'
REQUEST->req: 'ANN Playback mythtvbe 0'
REPLY LEN: 2
REPLY: 'OK'
+++ TL : recorder_get_free_recorder
REQUEST->req: 'GET_NEXT_FREE_RECORDER[]:[]-1'
REPLY LEN: 28
REPLY: '1[]:[]192.168.123.3[]:[]6543'
REQUEST->req: 'MYTH_PROTO_VERSION 15'
REPLY LEN: 13
REPLY: 'ACCEPT[]:[]15'
REQUEST->req: 'ANN Playback mythtvbe 0'
REPLY LEN: 2
REPLY: 'OK'
REQUEST->req: 'QUERY_RECORDER 1[]:[]SETUP_RING_BUFFER[]:[]0'
REPLY LEN: 92
REPLY: 'rbuf://192.168.123.3:6543/cache/cache/ringbuf1.nuv[]:[]2[]:[]-1073741824[]:[]0[]:[]104857600'
+++ TL : recorder_start_stream
REQUEST->req: 'ANN Playback mythtvbe 0'
REPLY LEN: 2
REPLY: 'OK'
REQUEST->req: 'ANN RingBuffer mythtvbe 1'
REPLY LEN: 2
REPLY: 'OK'
REQUEST->req: 'QUERY_RECORDER 1[]:[]SPAWN_LIVETV'
REPLY LEN: 2
REPLY: 'ok'
+++ TL : recorder_get_program_info
REQUEST->req: 'QUERY_RECORDER 1[]:[]GET_PROGRAM_INFO'
REPLY LEN: 249
REPLY: Guiding Light[]:[] []:[]Trials and tribulations of the Bauer,
Lewis and Spaulding
families.[]:[]Soap[]:[]2005-06-16T14:00:00[]:[]2005-06-16T15:00:00[]:[]KPIX
DT[]:[]none[]:[]5_1[]:[]1032[]:[]SH001966[]:[]SH0019660000[]:[]
[]:[]1[]:[]2000-01-01[]:[]0
Channel 5_1: Guiding Light -- Trials and tribulations of the Bauer,
Lewis and Spaulding families.
++++ recorder_pause
REQUEST->req: 'QUERY_RECORDER 1[]:[]PAUSE'
REPLY LEN: 2
REPLY: ok
+++++ recorder_change_channel CHANNEL_DIRECTION_UP
REQUEST->req: 'QUERY_RECORDER 1[]:[]CHANGE_CHANNEL[]:[]0'
REPLY LEN: 2
REPLY: ok
++++ recorder_get_program_info
REQUEST->req: 'QUERY_RECORDER 1[]:[]GET_PROGRAM_INFO'
REPLY LEN: 192
REPLY: Paid Programming[]:[] []:[] []:[]
[]:[]2005-06-16T14:00:00[]:[]2005-06-16T14:30:00[]:[]KKPXDT[]:[]none[]:[]65_1[]:[]1065[]:[]SH000001[]:[]SH0000010000[]:[]
[]:[]0[]:[]2005-06-16T14:00:00[]:[]0
++++ recorder_pause
REQUEST->req: 'QUERY_RECORDER 1[]:[]PAUSE'
REPLY LEN: 2
REPLY: ok
+++++ recorder_set_channel 5_1
REQUEST->req: 'QUERY_RECORDER 1[]:[]SET_CHANNEL[]:[]5_1'
REPLY LEN: 2
REPLY: ok
++++ recorder_get_program_info
REQUEST->req: 'QUERY_RECORDER 1[]:[]GET_PROGRAM_INFO'
REPLY LEN: 249
REPLY: Guiding Light[]:[] []:[]Trials and tribulations of the Bauer,
Lewis and Spaulding
families.[]:[]Soap[]:[]2005-06-16T14:00:00[]:[]2005-06-16T15:00:00[]:[]KPIX
DT[]:[]none[]:[]5_1[]:[]1032[]:[]SH001966[]:[]SH0019660000[]:[]
[]:[]1[]:[]2000-01-01[]:[]0
+++ TL : recorder_end_stream
REQUEST->req: 'QUERY_RECORDER 1[]:[]STOP_LIVETV'
======== thats where the backend crashes =======

Thanks

Mudit


More information about the mythtv-dev mailing list