[mythtv] SEGV attempting to use ThreadedFileWriter after deletion.

Stuart Auchterlonie stuarta at squashedfrog.net
Wed Sep 28 10:07:29 UTC 2005


Looks like an attempt to use ThreadedFileWrite after it's been
deleted. This is on the backend after doing the following

1. Watch live tv.
2. Change channel.
3. Exit live tv.
4. Enter live tv. (BANG!!!)

Here's the backtrace (single thread only).
(Backtrace with all threads available on request)


Stuart


-----
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1400898640 (LWP 13368)]
0xb7922773 in ThreadedFileWriter::Sync (this=0x0) at
ThreadedFileWriter.cpp:194
194         if (fd >= 0)
(gdb) bt full
#0  0xb7922773 in ThreadedFileWriter::Sync (this=0x0) at
ThreadedFileWriter.cpp:194
No locals.
#1  0xb791cd2e in RingBuffer::Sync (this=0x8138778) at
RingBuffer.cpp:1413
No locals.
#2  0xb7ba55a8 in DummyDTVRecorder::ProcessData (this=0x813b620,
buffer=0xadeac008 "G@", len=12220) at dummydtvrecorder.cpp:241
        bpf = 600000
        desired_packets = 398
        pkt = (const TSPacket *) 0xadeaec18
        cnt = 39
        pos = 11280
#3  0xb7ba4769 in DummyDTVRecorder::StartRecording (this=0x813b620) at
dummydtvrecorder.cpp:132
        len = 12220
        remainder = 0
#4  0xb7ba56c0 in DummyDTVRecorder::RecordingThread (param=0x813b620) at
dummydtvrecorder.cpp:262
        rec = (DummyDTVRecorder *) 0x813b620
#5  0xb65dcccd in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#6  0xb6484b0e in clone () from /lib/tls/libc.so.6
No symbol table info available.
(gdb)

--------------

Last bit of logfile with verbose siparser,channel,record

