Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 13 months ago

Closed 10 months ago

Last modified 10 months ago

#11446 closed Bug Report - Crash (fixed)

Enabling full Airplay sometime gives fe startup segfault

Reported by: warpme@… Owned by: jyavenard
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 jyavenard 10 months ago.
only one bonjour registration at a time

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 months ago by jyavenard

  • Resolution set to Invalid
  • Status changed from new to closed

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

comment:2 Changed 13 months 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 13 months 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 10 months ago by jyavenard

  • Resolution Invalid deleted
  • Status changed from closed to new

comment:5 Changed 10 months ago by jyavenard

  • Status changed from new to accepted

Changed 10 months ago by jyavenard

only one bonjour registration at a time

comment:6 Changed 10 months ago by jyavenard

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

comment:7 Changed 10 months ago by Jean-Yves Avenard <jyavenard@…>

  • Resolution set to fixed
  • Status changed from accepted to closed

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 10 months ago by paulh

  • Milestone changed from unknown to 0.27

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.