Hi All,<br><br>I just experienced a backend SIGSEGV and I thought before I get too involved in debugging it I should check with the list to see if any experts can identify the problem.&nbsp; I am running SVN Rev 14309 in what is effectively an optimised build with debug symbols (I&#39;m using the 
release-dbg profile from <a href="http://svn.mythtv.org/trac/ticket/3589">http://svn.mythtv.org/trac/ticket/3589</a>).&nbsp; Also I have a master backend running also the frontend and a remote machine also running both BE/FE - the dump is of the master BE.&nbsp; Here is what I see in GDB:
<br><br>myth_master ~ # gdb /usr/local/bin/mythbackend /core.4224<br>GNU gdb 6.6<br>&lt;...&gt;<br>Core was generated by `/usr/local/bin/mythbackend --verbose general,important --logfile /var/log/mytht&#39;.<br>Program terminated with signal 11, Segmentation fault.
<br>#0&nbsp; 0x00002aea07167170 in QMutex::lock () from /usr/qt/3/lib/libqt-mt.so.3<br>(gdb) bt<br>#0&nbsp; 0x00002aea07167170 in QMutex::lock () from /usr/qt/3/lib/libqt-mt.so.3<br>#1&nbsp; 0x00002aea05e36b97 in MythSocket::UpRef (this=0x69006e006f004d) at 
mythsocket.cpp:61<br>#2&nbsp; 0x000000000047d2ce in PlaybackSock::SendReceiveStringList (this=0x1be0750, strlist=@0x4d018540) at playbacksock.cpp:63<br>#3&nbsp; 0x000000000047f8d0 in PlaybackSock::GetDiskSpace (this=0x1be0750, o_strlist=@0x4d018a40) at 
playbacksock.cpp:99<br>#4&nbsp; 0x00000000004b96f2 in BackendQueryDiskSpace (strlist=@0x4d018a40, encoderList=0x607460, consolidated=false, allHosts=true) at backendutil.cpp:137<br>#5&nbsp; 0x00000000004ba2e8 in GetFilesystemInfos (tvList=0x607460, fsInfos=@0x4d018c40) at 
backendutil.cpp:227<br>#6&nbsp; 0x0000000000414f73 in AutoExpire::CalcParams (this=0x751b00) at autoexpire.cpp:115<br>#7&nbsp; 0x0000000000417faa in SpawnUpdateThread (autoExpireInstance=0x751b00) at autoexpire.cpp:933<br>#8&nbsp; 0x00002aea07c2b257 in ?? () from /lib/libpthread.so.0
<br>#9&nbsp; 0x00002aea0828bafd in clone () from /lib/libc.so.6<br>#10 0x0000000000000000 in ?? ()<br>(gdb) frame 2<br>#2&nbsp; 0x000000000047d2ce in PlaybackSock::SendReceiveStringList (this=0x1be0750, strlist=@0x4d018540) at playbacksock.cpp
:63<br>63&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sock-&gt;UpRef();<br>(gdb) print this<br>$18 = (PlaybackSock * const) 0x1be0750<br>(gdb) print *this<br>$19 = {_vptr.PlaybackSock = 0x20004e004e0041, sock = 0x69006e006f004d, hostname = {static null = {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; static null = &lt;same as static member of an already seen type&gt;, d = 0x60bda0, static shared_null = 0x60bda0}, d = 0x200072006f0074,<br>&nbsp;&nbsp;&nbsp; static shared_null = 0x60bda0}, ip = {static null = {static null = &lt;same as static member of an already seen type&gt;, d = 0x60bda0,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; static shared_null = 0x60bda0}, d = 0x6800740079006d, static shared_null = 0x60bda0}, local = 95, events = false, blockshutdown = 102,<br>&nbsp; backend = false, sockLock = &lt;incomplete type&gt;, expectingreply = false, disconnected = true, refCount = -1, m_parent = 0x7601e0}
<br>(gdb) print *this-&gt;sock<br>Cannot access memory at address 0x69006e006f004d<br>(gdb) list<br>58&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>59<br>60&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool PlaybackSock::SendReceiveStringList(QStringList &amp;strlist)<br>61&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>62&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sock-&gt;Lock();
<br>63&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sock-&gt;UpRef();<br>64<br>65&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sockLock.lock();<br>66&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expectingreply = true;<br>67<br>(gdb)<br><br><br>Note that the sock member is invalid and that the refCount of the PlaybackSock is -1.&nbsp; Interestingly enough there is another thread that is also using the exact same PlaybackSock, and is pretty much in the same code:
<br><br><br>(gdb) thread 21<br>[Switching to thread 21 (process 4347)]#0&nbsp; 0x00002aea07c31a98 in ?? () from /lib/libpthread.so.0<br>(gdb) bt<br>#0&nbsp; 0x00002aea07c31a98 in ?? () from /lib/libpthread.so.0<br>#1&nbsp; 0x00002aea07c2dbdb in ?? () from /lib/libpthread.so.0
<br>#2&nbsp; 0x00002aea07c2d533 in pthread_mutex_lock () from /lib/libpthread.so.0<br>#3&nbsp; 0x00002aea071672bd in QRealMutexPrivate::lock () from /usr/qt/3/lib/libqt-mt.so.3<br>#4&nbsp; 0x00002aea05e28510 in MythSocket::Lock (this=&lt;value optimized out&gt;) at 
mythsocket.cpp:564<br>#5&nbsp; 0x000000000047d2c1 in PlaybackSock::SendReceiveStringList (this=0x1be0750, strlist=@0x0) at playbacksock.cpp:62<br>#6&nbsp; 0x000000000047f8d0 in PlaybackSock::GetDiskSpace (this=0x1be0750, o_strlist=@0x448076a0) at 
playbacksock.cpp:99<br>#7&nbsp; 0x00000000004b96f2 in BackendQueryDiskSpace (strlist=@0x448076a0, encoderList=0x607460, consolidated=false, allHosts=true) at backendutil.cpp:137<br>#8&nbsp; 0x00000000004ba2e8 in GetFilesystemInfos (tvList=0x607460, fsInfos=@0x44807920) at 
backendutil.cpp:227<br>#9&nbsp; 0x000000000041d560 in AutoExpire::ExpireRecordings (this=0x751b00) at autoexpire.cpp:325<br>#10 0x0000000000425a44 in AutoExpire::RunExpirer (this=0x751b00) at autoexpire.cpp:275<br>#11 0x0000000000425a59 in AutoExpire::ExpirerThread (param=0x2aaab13a4f38) at 
autoexpire.cpp:547<br>#12 0x00002aea07c2b257 in ?? () from /lib/libpthread.so.0<br>#13 0x00002aea0828bafd in clone () from /lib/libc.so.6<br>#14 0x0000000000000000 in ?? ()<br>(gdb) frame 5<br>#5&nbsp; 0x000000000047d2c1 in PlaybackSock::SendReceiveStringList (this=0x1be0750, strlist=@0x0) at 
playbacksock.cpp:62<br>62&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sock-&gt;Lock();<br>(gdb) print this<br>$20 = (PlaybackSock * const) 0x1be0750<br>(gdb) print *this<br>$21 = {_vptr.PlaybackSock = 0x20004e004e0041, sock = 0x69006e006f004d, hostname = {static null = {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; static null = &lt;same as static member of an already seen type&gt;, d = 0x60bda0, static shared_null = 0x60bda0}, d = 0x200072006f0074,<br>&nbsp;&nbsp;&nbsp; static shared_null = 0x60bda0}, ip = {static null = {static null = &lt;same as static member of an already seen type&gt;, d = 0x60bda0,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; static shared_null = 0x60bda0}, d = 0x6800740079006d, static shared_null = 0x60bda0}, local = 95, events = false, blockshutdown = 102,<br>&nbsp; backend = false, sockLock = &lt;incomplete type&gt;, expectingreply = false, disconnected = true, refCount = -1, m_parent = 0x7601e0}
<br>(gdb) list<br>57&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return false;<br>58&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>59<br>60&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool PlaybackSock::SendReceiveStringList(QStringList &amp;strlist)<br>61&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>62&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sock-&gt;Lock();<br>63&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sock-&gt;UpRef();<br>
64<br>65&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sockLock.lock();<br>66&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expectingreply = true;<br>(gdb)<br><br><br>I didn&#39;t notice any other interesting threads - the only thing in the backend log at the time of the dump is:<br><br>2007-09-30 23:57:
20.264 Event socket closed. No connection to the backend.<br>2007-09-30 23:57:20.264 Event socket closed. No connection to the backend.<br><br><br>I&#39;ll continue to investigate and open a ticket when I isolate the problem, but if anyone wants to short-circuit the effort I won&#39;t complain :-)
<br><br>Cheers,<br>Russell.<br><br><br><br>