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

Brian J. Murrell brian at interlinx.bc.ca
Sat Aug 6 15:36:17 UTC 2011


On 11-08-05 12:15 AM, Michael T. Dean wrote:
> 
> I posted a lightly-tested backport on 
> http://code.mythtv.org/trac/ticket/9704 .  You can download it at:
> 
> http://code.mythtv.org/trac/raw-attachment/ticket/9704/mythtv-0.24-backport_reconnect_fixes.patch

Yeah, this is definitely not helping.  Even with this patch applied I am
still getting deadlocks (which prevent clients connecting) along with
the dreaded:

2011-08-06 11:00:47.635 MythCoreContext: Connecting to backend server:
10.75.22.2:6543 (try 1 of 5)
2011-08-06 11:00:47.674 MythCoreContext: Connecting to backend server:
10.75.22.2:6543 (try 1 of 5)
2011-08-06 11:00:54.641 MythSocket(9c9f428:11): readStringList: Error,
timed out after 7000 ms.
2011-08-06 11:00:54.643 Protocol version check failure.
			The response to MYTH_PROTO_VERSION was empty.
			This happens when the backend is too busy to respond,
			or has deadlocked in due to bugs or hardware failure.


With the familiar stacktrace:

Thread 18 (Thread 0xb05fab70 (LWP 2051)):
#0  0x00c20416 in __kernel_vsyscall ()
No symbol table info available.
#1  0x0050552b in read () at ../sysdeps/unix/syscall-template.S:82
No locals.
#2  0x0548fbf8 in vio_read () from /usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#3  0x0548fc56 in vio_read_buff () from /usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#4  0x05490cfb in ?? () from /usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#5  0x0549186a in my_net_read () from /usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#6  0x05489d3f in cli_safe_read () from /usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#7  0x0545ab4e in cli_read_prepare_result () from
/usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#8  0x0545af01 in mysql_stmt_prepare () from /usr/lib/libmysqlclient_r.so.16
No symbol table info available.
#9  0x034ccd0f in QMYSQLResult::prepare (this=0xa30645c0, query=...) at
../../../sql/drivers/mysql/qsql_mysql.cpp:900
        r = <value optimized out>
        encQuery = {static shared_null = {ref = {_q_value = 41}, alloc =
0, size = 0, data = 0x25c73c4 "", array = ""}, static shared_empty =
{ref = {_q_value = 4}, alloc = 0, size = 0, data = 0x25c73d8 "", array =
""}, d = 0xa31c8338}
#10 0x06cc506a in QSqlResult::savePrepare (this=0xa30645c0, query=...)
at kernel/qsqlresult.cpp:600
No locals.
#11 0x06cb75c8 in QSqlQuery::prepare (this=0xb05f99b8, query=...) at
kernel/qsqlquery.cpp:924
No locals.
#12 0x00601029 in MSqlQuery::prepare (this=0xb05f99b8, query=...) at
mythdbcon.cpp:667
        ok = 8
#13 0x0889cf37 in ProgramInfo::LoadProgramFromRecorded (this=0xa31bd9b8,
_chanid=1009, _recstartts=...) at programinfo.cpp:1570
        query = {<QSqlQuery> = {d = 0xa8aa42f0}, m_db = 0x8d0c9b0,
m_isConnected = true, m_returnConnection = true, m_last_prepared_query =
{static null = {<No data fields>}, static shared_null = {ref = {_q_value
= 3678}, alloc = 0, size = 0, data = 0x25c749e, clean = 0, simpletext =
0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array =
{0}}, static shared_empty = {ref = {_q_value = 608}, alloc = 0, size =
0, data = 0x25c74b2, clean = 0, simpletext = 0, righttoleft = 0,
asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d =
0xa319c738, static codecForCStrings = 0x0}}
        is_reload = 8
        new_basename = {static null = {<No data fields>}, static
shared_null = {ref = {_q_value = 3678}, alloc = 0, size = 0, data =
0x25c749e, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0,
capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref =
{_q_value = 608}, alloc = 0, size = 0, data = 0x25c74b2, clean = 0,
simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved
= 0, array = {0}}, d = 0xb2e00010, static codecForCStrings = 0x0}
#14 0x08884e28 in ProgramInfo::ProgramInfo (this=0xa31bd9b8,
_chanid=1009, _recstartts=...) at programinfo.cpp:234
No locals.
#15 0x08078ff6 in AutoExpire::FillDBOrdered (this=0x8ccd4b8,
expireList=..., expMethod=10003) at autoexpire.cpp:980
        pginfo = 0xa304e9f8
        chanid = 1009
        recstartts = {d = {d = 0xa2f40a28}}
        querystr = {static null = {<No data fields>}, static shared_null
= {ref = {_q_value = 3678}, alloc = 0, size = 0, data = 0x25c749e, clean
= 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0,
reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value =
608}, alloc = 0, size = 0, data = 0x25c74b2, clean = 0, simpletext = 0,
righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array =
{0}}, d = 0xb2ed2c70, static codecForCStrings = 0x0}
        where = {static null = {<No data fields>}, static shared_null =
{ref = {_q_value = 3678}, alloc = 0, size = 0, data = 0x25c749e, clean =
0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0,
reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value =
608}, alloc = 0, size = 0, data = 0x25c74b2, clean = 0, simpletext = 0,
righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array =
{0}}, d = 0xa5060228, static codecForCStrings = 0x0}
        orderby = {static null = {<No data fields>}, static shared_null
= {ref = {_q_value = 3678}, alloc = 0, size = 0, data = 0x25c749e, clean
= 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0,
reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value =
608}, alloc = 0, size = 0, data = 0x25c74b2, clean = 0, simpletext = 0,
righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array =
{0}}, d = 0xb2eb8658, static codecForCStrings = 0x0}
        msg = {static null = {<No data fields>}, static shared_null =
{ref = {_q_value = 3678}, alloc = 0, size = 0, data = 0x25c749e, clean =
0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0,
reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value =
608}, alloc = 0, size = 0, data = 0x25c74b2, clean = 0, simpletext = 0,
righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array =
{0}}, d = 0xa31a8be8, static codecForCStrings = 0x0}
        maxAge = 39612404
        query = {<QSqlQuery> = {d = 0xa31b1ed8}, m_db = 0xb2e0b4d0,
m_isConnected = true, m_returnConnection = true, m_last_prepared_query =
{static null = {<No data fields>}, static shared_null = {ref = {_q_value
= 3678}, alloc = 0, size = 0, data = 0x25c749e, clean = 0, simpletext =
0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array =
{0}}, static shared_empty = {ref = {_q_value = 608}, alloc = 0, size =
0, data = 0x25c74b2, clean = 0, simpletext = 0, righttoleft = 0,
asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d =
0xb2ed2c70, static codecForCStrings = 0x0}}
#16 0x08076b04 in AutoExpire::FillExpireList (this=0x8ccd4b8,
expireList=...) at autoexpire.cpp:753
        expMethod = 2
