Opened 4 years ago

Closed 2 years ago

#12925 closed Bug Report - General (Won't Fix)

Frequent crashing

Reported by: kbass@… Owned by:
Priority: major Milestone: 0.28.2
Component: MythTV - General Version: 0.28.0
Severity: high Keywords:
Cc: Ticket locked: no

Description (last modified by Peter Bennett)

Looking at my dmesg over the past week yields lots of segfaults in either libQt5Core or libQt5DBus.

[112147.425884] Qt bearer threa[9412]: segfault at 0 ip 00007f740a71f9f2 sp 00007f73c3ffe490 error 4 in[7f740a6c4000+80000]
[112876.864855] Qt bearer threa[9635]: segfault at 7f74ad7f8db8 ip 00007f74e0835c21 sp 00007f74ae7fb950 error 4 in[7f74e05ed000+47a000]
[115766.369828] Qt bearer threa[9977]: segfault at 0 ip 00007ff89d5989f2 sp 00007ff85effc490 error 4 in[7ff89d53d000+80000]
[117036.056993] Qt bearer threa[10256]: segfault at 0 ip 00007effbb4659f2 sp 00007eff94ff8490 error 4 in[7effbb40a000+80000]
[169726.570188] Qt bearer threa[12424]: segfault at 0 ip 00007f2f07d2d9f2 sp 00007f2ef0ddf490 error 4 in[7f2f07cd2000+80000]
[176947.820432] Qt bearer threa[13001]: segfault at 0 ip 00007f6cf7e539f2 sp 00007f6cc97f9490 error 4 in[7f6cf7df8000+80000]
[259829.039488] Qt bearer threa[19401]: segfault at 7f84382fbdb8 ip 00007f845248cc21 sp 00007f842b7fd950 error 4 in[7f8452244000+47a000]
[285036.447141] Qt bearer threa[20871]: segfault at 0 ip 00007f1c6e8229f2 sp 00007f1c3fffe490 error 4 in[7f1c6e7c7000+80000]
[288587.727564] Qt bearer threa[21265]: segfault at 0 ip 00007f77207059f2 sp 00007f76e9ffa490 error 4 in[7f77206aa000+80000]
[328621.374401] Qt bearer threa[23239]: segfault at 0 ip 00007ff2382e79f2 sp 00007ff205ffa490 error 4 in[7ff23828c000+80000]
[328891.184905] Qt bearer threa[23425]: segfault at 0 ip 00007f2cccce09f2 sp 00007f2ca27fb490 error 4 in[7f2cccc85000+80000]
[330305.966236] Qt bearer threa[23739]: segfault at 0 ip 00007f3ea750b9f2 sp 00007f3e80ff8490 error 4 in[7f3ea74b0000+80000]
[345703.303237] Qt bearer threa[28865]: segfault at 0 ip 00007ffb841d09f2 sp 00007ffb6d282490 error 4 in[7ffb84175000+80000]
[441404.025865] Qt bearer threa[2167]: segfault at 0 ip 00007f3bce6f89f2 sp 00007f3bab5ea490 error 4 in[7f3bce69d000+80000]
[457720.606073] Qt bearer threa[3021]: segfault at 0 ip 00007f7cd55e79f2 sp 00007f7ca6ffc490 error 4 in[7f7cd558c000+80000]
[463198.825974] Qt bearer threa[3730]: segfault at 0 ip 00007f7ab84fe9f2 sp 00007f7a85ffa490 error 4 in[7f7ab84a3000+80000]
[503112.775344] Qt bearer threa[5449]: segfault at 0 ip 00007f7911a3b9f2 sp 00007f78ee8ea490 error 4 in[7f79119e0000+80000]
[535213.661353] Qt bearer threa[7353]: segfault at 0 ip 00007eff3f68a9f2 sp 00007eff18ff8490 error 4 in[7eff3f62f000+80000]
[535281.338432] Qt bearer threa[7444]: segfault at 0 ip 00007f5efac1d9f2 sp 00007f5eb7ffe490 error 4 in[7f5efabc2000+80000]
[536977.634869] Qt bearer threa[8066]: segfault at 0 ip 00007f9fe920c9f2 sp 00007f9fbaffc490 error 4 in[7f9fe91b1000+80000]
[545984.130301] Qt bearer threa[8495]: segfault at 7f749007fdb8 ip 00007f74ac0aac21 sp 00007f7475ffa950 error 4 in[7f74abe62000+47a000]
[548873.243582] Qt bearer threa[8815]: segfault at 7f8364139e38 ip 00007f837f963c21 sp 00007f83557f9950 error 4 in[7f837f71b000+47a000]
[550752.736222] SELinux: initialized (dev binfmt_misc, type binfmt_misc), uses genfs_contexts
[550752.780852] nr_pdflush_threads exported in /proc is scheduled for removal
[583771.513845] Qt bearer threa[12531]: segfault at 0 ip 00007f91a46569f2 sp 00007f9175ffa490 error 4 in[7f91a45fb000+80000]
[594533.782257] Qt bearer threa[13005]: segfault at 7f0e8c1e6db8 ip 00007f0ea5b76c21 sp 00007f0e7effc950 error 4 in[7f0ea592e000+47a000]

Attachments (4)

mf1.backtrace (2.4 KB) - added by kbass@… 4 years ago.
Here is a backtrace from mythfilldatase
mm1.backtrace.gz (1.3 KB) - added by kbass@… 4 years ago.
Here is a backtrace from mythmetadatalookup
mf2.backtrace.gz (2.2 KB) - added by kbass@… 4 years ago.
Another backtrace for millfilldatabase
mbetrace.log.gz (1.4 KB) - added by kbass@… 4 years ago.
mythbackend backtrace

