[mythtv-users] MySQL related BE deadlocks - collective wisdom needed

Brian J. Murrell brian at interlinx.bc.ca
Mon Aug 8 22:04:35 UTC 2011


On 11-07-29 04:58 AM, warpme wrote:
> 
> First impression after switching: features stability is not worse than 0.24, but I still had deadlocks (less frequent but still present).

Yeah, only a day after upgrading to master I have a deadlocked (i.e.
doesn't respond to client connection requests) BE again.  The infamous
mysqlclient_r library is implicated, again:

Thread 22 (Thread 0xb2fbdb70 (LWP 2283)):
#0  0x008fa416 in __kernel_vsyscall ()
No symbol table info available.
#1  0x0065652b in read () at ../sysdeps/unix/syscall-template.S:82
No locals.
#2  0x0284dbf8 in vio_read () from /usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#3  0x0284dc56 in vio_read_buff () from /usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#4  0x0284ecfb in ?? () from /usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#5  0x0284f86a in my_net_read () from /usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#6  0x02847d3f in cli_safe_read () from /usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#7  0x0284bdf2 in cli_advanced_command () from
/usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#8  0x028186bb in ?? () from /usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#9  0x09399141 in QMYSQLResult::exec (this=0xa22dc228) at
../../../sql/drivers/mysql/qsql_mysql.cpp:937
        timeVector = {{d = 0x66ec4b4, p = 0x66ec4b4}}
        stringVector = {{d = 0x66ec4b4, p = 0x66ec4b4}}
        nullVector = {{d = 0x66ec4b4, p = 0x66ec4b4}}
        values = {{d = 0xa214c480, p = 0xa214c480}}
        r = 0
#10 0x00789752 in QSqlQuery::exec (this=0xb2fbcf08) at
kernel/qsqlquery.cpp:943
No locals.
#11 0x00374bf5 in MSqlQuery::exec (this=0xb2fbcf08) at mythdbcon.cpp:621
        __FUNCTION__ = "exec"
        result = 6
#12 0x00ff5c3c in CardUtil::GetInputInfo (input=..., groupids=0x0) at
cardutil.cpp:1047
        query = {<QSqlQuery> = {d = 0xa1e11948}, m_db = 0x9bf6b28,
m_isConnected = true, m_returnConnection = true, m_last_prepared_query =
{static null = {<No data fields>}, static shared_null = {ref = {_q_value
= 5721}, alloc = 0, size = 0, data = 0x66ec49e, clean = 0, simpletext =
0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array =
{0}}, static shared_empty = {ref = {_q_value = 11962}, alloc = 0, size =
0, data = 0x66ec4b2, clean = 0, simpletext = 0, righttoleft = 0,
asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d =
0xa20435c0, static codecForCStrings = 0x0}}
#13 0x013bf48b in TVRec::IsBusy (this=0x990b510, busy_input=0xb2fbcf9c,
time_buffer=5) at tv_rec.cpp:2421
        list = {<QList<QString>> = {{p = {static shared_null = {ref =
{_q_value = 4268}, alloc = 0, begin = 0, end = 0, sharable = 1, array =
{0x0}}, d = 0xa1e29730}, d = 0xa1e29730}}, <No data fields>}
        dummy = {<InputInfo> = {_vptr.InputInfo = 0x16fc828, name =
{static null = {<No data fields>}, static shared_null = {ref = {_q_value
= 5721}, alloc = 0, size = 0, data = 0x66ec49e, clean = 0, simpletext =
0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array =
{0}}, static shared_empty = {ref = {_q_value = 11962}, alloc = 0, size =
0, data = 0x66ec4b2, clean = 0, simpletext = 0, righttoleft = 0,
asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d =
0xa2121478, static codecForCStrings = 0x0}, sourceid = 0, inputid = 19,
cardid = 0, mplexid = 0}, chanid = 0}
        chanid = 4111
        pendinfo = {info = 0x0, recordingStart = {d = {d = 0xa2050328}},
hasLaterShowing = false, canceled = false, ask = false, doNotAsk =
false, possibleConflicts = {<std::_Vector_base<unsigned int,
std::allocator<unsigned int> >> = {_M_impl = {<std::allocator<unsigned
int>> = {<__gnu_cxx::new_allocator<unsigned int>> = {<No data fields>},
<No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage =
0x0}}, <No data fields>}}
        has_pending = false
#14 0x080812b0 in EncoderLink::IsBusy (this=0x98cdce0, busy_input=0x0,
time_buffer=5) at encoderlink.cpp:132
No locals.
#15 0x080f2263 in Scheduler::HandleIdleShutdown (this=0x98e6fd0,
blockShutdown=@0xb2fbd2ed, idleSince=..., prerollseconds=0,
idleTimeoutSecs=300, idleWaitForRecordingTime=5,
statuschanged=@0xb2fbd2ec) at scheduler.cpp:2543
        curtime = {d = {d = 0xa91151c8}}
        recording = false
        it = {i = 0x9934940}
        __FUNCTION__ = "HandleIdleShutdown"
#16 0x080ed768 in Scheduler::run (this=0x98e6fd0) at scheduler.cpp:1927
        curtime = {d = {d = 0xa22842f8}}
        statuschanged = false
        secs_to_next = 15
        done = true
        lockit = {val = 160329741}
        prerollseconds = 0
        firstRun = false
        startIter = {_M_cur = 0xa2019b00, _M_first = 0xa2019a08, _M_last
= 0xa2019c08, _M_node = 0x9ad9828}
        maxSleep = 60000
        __FUNCTION__ = "run"
        idleWaitForRecordingTime = 5
        lastSleepCheck = {d = {d = 0xa1e5f4b8}}
        idleSince = {d = {d = 0xa9174228}}
        wakeThreshold = 300
        idleTimeoutSecs = 300
        blockShutdown = false
        schedRunTime = 66
#17 0x064bbda2 in QThreadPrivate::start (arg=0x98e6fd0) at
thread/qthread_unix.cpp:320
        thr = 0x98e6fd0
        data = 0x98e94e0
#18 0x0064ee99 in start_thread (arg=0xb2fbdb70) at pthread_create.c:304
        pd = 0xb2fbdb70
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {6680564, 0, 4001536,
-1292118984, -783331229, -281730298}, 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"
#19 0x02bb573e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

> Next revolution was when code responsible for MYTH_PROTO was modularized.

Doesn't seem to have helped here.

Master seems even worse in fact.  The process is spinning in a tight
loop trying to get a futex and getting an ETIMEDOUT.  It's not even
killable with a SIGTERM or SIGHUP.  It did end up dying with a SIGINT.

So no further ahead, really.

b.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://www.mythtv.org/pipermail/mythtv-users/attachments/20110808/0cb80c0d/attachment.bin 


More information about the mythtv-users mailing list