2005-09-28 10:57:34.118 Getting next free recorder after : -1
2005-09-28 10:57:34.190 Card 1 is local.
2005-09-28 10:57:34.294 MainServer::HandleAnnounce Playback
2005-09-28 10:57:34.294 adding: ganymede as a client (events: 0)
[New Thread -1357526096 (LWP 13365)]
[New Thread -1332155472 (LWP 13366)]
2005-09-28 10:57:34.374 MainServer::HandleAnnounce Playback
2005-09-28 10:57:34.374 adding: ganymede as a client (events: 0)
2005-09-28 10:57:34.384 adding: ganymede as a remote ringbuffer
2005-09-28 10:57:34.414 TVRec(1): ClearFlags(EITScannerRunning,) ->
RunMainLoop,AskAllowRecording,SIParserRunning,
2005-09-28 10:57:34.422 TVRec(1): Changing from None to WatchingLiveTV
2005-09-28 10:57:34.422 TVRec(1):
ClearFlags(FrontendReadyCancelNextRecording,) ->
RunMainLoop,AskAllowRecording,SIParserRunning,
2005-09-28 10:57:34.422 TVRec(1): SetFlags(AskAllowRecording,) ->
RunMainLoop,AskAllowRecording,SIParserRunning,
2005-09-28 10:57:34.422 TVRec(1): Request: Program(no) channel() input()
flags(LiveTV,)
2005-09-28 10:57:34.422 SIParser: Stopping DVB Section Reader
2005-09-28 10:57:34.432 SIParser: DVB Section Reader thread stopped
[Thread -1365914704 (LWP 13363) exited]
2005-09-28 10:57:34.498 TVRec(1):
ClearFlags(WaitingForSIParser,SIParserRunning,) ->
RunMainLoop,AskAllowRecording,
2005-09-28 10:57:34.498 TVRec(1):
ClearFlags(WaitingForSignal,SignalMonitorRunning,) ->
RunMainLoop,AskAllowRecording,
2005-09-28 10:57:34.499 DVB#0 Opening DVB channel
2005-09-28 10:57:34.499 DVB#0 Trying to tune to channel 2.
2005-09-28 10:57:34.507 DVB#0 Frequency: 505833330 BW: 8MHz HP: 3/4 LP:
2/3C: QAM-16 TM: 2K H: None GI: 1/32
2005-09-28 10:57:34.507 DVB#0 Old Params: freq(537833330) type(OFDM)
2005-09-28 10:57:34.507 DVB#0 New Params: freq(505833330) type(OFDM)
2005-09-28 10:57:34.507 dvbchannel.cpp:wait_for_backend: Status:
2005-09-28 10:57:34.507 DVB#0 DVBChannel::Tune: Frequency tuning
successful.
2005-09-28 10:57:34.507 DVB#0 Tuned to frequency for channel 2.
2005-09-28 10:57:34.527 TVRec(1): Starting Signal Monitor
2005-09-28 10:57:34.527 TVRec(1): SetSignalMonitoringRate(50, 1)
2005-09-28 10:57:34.527 TVRec(1): SetupSignalMonitor()
2005-09-28 10:57:34.527 DVB#0 Opening DVB channel
2005-09-28 10:57:35.038 DVBSignalMonitor(0)::constructor(1,Warning, can
not count Uncorrected Blocks): Operation not supported
2005-09-28 10:57:35.045 SM(0)::AddFlags: Seen() Match()
Wait(Sig,SNR,BER,)
2005-09-28 10:57:35.045 DVBSM(0)::constructor(): initial flags 0x3400000
2005-09-28 10:57:35.045 TVRec(1): Signal monitor successfully created
2005-09-28 10:57:35.045 TVRec(1): Setting up table monitoring.
2005-09-28 10:57:35.045 TVRec(1): MPEG program number: 4228
2005-09-28 10:57:35.046 DTVSM(0)::SetProgramNumber(4228):
2005-09-28 10:57:35.046 SM(0)::RemoveFlags: Seen(PMT,) Match(PMT,)
Wait()
2005-09-28 10:57:35.047 SM(0)::AddFlags: Seen() Match() Wait(PMT,)
2005-09-28 10:57:35.047 SM(0)::AddFlags: Seen() Match() Wait(PAT,PMT,)
2005-09-28 10:57:35.067 TVRec(1): Successfully set up MPEG table
monitoring.
2005-09-28 10:57:35.068 SM(0)::Start: begin
[New Thread -1365914704 (LWP 13367)]
2005-09-28 10:57:35.116 SM(0)::Start: end
2005-09-28 10:57:35.117 TVRec(1):
SetFlags(WaitingForSignal,SignalMonitorRunning,) ->
RunMainLoop,AskAllowRecording,WaitingForSignal,SignalMonitorRunning,
[New Thread -1400898640 (LWP 13368)]
2005-09-28 10:57:35.143 TVRec(1): SetFlags(DummyRecorderRunning,) ->
RunMainLoop,AskAllowRecording,WaitingForSignal,SignalMonitorRunning,DummyRecorderRunning,
2005-09-28 10:57:35.146 TVRec(1): SetFlags(NeedToStartRecorder,) ->
RunMainLoop,AskAllowRecording,WaitingForSignal,NeedToStartRecorder,SignalMonitorRunning,DummyRecorderRunning,
2005-09-28 10:57:35.182 DummyDTVRecorder::StartRecording -- begin
2005-09-28 10:57:35.228 DVBSM(0)::UpdateValues: Signal Locked
[New Thread -1377125456 (LWP 13369)]
2005-09-28 10:57:35.235 DVBSM(0)::UpdateValues: Waiting for table
monitor to start
2005-09-28 10:57:35.328 DVBSM(0)::UpdateValues: Table monitor started
2005-09-28 10:57:35.336 DTVSM(0)::GetStatusList: WaitForPMT seen(0)
matching(0)
2005-09-28 10:57:35.394 DVBSM(0)::RunTableMonitor(): begin (# of pids 2)
2005-09-28 10:57:35.394 DVBSM(0)::AddPIDFilter(0x0):
2005-09-28 10:57:35.395 DVBSM(0)::AddPIDFilter(0x1ffb):




More information about the mythtv-dev mailing list