Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 2 years ago

Closed 2 years ago

#10453 closed Bug Report - Hang/Deadlock (Fixed)

hung backend thread after failed recording?

Reported by: brian@… Owned by: danielk
Priority: minor Milestone: 0.25
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I'm running v0.25-beta-99-gff73126. Last night a tuner/recording
failed such that I got two 376 byte recordings from the same multirec
tuner.

The BE log reported:

2012-03-13 21:00:00.988413 E [19135/28408] DVBRead dvbstreamhandler.cpp:215 (RunTS) - DVBSH(/dev/dvb/adapter1/frontend0): Device EOF detected

However still this morning, over 12 hours later the BE still has
the tuner of the failed recordings open and the two video files that
the 376 byte recordings went to open:

mythbacke 19135 mythtv   98u   CHR      212,6      0t0   4963 /dev/dvb/adapter1/frontend0
mythbacke 19135 mythtv   99u  unix 0xc2c81000      0t0 801527 socket
mythbacke 19135 mythtv  101u  unix 0xdfcdc200      0t0 793738 socket
mythbacke 19135 mythtv  119u  unix 0xf15b8600      0t0 801538 socket
mythbacke 19135 mythtv  123u  unix 0xeef09200      0t0 783614 socket
mythbacke 19135 mythtv  130w   REG     252,19      376  11615 /video/mythtv/3129_20120313210000.mpg
mythbacke 19135 mythtv  131r  FIFO        0,8      0t0 792991 pipe
mythbacke 19135 mythtv  132w   REG       8,16      376   1026 /storage1/3153_20120313210000.mpg
mythbacke 19135 mythtv  133r  FIFO        0,8      0t0 792995 pipe

Maybe (probably?) this is a hung thread? Like this one perhaps:

Thread 25 (Thread 0xaeafdb70 (LWP 19159)):
#0  0x004ac422 in __kernel_vsyscall ()
No symbol table info available.
#1  0x02a5c834 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236
No locals.
#2  0x021c03e5 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
No symbol table info available.
#3  0x00b62969 in RecorderBase::StopRecording (this=0x9ca9a038) at recorderbase.cpp:179
        locker = {val = 2628362361}
        __FUNCTION__ = "StopRecording"
#4  0x00b45b88 in TVRec::TeardownRecorder (this=0x8a9e0a0, request_flags=73728) at tv_rec.cpp:1062
        recq = <value optimized out>
#5  0x00b4cb38 in TVRec::TuningShutdowns (this=0x8a9e0a0, request=...) at tv_rec.cpp:3524
        channum = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 8537}, alloc = 0, size = 0, data = 0x23f049e, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 31445}, alloc = 0, size = 0, data = 0x23f04b2, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x23f048c, static codecForCStrings = 0x0}
        inputname = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 8537}, alloc = 0, size = 0, data = 0x23f049e, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 31445}, alloc = 0, size = 0, data = 0x23f04b2, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x23f048c, static codecForCStrings = 0x0}
        newCardID = 0
        __FUNCTION__ = "TuningShutdowns"
#6  0x00b532a4 in TVRec::HandleTuning (this=0x8a9e0a0) at tv_rec.cpp:3379
        request = {flags = 73728, program = 0x0, channel = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 8537}, alloc = 0, size = 0, data = 0x23f049e, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 31445}, alloc = 0, size = 0, data = 0x23f04b2, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x23f048c, static codecForCStrings = 0x0}, input = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 8537}, alloc = 0, size = 0, data = 0x23f049e, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 31445}, alloc = 0, size = 0, data = 0x23f04b2, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x23f048c, static codecForCStrings = 0x0}, majorChan = 0, minorChan = 0, progNum = -1}
        input = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 8537}, alloc = 0, size = 0, data = 0x23f049e, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 31445}, alloc = 0, size = 0, data = 0x23f04b2, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x23f048c, static codecForCStrings = 0x0}
        __FUNCTION__ = "HandleTuning"
        streamData = 0xfffffdfc
#7  0x00b5df13 in TVRec::run (this=0x8a9e0a0) at tv_rec.cpp:1246
        recEnd = {d = {d = 0x9268318}}
        lock = {val = 145350953}
        __FUNCTION__ = "run"
#8  0x01969020 in MThread::run (this=0x8a9e210) at mthread.cpp:307
No locals.
#9  0x01969f42 in MThreadInternal::run (this=0x8aa09f8) at mthread.cpp:77
No locals.
#10 0x021bfda2 in ?? () from /usr/lib/libQtCore.so.4
No symbol table info available.
#11 0x02a57e99 in start_thread (arg=0xaeafdb70) at pthread_create.c:304
        pd = 0xaeafdb70
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {44466164, 0, 4001536, -1364208584, 1633925250, 1949944794}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <value optimized out>
        robust = <value optimized out>
        pagesize_m1 = <value optimized out>
        sp = <value optimized out>
        freesize = <value optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#12 0x024c29ee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
No locals.

Full threaded stacktrace will be attached.

FWIW, this is my BE's state while I am seeing the symptoms in ticket #10451.

Attachments (1)

ThreadStacktrace.txt (66.5 KB) - added by brian@… 2 years ago.
threaded stack trace

Download all attachments as: .zip

Change History (4)

Changed 2 years ago by brian@…

threaded stack trace

comment:1 Changed 2 years ago by danielk

  • Owner set to danielk
  • Status changed from new to accepted

comment:2 Changed 2 years ago by danielk

  • Milestone changed from unknown to 0.25

comment:3 Changed 2 years ago by danielk

  • Resolution set to Fixed
  • Status changed from accepted to closed

commit [79d7af902c7ebcf218f3d4289ee23a196708e981]
Author: Daniel Kristjansson <danielk@…>
Date: Mon Apr 2 17:35:28 2012 -0400

Fixes #10453. Fix deadlock in DVBStreamHandler.


This is the same as the bug recently fixed in CetonStreamHandler?.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.