Opened 13 years ago

Closed 12 years ago

#2820 closed defect (fixed)

mythbacked segfault from MythSocket::writeStringList

Reported by: mikerice1969@… Owned by: Isaac Richards
Priority: minor Milestone: 0.21
Component: mythtv Version: 0.20
Severity: high Keywords:
Cc: Ticket locked: no

Description

Backend is crashing on average once a day. This time I started running (0.20-fixes/2.6.18-1.2239.fc5smp/ivtv0.8.2) at about 8:30am and it segfaulted at about 4:30pm. See offending stack trace below. Full trace is attached. Also attached the last 30 minutes of the backend log.

Thread 19 (Thread -1370518624 (LWP 20382)):
#0  0x012341ba in memcpy () from /lib/libc.so.6
No symbol table info available.
#1  0x02c1943d in QString::operator+= () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#2  0x02c2c2d6 in QStringList::join () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#3  0x074b22c2 in MythSocket::writeStringList (this=0xad5d3f30, list=@0xae4f7c5c) at mythsocket.cpp:251
	str = {static null = {static null = <same as static member of an already seen type>, d = 0x82c43f8, static shared_null = 0x82c43f8}, d = 0xaa007020, static shared_null = 0x82c43f8}
	utf8 = <incomplete type>
	size = 19055219
	written = -1296271864
	payload = <incomplete type>
	errorcount = 2907710096
#4  0x08094d27 in MainServer::SendResponse (this=0x8346170, socket=0xad5d3f30, commands=@0xae4f7c5c) at mainserver.cpp:990
No locals.
#5  0x080adc33 in MainServer::HandleQueryRecordings (this=0x8346170, type=@0xae4f8260, pbs=0xad697798) at mainserver.cpp:1291
	pbssock = (MythSocket *) 0xad5d3f30
	islocal = false
	playbackhost = {static null = {static null = <same as static member of an already seen type>, d = 0x82c43f8, static shared_null = 0x82c43f8}, d = 0xad3be998, static shared_null = 0x82c43f8}
	fs_db_name = {static null = {static null = <same as static member of an already seen type>, d = 0x82c43f8, static shared_null = 0x82c43f8}, d = 0xad669c28, static shared_null = 0x82c43f8}
	rectime = {d = {jd = 2454090}, t = {ds = 59333145}}
	ri = {_M_node = 0xae4f7c94}
	schedList = {<std::_List_base<ProgramInfo*,std::allocator<ProgramInfo*> >> = {_M_impl = {<std::allocator<std::_List_node<ProgramInfo*> >> = {<__gnu_cxx::new_allocator<std::_List_node<ProgramInfo*> >> = {<No data fields>}, <No data fields>}, _M_node = {_M_next = 0xb2ba53a8, _M_prev = 0xad9254d8}}}, <No data fields>}
	ip = {static null = {static null = <same as static member of an already seen type>, d = 0x82c43f8, static shared_null = 0x82c43f8}, d = 0x8304750, static shared_null = 0x82c43f8}
	port = {static null = {static null = <same as static member of an already seen type>, d = 0x82c43f8, static shared_null = 0x82c43f8}, d = 0x8303b40, static shared_null = 0x82c43f8}
	inUseMap = {sh = 0xad32bae8}
	inUseKey = {static null = {static null = <same as static member of an already seen type>, d = 0x82c43f8, static shared_null = 0x82c43f8}, d = 0xad805108, static shared_null = 0x82c43f8}
	inUseForWhat = {static null = {static null = <same as static member of an already seen type>, d = 0x82c43f8, static shared_null = 0x82c43f8}, d = 0xad3408d8, static shared_null = 0x82c43f8}
	oneHourAgo = {d = {jd = 2454090}, t = {ds = 55737832}}
	query = {<> = {<No data fields>}, m_db = 0x89855c8, m_isConnected = true, m_returnConnection = true}
	thequery = {static null = {static null = <same as static member of an already seen type>, d = 0x82c43f8, static shared_null = 0x82c43f8}, d = 0xad340b50, static shared_null = 0x82c43f8}
	chanorder = {static null = {static null = <same as static member of an already seen type>, d = 0x82c43f8, static shared_null = 0x82c43f8}, d = 0x831c4d0, static shared_null = 0x82c43f8}
	outputlist = {<QValueList<QString>> = {sh = 0xad32bcc0}, <No data fields>}
	fileprefix = {static null = {static null = <same as static member of an already seen type>, d = 0x82c43f8, static shared_null = 0x82c43f8}, d = 0x831c718, static shared_null = 0x82c43f8}
	backendIpMap = {sh = 0xad32beb8}
	backendPortMap = {sh = 0xad32bec8}
