Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11446 closed Bug Report - Crash (fixed)

Enabling full Airplay sometime gives fe startup segfault

Reported by: warpme@… Owned by: JYA
Priority: minor Milestone: 0.27
Component: MythTV - Airplay Version: 0.26-fixes
Severity: medium Keywords: Airtunes Airplay
Cc: Ticket locked: no

Description

On current 0.26-fixes (20130304-g3944ca9) enabling full AIrplay sometimes gives FE startup segfault (segfault is per 2-4 fe starts). If fe is configured to only AirTunes?, all seems to be OK. FE is running on slow Atom CPU - so maybe 2 Bonjur registrations at FE startup are too closely each-other for this slow CPU....

2013-03-07 22:18:18.521068 I  Setup Interrupt handler
2013-03-07 22:18:18.521209 I  Setup Terminated handler
2013-03-07 22:18:18.521229 I  Setup Segmentation fault handler
2013-03-07 22:18:18.521258 I  Setup Aborted handler
2013-03-07 22:18:18.521276 I  Setup Bus error handler
2013-03-07 22:18:18.521305 I  Setup Floating point exception handler
2013-03-07 22:18:18.521324 I  Setup Illegal instruction handler
2013-03-07 22:18:18.521350 I  Setup Real-time signal 0 handler
2013-03-07 22:18:18.521378 I  Setup User defined signal 1 handler
2013-03-07 22:18:18.521400 I  Setup User defined signal 2 handler
2013-03-07 22:18:18.521881 C  mythfrontend version: 0.26 [20130304-g3944ca9] www.mythtv.org
2013-03-07 22:18:18.521920 C  Qt version: compile: 4.8.2, runtime: 4.8.2
2013-03-07 22:18:18.521930 N  Enabled verbose msgs:  general
2013-03-07 22:18:18.521998 N  Setting Log Level to LOG_INFO
2013-03-07 22:18:18.522923 N  Using runtime prefix = /usr
2013-03-07 22:18:18.522977 N  Using configuration directory = /home/minimyth/.mythtv
2013-03-07 22:18:18.523305 I  Added logging to the console
2013-03-07 22:18:18.523734 I  Assumed character encoding: en_US.UTF-8
2013-03-07 22:18:18.526863 N  Empty LocalHostName.
2013-03-07 22:18:18.526947 I  Using localhost value of FE-Devel
2013-03-07 22:18:18.527550 I  Testing network connectivity to '192.168.1.254'
2013-03-07 22:18:18.528359 I  Starting process manager
2013-03-07 22:18:18.528500 I  Starting IO manager (read)
2013-03-07 22:18:18.528440 I  Starting process signal handler
2013-03-07 22:18:18.530771 I  Starting IO manager (write)
2013-03-07 22:18:18.676396 N  Setting QT default locale to pl_US
2013-03-07 22:18:18.676459 I  Current locale pl_US
2013-03-07 22:18:18.676688 E  No locale defaults file for pl_US, skipping
2013-03-07 22:18:18.745077 I  ScreenSaverX11Private: XScreenSaver support enabled
2013-03-07 22:18:18.746215 I  ScreenSaverX11Private: DPMS is disabled.
2013-03-07 22:18:18.766906 N  Desktop video mode: 1024x768 70.069 Hz
2013-03-07 22:18:18.773023 I  Added logging to mythlogserver at TCP:35327
2013-03-07 22:18:18.977844 I  Listening on TCP 127.0.0.1:6547
2013-03-07 22:18:18.978300 I  Listening on TCP 192.168.1.130:6547
8537: assertion failed "i < MAX_MESSAGE_CACHE_SIZE" file "dbus-message.c" line 700 function dbus_message_cache_or_finalize
  /usr/lib/libdbus-1.so.3(+0x46c4b) [0x7ffe6c44bc4b]
