Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11504 closed Bug Report - General (fixed)

mythfrontend crashes on mac

Reported by: JYA Owned by: danielk
Priority: minor Milestone: 0.27
Component: MythTV - General Version: Master Head
Severity: high Keywords:
Cc: Ticket locked: no

Description

Current master will always crash in SSDP instance on mac... Crashes never occurs in exactly the same location, but always in the thread running SSDP, in ProcessData?

(gdb) bt
#0  0x00007fff8ce52212 in __pthread_kill ()
#1  0x00007fff8b226b54 in pthread_kill ()
#2  0x00007fff8b26adce in abort ()
#3  0x00007fff8b246905 in szone_error ()
#4  0x00007fff8b24b3ed in tiny_malloc_from_free_list ()
#5  0x00007fff8b24bb38 in szone_malloc_should_clear ()
#6  0x00007fff8b23e1b3 in malloc_zone_malloc ()
#7  0x00007fff8b23ec07 in malloc ()
#8  0x00007fff92085347 in operator new ()
#9  0x0000000106ba5334 in QHostAddress::QHostAddress ()
#10 0x0000000102740b4c in qt_socket_getportaddr (sa=0x10b580930, port=0x10813ac18, addr=0x10813ac20) at msocketdevice_unix.cpp:114
#11 0x00000001027407ff in MSocketDevice::readData (this=0x10813abf0, data=0x1081367e8 "HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=\001\n\250\300", maxlen=896) at msocketdevice_unix.cpp:1038
#12 0x0000000106d8b023 in QIODevice::read ()
#13 0x000000010275b060 in MSocketDevice::readBlock (this=0x10813abf0, data=0x1081367e8 "HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=\001\n\250\300", maxlen=896) at msocketdevice.h:124
#14 0x0000000102756465 in SSDP::ProcessData (this=0x1082719d0, pSocket=0x10813abf0) at ssdp.cpp:326
#15 0x00000001027562ee in SSDP::run (this=0x1082719d0) at ssdp.cpp:301
#16 0x00000001028ba49a in MThreadInternal::run (this=0x108271a40) at mthread.cpp:79
#17 0x0000000106cee4ba in QThreadPrivate::start ()
#18 0x00007fff8b2257a2 in _pthread_start ()
#19 0x00007fff8b2121e1 in thread_start ()

Attachments (1)

ssdp.diff (588 bytes) - added by JYA 11 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by JYA

Here is the console output:

