[mythtv-commits] Ticket #9545: seg fault in network control
MythTV
noreply at mythtv.org
Thu Feb 3 19:34:52 UTC 2011
#9545: seg fault in network control
----------------------------------------+----------------------------------
Reporter: ajlill@… | Type: Bug Report
Status: new | Priority: minor
Milestone: unknown | Component: MythTV - General
Version: 0.24-fixes | Severity: medium
Keywords: | Ticket locked: 0
----------------------------------------+----------------------------------
If a network control client closes the connection before the frontend
sends the reply, then the ncc is destroyed and when sendReplyToClient
tried to see if it's still connected, it segfaults.
fix: set m_socket to NULL in ncc destructor?
From my logs:
{{{
2011-02-03 13:45:11.972 ProcessAddRemoveQueues
2011-02-03 13:45:11.972 Construct FD_SET
2011-02-03 13:45:11.972 Waiting on select..
2011-02-03 13:45:11.972 NetworkControl: emit commandReceived(key right)
2011-02-03 13:45:11.972 NetworkControl: NetworkControl::receiveCommand(key
right)
2011-02-03 13:45:11.972 NetworkControl: Client Socket disconnected
2011-02-03 13:45:11.972 SendReceiveStringList(MESSAGE,SYSTEM_EVENT
NET_CTRL_DISCONNECTED SENDER fe2) called from UI thread
}}}
and a couple of seconds later:
{{{
Program terminated with signal 11, Segmentation fault.
#0 0x00007f533a6a7944 in QAbstractSocket::state() const ()
from /usr/lib/libQtNetwork.so.4
(gdb) bt
#0 0x00007f533a6a7944 in QAbstractSocket::state() const ()
from /usr/lib/libQtNetwork.so.4
#1 0x000000000052bd3c in NetworkControl::sendReplyToClient (
this=0x7f532c1ac9e0, ncc=0x2592ec0, reply=...) at
networkcontrol.cpp:1120
#2 0x000000000052c602 in NetworkControl::customEvent
(this=0x7f532c1ac9e0,
e=0x7f532433bed0) at networkcontrol.cpp:1189
#3 0x00007f533a2f1e84 in QObject::event(QEvent*) ()
from /usr/lib/libQtCore.so.4
#4 0x00007f533ab2732c in QApplicationPrivate::notify_helper(QObject*,
QEvent*)
() from /usr/lib/libQtGui.so.4
#5 0x00007f533ab2d80b in QApplication::notify(QObject*, QEvent*) ()
from /usr/lib/libQtGui.so.4
#6 0x00007f533a2e209c in QCoreApplication::notifyInternal(QObject*,
QEvent*)
() from /usr/lib/libQtCore.so.4
#7 0x00007f533a2e5744 in
QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
from /usr/lib/libQtCore.so.4
#8 0x00007f533a30bb73 in ?? () from /usr/lib/libQtCore.so.4
#9 0x00007f533700a6f2 in g_main_context_dispatch () from
/lib/libglib-2.0.so.0
#10 0x00007f533700e568 in ?? () from /lib/libglib-2.0.so.0
#
11 0x00007f533700e71c in g_main_context_iteration ()
from /lib/libglib-2.0.so.0
#12 0x00007f533a30b6b3 in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() from /usr/lib/libQtCore.so.4
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) frame 1
#1 0x000000000052bd3c in NetworkControl::sendReplyToClient (
this=0x7f532c1ac9e0, ncc=0x2592ec0, reply=...) at
networkcontrol.cpp:1120
1120 if (client && clientStream && client->state() ==
QTcpSocket::ConnectedState)
(gdb) p client
$1 = (struct QTcpSocket *) 0x2592eda
(gdb) p clientStream
$2 = (struct QTextStream *) 0x24000a000d8f80
}}}
--
Ticket URL: <http://code.mythtv.org/trac/ticket/9545>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list