8537: assertion failed "i < MAX_MESSAGE_CACHE_SIZE" file "dbus-message.c" line 700 function dbus_message_cache_or_finalize
  /usr/lib/libdbus-1.so.3(+0x4762a) [0x7ffe6c44c62a]
  /usr/lib/libdbus-1.so.3(+0x47863) [0x7ffe6c44c863]
  /usr/lib/libdbus-1.so.3(dbus_message_unref+0x32c) [0x7ffe6c42449c]
  /usr/lib/libavahi-client.so.3(avahi_client_new+0x377) [0x7ffe6a7e61f7]
  /usr/lib/libdns_sd.so.1(DNSServiceRegister+0x19a) [0x7ffe6f7a3b5a]
  /usr/lib/libmythbase-0.26.so.0(_ZN15BonjourRegister8RegisterEtRK10QByteArrayS2_S2_+0x1fe) [0x7ffe77a7d51e]
  /usr/lib/libmythtv-0.26.so.0(_ZN17MythAirplayServer5StartEv+0x259) [0x7ffe784e9fe9]
  /usr/lib/qt4/lib/libQtCore.so.4(_ZN11QMetaObject8activateEP7QObjectPKS_iPPv+0x2bb) [0x7ffe7525594b]
  /usr/lib/qt4/lib/libQtCore.so.4(+0x871a1) [0x7ffe751641a1]
  /lib/libpthread.so.0(+0x7d50) [0x7ffe74ec8d50]
  /lib/libc.so.6(clone+0x6d) [0x7ffe746dea2d]
  /usr/lib/libdbus-1.so.3(+0x46c4b) [0x7ffe6c44bc4b]
  /usr/lib/libdbus-1.so.3(+0x4762a) [0x7ffe6c44c62a]
  /usr/lib/libdbus-1.so.3(+0x47863) [0x7ffe6c44c863]
  /usr/lib/libdbus-1.so.3(dbus_message_unref+0x32c) [0x7ffe6c42449c]
  /usr/lib/libavahi-client.so.3(+0x9c52) [0x7ffe6a7e3c52]
  /usr/lib/libavahi-client.so.3(avahi_client_new+0x366) [0x7ffe6a7e61e6]
  /usr/lib/libdns_sd.so.1(DNSServiceRegister+0x19a) [0x7ffe6f7a3b5a]
  /usr/lib/libmythbase-0.26.so.0(_ZN15BonjourRegister8RegisterEtRK10QByteArrayS2_S2_+0x1fe) [0x7ffe77a7d51e]
  /usr/lib/libmythtv-0.26.so.0(_ZN14MythRAOPDevice18RegisterForBonjourEv+0x424) [0x7ffe784f4644]
  /usr/lib/libmythtv-0.26.so.0(_ZN14MythRAOPDevice5StartEv+0xba) [0x7ffe784f4d9a]
  /usr/lib/qt4/lib/libQtCore.so.4(_ZN11QMetaObject8activateEP7QObjectPKS_iPPv+0x2bb) [0x7ffe7525594b]
  /usr/lib/qt4/lib/libQtCore.so.4(+0x871a1) [0x7ffe751641a1]
  /lib/libpthread.so.0(+0x7d50) [0x7ffe74ec8d50]
  /lib/libc.so.6(clone+0x6d) [0x7ffe746dea2d]
Aborted

Attachments (1)

0002-Make-sure-we-only-run-one-Bonjour-registration-at-a-.patch (2.3 KB) - added by JYA 11 years ago.
only one bonjour registration at a time

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by JYA

Resolution: Invalid
Status: newclosed

Obviously a bug in the libdbus library. not in myth.

comment:2 Changed 11 years ago by warpme@…

Strange as it looks like this bug is in 2 different dbus library versions? I tried 1.4.20 and 1.6.8. Symptoms are exactly the same. I can try another bunch of dbus versions - but don't believe it will help. Sad....

comment:3 Changed 11 years ago by warpme@…

It looks like Bonjour register isn't reentrant. In my case original code issues bonjour register for raop & airplay in almost the same time (few msec. difference). As proof of concept I add 100ms delay before airplay registration and this seems to efficiently workaround problem. I think proper solution should serialise bonjour registrations.

comment:4 Changed 11 years ago by JYA

Resolution: Invalid
Status: closednew

comment:5 Changed 11 years ago by JYA

Status: newaccepted

Changed 11 years ago by JYA

only one bonjour registration at a time

comment:6 Changed 11 years ago by JYA

Please try the following patch, and let me know if it fixes the crash for you.

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

Resolution: fixed
Status: acceptedclosed

In 9b22dab41ecc1a304ebaaf6b87bea9870a199e3f/mythtv:

Make sure we only run one Bonjour registration at a time.

Seems Bonjour isn't re-entrant with some implementations. So surround it with a lock

Fixes #11446

comment:8 Changed 11 years ago by paulh

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