2013-04-23 21:00:55.824995 I  Setup Interrupt: 2 handler
2013-04-23 21:00:55.825154 I  Setup Terminated: 15 handler
2013-04-23 21:00:55.825176 I  Setup Segmentation fault: 11 handler
2013-04-23 21:00:55.825191 I  Setup Abort trap: 6 handler
2013-04-23 21:00:55.825202 I  Setup Bus error: 10 handler
2013-04-23 21:00:55.825214 I  Setup Floating point exception: 8 handler
2013-04-23 21:00:55.825227 I  Setup Illegal instruction: 4 handler
2013-04-23 21:00:55.825246 I  Setup User defined signal 1: 30 handler
2013-04-23 21:00:55.825263 I  Setup User defined signal 2: 31 handler
2013-04-23 21:00:55.825613 C  mythfrontend version: master [v0.27-pre2-975-ga04cb4e] www.mythtv.org
2013-04-23 21:00:55.825641 C  Qt version: compile: 4.8.3, runtime: 4.8.3
2013-04-23 21:00:55.825660 N  Enabled verbose msgs:  general audio playback
2013-04-23 21:00:55.825688 N  Setting Log Level to LOG_DEBUG
2013-04-23 21:00:55.826407 D  Relative PREFIX! (../Resources), appDir=/Users/jyavenard/Work/mythtv/.osx-packager/build/bin
2013-04-23 21:00:55.826529 E  Relative PREFIX does not resolve, using /Users/jyavenard/Work/mythtv/.osx-packager/build/bin
2013-04-23 21:00:55.826537 I  Added logging to the console
2013-04-23 21:00:55.826570 N  Using runtime prefix = /Users/jyavenard/Work/mythtv/.osx-packager/build/bin
2013-04-23 21:00:55.826591 N  Using configuration directory = /Users/jyavenard/.mythtv
2013-04-23 21:00:55.826877 I  Assumed character encoding: 
2013-04-23 21:00:55.826896 W  This application expects to be running a locale that specifies a UTF-8 codeset, and many features may behave improperly with your current language settings. Please set the LC_ALL or LC_CTYPE, and LANG variable(s) in the environment in which this program is executed to include a UTF-8 codeset (such as 'en_US.UTF-8').
2013-04-23 21:00:55.829685 N  Empty LocalHostName.
2013-04-23 21:00:55.829708 I  Using localhost value of jyamba
2013-04-23 21:00:55.829869 I  Testing network connectivity to '192.168.10.11'
2013-04-23 21:00:55.830272 I  Starting process manager
2013-04-23 21:00:55.830310 I  Starting process signal handler
2013-04-23 21:00:55.830453 I  Starting IO manager (read)
2013-04-23 21:00:55.830502 I  Starting IO manager (write)
2013-04-23 21:00:56.039575 I  Starting mythlogserver
2013-04-23 21:00:56.058547 D  FindDatabase() - Success!
2013-04-23 21:00:56.080379 N  Setting QT default locale to en_AU
2013-04-23 21:00:56.080482 I  Current locale en_AU
2013-04-23 21:00:56.080611 E  No locale defaults file for en_AU, skipping
2013-04-23 21:00:56.134421 I  Added logging to mythlogserver at TCP:35327
2013-04-23 21:00:56.141818 E  AppleRemote::_findAppleRemoteDevice(AppleIRController) failed
2013-04-23 21:00:56.141965 E  AppleRemote::_findAppleRemoteDevice(AppleTVIRReceiver) failed
2013-04-23 21:00:56.141995 E  AppleRemote::startListening() failed
2013-04-23 21:00:56.142035 I  UDPListener: Enabling
2013-04-23 21:00:56.175185 D  Adding link-local 'FE80::1%lo0' to address list.
2013-04-23 21:00:56.175329 D  Adding IPv4 loopback to address list.
2013-04-23 21:00:56.175403 D  Adding IPv6 loopback to address list.
2013-04-23 21:00:56.175531 D  Adding link-local 'FE80::60C:CEFF:FEDB:8018%en0' to address list.
2013-04-23 21:00:56.175707 D  Adding '192.168.10.17' to address list.
2013-04-23 21:00:56.175815 D  Adding link-local 'FE80::95E1:9BB6:B16D:1D18%utun0' to address list.
2013-04-23 21:00:56.175951 D  Adding '[fdc8:59b:68fd:a31:95e1:9bb6:b16d:1d18]' to address list.
2013-04-23 21:00:56.176026 D  Adding '192.168.122.1' to address list.
2013-04-23 21:00:56.176094 D  Adding '172.16.45.1' to address list.
2013-04-23 21:00:56.183126 I  Binding to UDP 127.0.0.1:6948
2013-04-23 21:00:56.183523 I  Binding to UDP 192.168.10.17:6948
2013-04-23 21:00:56.183865 I  Binding to UDP 192.168.122.1:6948
2013-04-23 21:00:56.184180 I  Binding to UDP 172.16.45.1:6948
2013-04-23 21:00:56.184533 I  Binding to UDP [fe80::1%lo0]:6948
2013-04-23 21:00:56.184926 I  Binding to UDP [::1]:6948
2013-04-23 21:00:56.185274 I  Binding to UDP [fe80::60c:ceff:fedb:8018%en0]:6948
2013-04-23 21:00:56.185835 I  Binding to UDP [fe80::95e1:9bb6:b16d:1d18%utun0]:6948
2013-04-23 21:00:56.186365 I  Binding to UDP [fdc8:59b:68fd:a31:95e1:9bb6:b16d:1d18]:6948
2013-04-23 21:00:56.186733 I  Binding to UDP 192.168.10.255:6948
2013-04-23 21:00:56.187166 I  Binding to UDP 192.168.122.255:6948
2013-04-23 21:00:56.187568 I  Binding to UDP 172.16.45.255:6948
2013-04-23 21:00:56.603601 N  Desktop video mode: 1366x768 60.000 Hz
2013-04-23 21:00:56.718231 I  max_width: 1366 max_height: 768
2013-04-23 21:00:56.737138 I  Listening on TCP 127.0.0.1:6547
2013-04-23 21:00:56.737464 I  Listening on TCP 192.168.10.17:6547
2013-04-23 21:00:56.737716 I  Listening on TCP 192.168.122.1:6547
2013-04-23 21:00:56.737978 I  Listening on TCP 172.16.45.1:6547
2013-04-23 21:00:56.738278 I  Listening on TCP [fe80::1%lo0]:6547
2013-04-23 21:00:56.738512 I  Listening on TCP [::1]:6547
2013-04-23 21:00:56.738766 I  Listening on TCP [fe80::60c:ceff:fedb:8018%en0]:6547
2013-04-23 21:00:56.739144 I  Listening on TCP [fe80::95e1:9bb6:b16d:1d18%utun0]:6547
2013-04-23 21:00:56.739543 I  Listening on TCP [fdc8:59b:68fd:a31:95e1:9bb6:b16d:1d18]:6547
mythfrontend(9185,0x10b52f000) malloc: *** error for object 0x108b4a1a8: incorrect checksum for freed object - object was probably modified after being freed.

comment:2 Changed 11 years ago by JYA

another backtrace:

(gdb) bt
#0  0x00007fff8ce52212 in __pthread_kill ()
#1  0x00007fff8b226b54 in pthread_kill ()
#2  0x00007fff8b26adce in abort ()
#3  0x00007fff8b246905 in szone_error ()
#4  0x00007fff8b24b3ed in tiny_malloc_from_free_list ()
#5  0x00007fff8b24bb38 in szone_malloc_should_clear ()
#6  0x00007fff8b23e1b3 in malloc_zone_malloc ()
#7  0x00007fff8b23ec07 in malloc ()
#8  0x0000000106d3f8b2 in QString::QString ()
#9  0x0000000106d3f9cb in QString::mid ()
#10 0x0000000106d48d94 in QString::split ()
#11 0x00000001027569c0 in SSDP::ProcessData (this=0x107663020, pSocket=0x107660a80) at ssdp.cpp:358
#12 0x00000001027562ee in SSDP::run (this=0x107663020) at ssdp.cpp:301
#13 0x00000001028ba49a in MThreadInternal::run (this=0x107663090) at mthread.cpp:79
#14 0x0000000106cee4ba in QThreadPrivate::start ()
#15 0x00007fff8b2257a2 in _pthread_start ()
#16 0x00007fff8b2121e1 in thread_start ()
(gdb) 

comment:3 Changed 11 years ago by JYA

Looks like it's always reading the maximum size, making it write much data than the buffer can contain.

suggested patch attached

Changed 11 years ago by JYA

Attachment: ssdp.diff added

comment:4 Changed 11 years ago by danielk

jyavenard, this patch looks good.

comment:5 Changed 11 years ago by Jean-Yves Avenard <jyavenard@…>

Resolution: fixed
Status: newclosed

comment:6 Changed 11 years ago by Raymond Wagner

Milestone: unknown0.27
Note: See TracTickets for help on using tickets.