Download all attachments as: .zip

Change History (20)

Changed 4 years ago by kbass@…

Attachment: mf1.backtrace added

Here is a backtrace from mythfilldatase

Changed 4 years ago by kbass@…

Attachment: mm1.backtrace.gz added

Here is a backtrace from mythmetadatalookup

comment:1 Changed 4 years ago by Peter Bennett

Description: modified (diff)

comment:2 Changed 4 years ago by Peter Bennett

Please supply the MythTV version, also the operating system name and version

comment:3 Changed 4 years ago by kbass@…

0.28/fixes (v0.28-78-g1434df8)

Centos 7.2 - up to date - with Qt 5.6.1 from EPEL.

comment:4 Changed 4 years ago by Peter Bennett

Owner: set to Peter Bennett
Status: newassigned

Can you confirm whether the frontend seg faults at exit.

It may be the same problem as #12917. I see that you are using QT 5.6.1, and Ubuntu 16.10 is also using that version of QT. I am working on that problem now.

comment:5 Changed 4 years ago by kbass@…

I replaced all my frontends with raspbian Kodi frontends, but I still have a 0.28 Centos 7 frontend sitting around with Qt 5.6.1. I ran the frontend twice, hit exit, and neither time did it crash.

However, I did just see (not in the log), but on the console during shutdown:

2016-11-13 23:57:40.259535 I  Registering HouseKeeperTask 'HardwareProfiler'.
2016-11-13 23:57:40.269060 I  Starting HouseKeeper.
QCoreApplication::postEvent: Unexpected null receiver
QCoreApplication::postEvent: Unexpected null receiver
2016-11-13 23:57:47.280956 I  RAOP Device: Cleaning up.

Perhaps an indication of a null pointer or something. I am not sure.

comment:6 Changed 4 years ago by Peter Bennett

It looks like your segfaults are a different problem. The back traces do not mean much, I cannot see any line of our mythtv code in the backtrace, just QT stuff. Do you have a way of recreating the problem? Can you try

thread apply all bt

to get the backtrace from all threads

Changed 4 years ago by kbass@…

Attachment: mf2.backtrace.gz added

Another backtrace for millfilldatabase

comment:7 Changed 4 years ago by kbass@…

I don't know if this could be related...

dbus on Centos 7 appears to be 1.6. I have no idea if that is something Centos 7 will never upgrade due to compatibility or not.

comment:8 Changed 4 years ago by kbass@…

I am not familiar with the code organization. If I wanted to put a call to dbus_threads_init_default() from the main thread of mythtv BEFORE QT is initialized to see if this fixes/works around the problem where would I put that call?

Since mythfilldatabase crashes on exit - I could try something targeting that application first if that is easier.

comment:9 Changed 4 years ago by Stuart Auchterlonie

Milestone: unknown0.28.1

comment:10 Changed 4 years ago by kbass@…

I just tried adding a dbus_threads_init_default() call to mythfilldatabase/main.cpp at the beginning of the main(). It still crashed.

I also just noticed someone reported this issue with mythfilldatabase 6 months ago in ticket #12800 (found while searching the internet)

I do notice in all of the backtraces the following line:

#22 0x00007fffee018dc5 in start_thread (arg=0x7fffce2fd700) at pthread_create.c:308
Python Exception <type 'exceptions.RuntimeError'> Cannot locate object file for block.: 

So is this somehow related to some attempt to invoke python? This happens for mythfilldatabase?

I have also found:

(Unfortunately Qt 5.6.1 is the only Qt upgrade available via EPEL for Centos 7)

comment:11 Changed 4 years ago by Peter Bennett

Owner: Peter Bennett deleted
Status: assignednew

Since this is not the same as #12917, I am unassigning it again.

It may be some sort of python related problem. Other mythtv developers are more conversant with python than I am.

It will be helpful if you can list what programs have this problem. is it just mythfilldatabase and mythpreviewgen? Does the program run successfully then crash at the end?

comment:12 Changed 4 years ago by kbass@…

mythfilldatabase seems to run and crash at the end.

mythmetadatalookup crashes and my mythweb is littered with metalookup jobs that failed.

and two hours ago - mythbackend crashed - backtrace added.

Even the mythbackend backtrace shows some sort of 'Python Exception' - I don't know if there is some embedded python interpreter that is crashing or what. None of those apps are python, right? They are all native binaries.

Changed 4 years ago by kbass@…

Attachment: mbetrace.log.gz added

mythbackend backtrace

comment:13 Changed 4 years ago by Peter Bennett

gdb itself uses python for extensions. I think maybe you are seeing a gdb error since that message does not seem to be part of the backtrace.

The application are written in C++ but some of them call python scripts.

comment:14 Changed 4 years ago by Stuart Auchterlonie

Looking at the most recent backtrace, this looks to be a good match for

It's hard to tell if EPEL now has updated Qt packages with any of the patches mentioned in their bug report.

The solution may well end up being to build a newer Qt version.

comment:15 Changed 3 years ago by Stuart Auchterlonie


Moving remaining open 0.28.1 tickets to 0.28.2

comment:16 Changed 2 years ago by Stuart Auchterlonie

Resolution: Won't Fix
Status: newclosed

Closing any remaining tickets for 0.28, if the issue persists, feel free to reopen and align to v29 or master

Note: See TracTickets for help on using tickets.