Opened 13 years ago
Closed 12 years ago
#11194 closed Bug Report - General (Fixed)
Mythfrontend hangs when exiting
| Reported by: | Owned by: | JYA | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.26.1 |
| Component: | MythTV - Airplay | Version: | 0.26-fixes |
| Severity: | medium | Keywords: | mythfrontend |
| Cc: | Ticket locked: | no |
Description
When exiting mythfrontend, the application hangs.
If I press Ctrl-c twice from the command line, it eventually quits. Looks like the hang begins with "Bonjour: De-registering service" but nothing informative comes from the "mythfrontend -v all" option.
Attachments (8)
Change History (32)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
| Status: | new → infoneeded_new |
|---|
Please grab a backtrace after the last debug message is printed. The TicketHowTo has links describing how to grab a backtrace. Then attach the backtrace here so we can analyze it.
FYI In the spam filter catches you out then compressing the log will allow you to bypass the filter but in this case the log is unlikely to tell us much.
follow-up: 4 comment:3 by , 13 years ago
I am also affected by this issue. I would be willing to provide any information necessary.
follow-up: 17 comment:4 by , 13 years ago
Replying to pyther@…:
I am also affected by this issue. I would be willing to provide any information necessary.
+1. openSUSE 12.2 x64; mythtv 0.25 works fine; removed all 0.25 traces prior to 0.26. myth-setup also hangs.
comment:5 by , 13 years ago
Same problem here. Kubuntu 12.10, 0.26 patches, kernel 3.5 x64. Honk if you want me to log something.
comment:6 by , 13 years ago
The effect happens only on pure frontend machines. Some debugging reveals, that in mythairplayserver.cpp the function call on line 355 (gMythAirplayServerThread->wait()) does not return. It seems, that the function call in the previous line (gMythAirplayServerThread->exit()) has no effect.
comment:7 by , 13 years ago
K 12.10 user 2 above here again. I run both backend and frontend on the same computer, but still got the effect. Now I cannot reproduce it, but I will get back here if it shows up again. It would be strange if 0.26 patches somehow fixed this during the last day...
follow-up: 9 comment:8 by , 13 years ago
Bob Havlin, we need a full backtrace. The one you grabbed is of only a single thread.
comment:9 by , 13 years ago
Replying to danielk:
we need a full backtrace. The one you grabbed is of only a single thread.
Unfortunately/fortunately, I cannot get it to hang anymore. I did a clean reinstall of mythbuntu over the weekend and I think that may be the reason.
Not sure if it is related, but airplay was not working and after my clean install airplay works.
I'll keep trying to see if I can get it to hang, but previously it would hang every time I exited.
by , 13 years ago
| Attachment: | hung.FE.v0.27-pre2-307-gc79ff7e.txt added |
|---|
a full backtrace of a non-patched FE
comment:10 by , 13 years ago
I didn't notice the patches until just now but I'll update my system and see if the hang happens again. In the meantime the full bt may verify if the patch is headed in the right direction.
by , 13 years ago
| Attachment: | hung.FE.v0.27-pre2-307-gc79ff7e-w-11194-v2-patch.txt added |
|---|
a hung FE with the v2 patch applied
follow-up: 12 comment:11 by , 13 years ago
Hi, I got an FE exit hang even though I have the patch applied.
comment:12 by , 13 years ago
The above attached patch (mythtv_airplay.patch) corrects the problem for me.
comment:13 by , 13 years ago
My approach was brutish. I commented out line 314 in mythairplayserver.cpp
gMythAirplayServerThread = new MThread("AirplayServer");
to prevent the airplay server from being created.
For me the only response to a mythfrontend hang was [Ctrl][Alt][F3] from which I could log in and kill mythfrontend. [Alt][Tab] nor the mouse seemed to work. RoyBoy626
comment:14 by , 13 years ago
| Milestone: | → 0.26.1 |
|---|---|
| Status: | infoneeded_new → new |
comment:15 by , 13 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:16 by , 13 years ago
The problem is back after upgrading to ubuntu-12.10 and the most recent compile of mythtv:
mythfrontend --version Please attach all output as a file in bug reports. MythTV Version : v0.26.0-93-ga1b9b1f MythTV Branch : fixes/0.26 Network Protocol : 75 Library API : 0.26.20130112-1 QT Version : 4.8.3 Options compiled in:
linux profile use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_ceton using_hdpvr using_iptv using_ivtv using_joystick_menu using_libcec using_libcrypto using_libdns_sd using_libxml2 using_lirc using_mheg using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_v4l2 using_x11 using_xrandr using_xv using_bindings_perl using_bindings_python using_bindings_php using_mythtranscode using_opengl using_vaapi using_vdpau using_ffmpeg_threads using_live using_mheg using_libass using_libxml2
See attached logfile.
comment:17 by , 13 years ago
Replying to anonymous@…:
Replying to pyther@…:
I am also affected by this issue. I would be willing to provide any information necessary.
+1. openSUSE 12.2 x64; mythtv 0.25 works fine; removed all 0.25 traces prior to 0.26. myth-setup also hangs.
Disabling AirPlay under FE Setup/General solves the FE hanging but myth-setup still hangs.
comment:18 by , 13 years ago
| Owner: | changed from to |
|---|---|
| Status: | assigned → accepted |
comment:19 by , 13 years ago
| Component: | MythTV - General → MythTV - Airplay |
|---|
comment:20 by , 13 years ago
jya, I think the problem might be deeper than just changing how m_bonjour is deleted. I only looked at this a little bit but I think this might suffer from that QXXXSocket issue I discussed with you. i.e. where all the sockets are created in the same thread and all the socket handling ends up being done in that one thread. If so there are two workarounds: 1/ just pass a socket file descriptor instead of a QTcpSocket to the handler thread and create the QTcpSocket in the right thread or 2/ you can reassign the thread a QObject belongs to using http://qt-project.org/doc/qt-4.8/qobject.html#moveToThread.
#1 has implications for Qt5 which changes the socket descriptor type from int to qintptr, but if you get it to work on Qt4.x I can easily make it Qt5 compatible since I have the build environment set up.
Anyway, I only did a little of bit of debugging before deciding this was a rabbit hole I didn't have time for at the time. I did find that the way to reproduce this was to run bonjour in an environment where it could never start up properly (I don't remember the details.)
comment:21 by , 13 years ago
daniel, in the case of AirPlay video, the QXXSocket is created in the main thread, and deleted in the main thread
But I'll look into it further...
comment:22 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
comment:24 by , 12 years ago
| Resolution: | → Fixed |
|---|---|
| Status: | new → closed |
This was fixed in e1773c2cf7bb38dc08ffa3a134602c8b173f6c9d