#17 0x0806f5b4 in AutoExpire::ExpireRecordings (this=0x8ccd4b8) at
autoexpire.cpp:387
        fsit = {_M_current = 0x0}
        fsMap = {{d = 0xa31c3400, e = 0xa31c3400}}
        expireList = {<std::_Vector_base<ProgramInfo*,
std::allocator<ProgramInfo*> >> = {_M_impl =
{<std::allocator<ProgramInfo*>> =
{<__gnu_cxx::new_allocator<ProgramInfo*>> = {<No data fields>}, <No data
fields>}, _M_start = 0xa8ac2f10, _M_finish = 0xa8ac2ff4,
_M_end_of_storage = 0xa8ac3010}}, <No data fields>}
        deleteList = {<std::_Vector_base<ProgramInfo*,
std::allocator<ProgramInfo*> >> = {_M_impl =
{<std::allocator<ProgramInfo*>> =
{<__gnu_cxx::new_allocator<ProgramInfo*>> = {<No data fields>}, <No data
fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}},
<No data fields>}
        fsInfos = {<std::_Vector_base<FileSystemInfo,
std::allocator<FileSystemInfo> >> = {_M_impl =
{<std::allocator<FileSystemInfo>> =
{<__gnu_cxx::new_allocator<FileSystemInfo>> = {<No data fields>}, <No
data fields>}, _M_start = 0xa2fca728, _M_finish = 0xa2fca790,
_M_end_of_storage = 0xa2fca790}}, <No data fields>}
        truncateMap = {{d = 0x280fff4, e = 0x280fff4}}
        query = {<QSqlQuery> = {d = 0xb05f9fa8}, m_db = 0x81b6ff4,
m_isConnected = 132, m_returnConnection = 15, m_last_prepared_query =
{static null = {<No data fields>}, static shared_null = {ref = {_q_value
= 3678}, alloc = 0, size = 0, data = 0x25c749e, clean = 0, simpletext =
0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array =
{0}}, static shared_empty = {ref = {_q_value = 608}, alloc = 0, size =
0, data = 0x25c74b2, clean = 0, simpletext = 0, righttoleft = 0,
asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0x3d0f00,
static codecForCStrings = 0x0}}
#18 0x0806e835 in AutoExpire::RunExpirer (this=0x8ccd4b8) at
autoexpire.cpp:310
        timer = {mds = 35019186}
        curTime = {d = {d = 0xb2e058b8}}
        next_expire = {d = {d = 0xa2fb3d28}}
#19 0x0807452b in AutoExpire::ExpirerThread (param=0x8ccd4b8) at
autoexpire.cpp:617
        expirer = 0x8ccd4b8
#20 0x004fde99 in start_thread (arg=0xb05fab70) at pthread_create.c:304
        pd = 0xb05fab70
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {5300212, 0, 4001536,
-1335909336, -2138265490, -1602815218}, 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"
#21 0x0278373e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

I even upgrade to Natty on this machine in hopes that a newer mysql
would help.  Clearly it has not.  :-(

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/20110806/4d1a8955/attachment.bin 


More information about the mythtv-users mailing list