#6  0x080b2b35 in MainServer::ProcessRequestWork (this=0x8346170, sock=0xad5d3f30) at mainserver.cpp:357
	listline = {<QValueList<QString>> = {sh = 0xad47a918}, <No data fields>}
	line = {static null = {static null = <same as static member of an already seen type>, d = 0x82c43f8, static shared_null = 0x82c43f8}, d = 0xad5d3398, static shared_null = 0x82c43f8}
	tokens = {<QValueList<QString>> = {sh = 0xb2b8e858}, <No data fields>}
	command = {static null = {static null = <same as static member of an already seen type>, d = 0x82c43f8, static shared_null = 0x82c43f8}, d = 0xad5fbce0, static shared_null = 0x82c43f8}
	pbs = (class PlaybackSock *) 0xad697798
#7  0x080b6714 in MainServer::ProcessRequest (this=0x8346170, sock=0xad5d3f30) at mainserver.cpp:301
No locals.
#8  0x080bf4b9 in ProcessRequestThread::run (this=0xb2b02208) at mainserver.cpp:136
No locals.
#9  0x02888ccc in QThreadInstance::start () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
No symbol table info available.
#10 0x010c1433 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#11 0x01291a1e in clone () from /lib/libc.so.6

Attachments (4)

gdb.txt (127.1 KB) - added by mikerice1969@… 13 years ago.
full stack trace
mythlog.txt.bz2 (202.9 KB) - added by mikerice1969@… 13 years ago.
mythbackend log
gdb2.txt (42.0 KB) - added by mikerice1969@… 13 years ago.
Another crash
mythlog2.txt.bz2 (38.7 KB) - added by mikerice1969@… 13 years ago.
log for second crash

Download all attachments as: .zip

Change History (8)

Changed 13 years ago by mikerice1969@…

Attachment: gdb.txt added

full stack trace

Changed 13 years ago by mikerice1969@…

Attachment: mythlog.txt.bz2 added

mythbackend log

Changed 13 years ago by mikerice1969@…

Attachment: gdb2.txt added

Another crash

Changed 13 years ago by mikerice1969@…

Attachment: mythlog2.txt.bz2 added

log for second crash

comment:1 in reply to:  description Changed 13 years ago by vitold.md@…

Hello,

I have the same problem when mythbackend start broadcasting the BACKEND_MESSAGE::RECORDING_LIST_CHANGE whene I delete a recorded program with mythweb and certainelyin many other way.

"MainServer::customEvent" receive the RECORDING_LIST_CHANGE message and send it to the PlaybackSock?. The message is received by "MythContext::readyRead" and is send back to MainServer::customEvent.

Until glibc crash because of the infinite loop

Mary christmas

Vitold

comment:2 Changed 12 years ago by stuartm

Milestone: unknown0.21
Status: newinfoneeded_new

Daniel has fixed a number of these QString related segfaults, does anyone still see the problem with SVN trunk?

comment:3 in reply to:  2 Changed 12 years ago by Mike Rice <mikerice1969@…>

Replying to stuartm:

Daniel has fixed a number of these QString related segfaults, does anyone still see the problem with SVN trunk?

I switched to SVN trunk a few months ago and don't believe I've seen that problem for quite awhile.

comment:4 Changed 12 years ago by danielk

Resolution: fixed
Status: infoneeded_newclosed
Note: See TracTickets for help on using tickets.