Tried attaching the file, but Trac claims it is spam.
mythfrontend --version Please attach all output as a file in bug reports. MythTV Version : v0.26.0-14-g280e7ef MythTV Branch : fixes/0.26 Network Protocol : 75 Library API : 0.26.20120822-1 QT Version : 4.8.1 Options compiled in: linux profile use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_ceton using_hdpvr using_iptv using_ivtv using_joystick_menu using_libcec using_libcrypto using_libdns_sd using_libxml2 using_lirc using_mheg using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_v4l2 using_x11 using_xrandr using_xv using_bindings_perl using_bindings_python using_bindings_php using_mythtranscode using_opengl using_vaapi using_vdpau using_ffmpeg_threads using_live using_mheg using_libass using_libxml2 mythfrontend -v all QGtkStyle was unable to detect the current GTK+ theme. 2012-10-23 15:40:46.221215 I Setup Interrupt handler 2012-10-23 15:40:46.221232 I Setup Terminated handler 2012-10-23 15:40:46.221238 I Setup Segmentation fault handler 2012-10-23 15:40:46.221245 I Setup Aborted handler 2012-10-23 15:40:46.221249 I Setup Bus error handler 2012-10-23 15:40:46.221255 I Setup Floating point exception handler 2012-10-23 15:40:46.221260 I Setup Illegal instruction handler 2012-10-23 15:40:46.221267 I Setup Real-time signal 0 handler 2012-10-23 15:40:46.221274 I Setup User defined signal 1 handler 2012-10-23 15:40:46.221279 I Setup User defined signal 2 handler 2012-10-23 15:40:46.221371 C mythfrontend version: fixes/0.26 [v0.26.0-14-g280e7ef] www.mythtv.org 2012-10-23 15:40:46.221377 C Qt version: compile: 4.8.1, runtime: 4.8.3 2012-10-23 15:40:46.221381 N Enabled verbose msgs: all 2012-10-23 15:40:46.221391 N Setting Log Level to LOG_INFO 2012-10-23 15:40:46.221537 N Using runtime prefix = /usr 2012-10-23 15:40:46.221548 N Using configuration directory = /home/bob/.mythtv 2012-10-23 15:40:46.221634 I Assumed character encoding: en_US.UTF-8 2012-10-23 15:40:46.222037 I Added logging to the console 2012-10-23 15:40:46.222149 E (old)Settings::ReadSettings(settings.txt) - No such file settings.txt 2012-10-23 15:40:46.222218 N Empty LocalHostName. 2012-10-23 15:40:46.222226 I Using localhost value of mythbox 2012-10-23 15:40:46.222235 I Clearing Settings Cache. 2012-10-23 15:40:46.222249 I DefaultUPnP() - No default UPnP backend 2012-10-23 15:40:46.222264 I Clearing Settings Cache. 2012-10-23 15:40:46.227767 I Database connection created: DBManager0 2012-10-23 15:40:46.227782 I New DB connection, total: 1 2012-10-23 15:40:46.230101 I Connected to database 'mythconverg' at host: localhost 2012-10-23 15:40:46.232196 I Closing DB connection named 'DBManager0' 2012-10-23 15:40:46.232197 I Clearing Settings Cache. 2012-10-23 15:40:46.232237 I Database connection created: DBManager1 2012-10-23 15:40:46.232251 I New DB connection, total: 1 2012-10-23 15:40:46.232539 I Connected to database 'mythconverg' at host: localhost 2012-10-23 15:40:46.233310 N Setting QT default locale to EN_US 2012-10-23 15:40:46.233363 I Current locale EN_US 2012-10-23 15:40:46.233396 N Reading locale defaults from /usr/share/mythtv//locales/en_us.xml 2012-10-23 15:40:46.238911 I Managed child (PID: 5741) has started! * command=xscreensaver-command -version >&- 2>&-, timeout=0 2012-10-23 15:40:46.238966 I (0x2649f30)::IncrRef() -> 2 2012-10-23 15:40:46.240148 I Starting IO manager (write) 2012-10-23 15:40:46.240273 I Starting IO manager (read) 2012-10-23 15:40:46.240332 I Starting process signal handler 2012-10-23 15:40:46.240417 I Starting process manager 2012-10-23 15:40:46.340541 I Managed child (PID: 5741) has exited! command=xscreensaver-command -version >&- 2>&-, status=0, result=0 2012-10-23 15:40:46.340592 I (0x2649f30)::DecrRef() -> 1 2012-10-23 15:40:46.340612 I (0x2649f30)::DecrRef() -> 0 2012-10-23 15:40:46.340654 I ScreenSaverX11Private: XScreenSaver support enabled 2012-10-23 15:40:46.341258 I ScreenSaverX11Private: DPMS is disabled. 2012-10-23 15:40:46.342200 I MythUIHelper: Primary screen: 0. 2012-10-23 15:40:46.345763 I MythUIHelper: Using screen 0, 1024x768 at 0,0 2012-10-23 15:40:46.352846 E X11 ModeLine query returned zeroes 2012-10-23 15:40:46.352985 N Desktop video mode: 1024x768 60.000 Hz 2012-10-23 15:40:46.361500 I The NV-CONTROL X extension is not available on screen 0 of ':0.0'. 2012-10-23 15:40:46.363608 I max_width: 1024 max_height: 768 2012-10-23 15:40:46.365601 I MythUIHelper: MythUI Image Cache size set to 20971520 bytes 2012-10-23 15:40:46.365617 I Enabling Settings Cache. 2012-10-23 15:40:46.365622 I Clearing Settings Cache. 2012-10-23 15:40:46.365665 I MediaRenderer::Begin 2012-10-23 15:40:46.366842 I HttpServer() - SharePath = /usr/share/mythtv/ 2012-10-23 15:40:46.368158 I Listening on TCP 127.0.0.1:6547 2012-10-23 15:40:46.368227 I Listening on TCP 192.168.2.128:6547 2012-10-23 15:40:46.368280 I Listening on TCP [::1]:6547 2012-10-23 15:40:46.368337 I Listening on TCP [fe80::a00:27ff:fe95:883b%eth1]:6547 2012-10-23 15:40:46.368421 I MediaRenderer::Creating UPnp Description 2012-10-23 15:40:46.368427 I MediaRenderer::Registering MythFrontendStatus service. 2012-10-23 15:40:46.368435 I MediaRenderer::Registering MythFEXML Service. 2012-10-23 15:40:46.368459 I MediaRenderer::Registering Status Service. 2012-10-23 15:40:46.368495 I MediaRenderer::Registering CMGR Service. 2012-10-23 15:40:46.368553 N Starting up SSDP Thread... 2012-10-23 15:40:46.369229 I SSDP Thread Starting soon 2012-10-23 15:40:46.369255 I SSDP::EnableNotifications() - creating new task 2012-10-23 15:40:46.369282 I SSDP::EnableNotifications() - sending NTS_byebye 2012-10-23 15:40:46.369337 I LookupUDN(urn:schemas-upnp-org:device:MediaRenderer:1) sName=UPnP/UDN/MediaRenderer, sUDN={3bd4c9a7-5688-479f-9988-983c055ab78 2012-10-23 15:40:46.369379 I UPnpNotifyTask::SendNotifyMsg : 239.255.255.250:1900 : upnp:rootdevice : uuid:{3bd4c9a7-5688-479f-9988-983c055ab78::upnp:rootdevice 2012-10-23 15:40:46.369626 I SSDP::Run - SSDP Thread Started. 2012-10-23 15:40:46.444255 I UPnpNotifyTask::SendNotifyMsg : 239.255.255.250:1900 : uuid:{3bd4c9a7-5688-479f-9988-983c055ab78 : uuid:{3bd4c9a7-5688-479f-9988-983c055ab78 2012-10-23 15:40:46.463706 I Added logging to mythlogserver at TCP:35327 2012-10-23 15:40:46.627911 I UPnpNotifyTask::SendNotifyMsg : 239.255.255.250:1900 : urn:schemas-upnp-org:device:MediaRenderer:1 : uuid:{3bd4c9a7-5688-479f-9988-983c055ab78::urn:schemas-upnp-org:device:MediaRenderer:1 2012-10-23 15:40:46.652696 I UPnpNotifyTask::SendNotifyMsg : 239.255.255.250:1900 : urn:schemas-mythtv-org:service:MythFrontend:1 : uuid:{3bd4c9a7-5688-479f-9988-983c055ab78::urn:schemas-mythtv-org:service:MythFrontend:1 2012-10-23 15:40:46.840661 I UPnpNotifyTask::SendNotifyMsg : 239.255.255.250:1900 : urn:schemas-upnp-org:service:ConnectionManager:1 : uuid:{3bd4c9a7-5688-479f-9988-983c055ab78::urn:schemas-upnp-org:service:ConnectionManager:1 2012-10-23 15:40:46.894846 I SSDP::EnableNotifications() - sending NTS_alive 2012-10-23 15:40:46.894855 I Starting TaskQueue Thread... 2012-10-23 15:40:46.894884 I TaskQueue Thread Started. 2012-10-23 15:40:46.894891 I (0x26866e0)::IncrRef() -> 2 2012-10-23 15:40:46.894897 I SSDP::EnableNotifications() - Task added to UPnP queue 2012-10-23 15:40:46.895087 I (0x265ce90)::IncrRef() -> 2 2012-10-23 15:40:46.895099 I (0x265ce90)::DecrRef() -> 1 2012-10-23 15:40:46.895171 I TaskQueue Thread Running. 2012-10-23 15:40:46.895223 I UPnpNotifyTask::SendNotifyMsg : 239.255.255.250:1900 : upnp:rootdevice : uuid:{3bd4c9a7-5688-479f-9988-983c055ab78::upnp:rootdevice 2012-10-23 15:40:46.896243 I (0x265e420)::IncrRef() -> 2 2012-10-23 15:40:46.896248 I (0x265e420)::DecrRef() -> 1 ... 2012-10-23 15:40:53.496388 I (0x7fcb8c016c28)::DecrRef() -> 38 2012-10-23 15:40:53.496388 I (0x7fcb8c022b18)::DecrRef() -> 20 2012-10-23 15:40:53.496388 I (0x7fcb8c029b88)::DecrRef() -> 20 2012-10-23 15:40:53.496388 I (0x7fcb8c0311e8)::DecrRef() -> 19 2012-10-23 15:40:53.500294 N Resuming idle timer 2012-10-23 15:40:53.500313 N Resuming idle timer 2012-10-23 15:40:53.501280 I Clearing Settings Cache for 'playmode'. 2012-10-23 15:40:53.501840 I Clearing Settings Cache for 'repeatmode'. 2012-10-23 15:40:53.502840 I Clearing Settings Cache for 'musicautoshowplayer'. 2012-10-23 15:40:53.503128 I Bonjour: De-registering service '_mythfrontend._tcp.' on 'Mythfrontend on mythbox' 2012-10-23 15:40:53.505935 I RAOP Device: Cleaning up. 2012-10-23 15:40:53.506202 I Bonjour: De-registering service '_raop._tcp.' on '503b276f453c@MythTV on mythbox' 2012-10-23 15:40:56.210246 I (0x26a4d50)::IncrRef() -> 2 2012-10-23 15:40:56.210277 I (0x26c4730)::IncrRef() -> 2 2012-10-23 15:40:56.210282 I (0x26c4730)::DecrRef() -> 1 2012-10-23 15:40:56.210285 I (0x26a4d50)::DecrRef() -> 1 2012-10-23 15:40:56.211056 I (0x265da10)::IncrRef() -> 2 ... ^C^C