Opened 5 years ago
Closed 5 years ago
#13538 closed Bug Report - Crash (Fixed)
Crash on start of mythfrontend
Reported by: | Klaas de Waal | Owned by: | Mark Kendall |
---|---|---|---|
Priority: | blocker | Milestone: | 31.0 |
Component: | MythTV - General | Version: | Master Head |
Severity: | high | Keywords: | |
Cc: | Ticket locked: | no |
Description
After installing and compiling today's master on my frontend box the mythtvfrontend segfaults on start.
The box has a recent Intel Pentium
model name : Intel(R) Pentium(R) CPU G4400 @ 3.30GHz
and an old Nvidia card:
01:00.0 VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 520] (rev a1)
This box was running a version of master from before the render-2019 merge on Ubuntu 16. Due to the minimum Qt requirement being now 5.7 the box is upgraded to Ubuntu 18. Driver is nvidia 340.107.
Startup log and the gdb backtrace:
2019-12-10 16:42:17.205566 I Setup Interrupt handler 2019-12-10 16:42:17.205581 I Setup Terminated handler 2019-12-10 16:42:17.205586 I Setup Segmentation fault handler 2019-12-10 16:42:17.205589 I Setup Aborted handler 2019-12-10 16:42:17.205592 I Setup Bus error handler 2019-12-10 16:42:17.205595 I Setup Floating point exception handler 2019-12-10 16:42:17.205600 I Setup Illegal instruction handler 2019-12-10 16:42:17.205604 I Setup Real-time signal 0 handler 2019-12-10 16:42:17.205608 I Setup User defined signal 1 handler 2019-12-10 16:42:17.205611 I Setup User defined signal 2 handler 2019-12-10 16:42:17.205616 I Setup Hangup handler 2019-12-10 16:42:17.205674 C mythfrontend version: master [v31-Pre-1472-gbd4822af36] www.mythtv.org 2019-12-10 16:42:17.205678 C Qt version: compile: 5.9.5, runtime: 5.9.5 2019-12-10 16:42:17.205696 I Ubuntu 18.04.3 LTS (x86_64) 2019-12-10 16:42:17.205703 N Enabled verbose msgs: general 2019-12-10 16:42:17.205711 N Setting Log Level to LOG_INFO 2019-12-10 16:42:17.216389 N Using runtime prefix = /home/klaas/mma/usr 2019-12-10 16:42:17.216394 N Using configuration directory = /home/klaas/.mythtv 2019-12-10 16:42:17.216434 I Assumed character encoding: en_US.UTF-8 2019-12-10 16:42:17.216689 I Loading nl translation for module mythfrontend 2019-12-10 16:42:17.216815 I Using a profile name of: 'myth3' (Usually the same as this host's name.) 2019-12-10 16:42:17.216861 I Start up testing connections. DB zolder, BE , attempt 0, status dbAwake, Delay: 2000 2019-12-10 16:42:17.217138 I Added logging to the console 2019-12-10 16:42:18.218050 I Start up testing connections. DB zolder, BE , attempt 1, status dbAwake, Delay: 2000 [New Thread 0x7fffd0958700 (LWP 4936)] [New Thread 0x7fffbbfff700 (LWP 4937)] [New Thread 0x7fffbb7fe700 (LWP 4938)] [New Thread 0x7fffbaffd700 (LWP 4939)] [New Thread 0x7fffba7fc700 (LWP 4940)] 2019-12-10 16:42:20.252854 N Setting QT default locale to nl_NL 2019-12-10 16:42:20.252879 I Current locale nl_NL 2019-12-10 16:42:20.252972 N Reading locale defaults from /home/klaas/mma/usr/share/mythtv//locales/nl_nl.xml 2019-12-10 16:42:20.280679 I Display: Found screen number 0 (HDMI-0) 2019-12-10 16:42:20.280719 I Display: Using screen 'HDMI-0' (Make: Unknown Model: Unknown) 2019-12-10 16:42:20.280757 I Display: Geometry 1920x1080+0+0 Size 160mmx90mm 2019-12-10 16:42:20.282069 N Display: Desktop video mode: 1920x1080 60.000 Hz 2019-12-10 16:42:20.316529 I Starting process manager 2019-12-10 16:42:20.317575 I Starting process signal handler 2019-12-10 16:42:20.317786 I Starting IO manager (read) 2019-12-10 16:42:20.320982 I Starting IO manager (write) [New Thread 0x7fffb9ffb700 (LWP 4943)] [New Thread 0x7fffb937f700 (LWP 4944)] 2019-12-10 16:42:20.367757 I ScreenSaverX11Private: XScreenSaver support enabled 2019-12-10 16:42:20.368065 I ScreenSaverX11Private: DPMS is disabled. 2019-12-10 16:42:20.409856 I Listening on TCP 0.0.0.0:6547 2019-12-10 16:42:20.411647 I Listening on TCP [::]:6547 [New Thread 0x7fffb8b7e700 (LWP 4945)] [New Thread 0x7fff23fff700 (LWP 4946)] [New Thread 0x7fff237fe700 (LWP 4947)] 2019-12-10 16:42:23.280730 I Loading nl translation for module mythfrontend 2019-12-10 16:42:23.285163 I Display: Using 1920x1080 60.000 Hz 2019-12-10 16:42:23.285206 I Display: SwitchToGUI: Switched to 1920x1080 60.000 Hz 2019-12-10 16:42:23.297052 I LIRC: Successfully initialized '/var/run/lirc/lircd' using '/home/klaas/.mythtv/lircrc' config 2019-12-10 16:42:23.298410 I No joystick configuration found, not enabling joystick control [New Thread 0x7fff22bd3700 (LWP 4948)] [Thread 0x7fff22bd3700 (LWP 4948) exited] [New Thread 0x7fff22bd3700 (LWP 4949)] 2019-12-10 16:42:23.444811 E CECAdapter: Failed to find any CEC devices. 2019-12-10 16:42:23.444912 I CECAdapter: Closing down CEC. 2019-12-10 16:42:23.444934 I UDPListener: Enabling 2019-12-10 16:42:23.446443 I Binding to UDP 0.0.0.0:6948 2019-12-10 16:42:23.446472 I Binding to UDP [::]:6948 2019-12-10 16:42:23.511798 I Using Frameless Window 2019-12-10 16:42:23.511803 I Using Full Screen Window 2019-12-10 16:42:23.527843 I Display: New main widget 2019-12-10 16:42:23.527862 I Display: Found screen number 0 (HDMI-0) 2019-12-10 16:42:23.527888 I UI Screen Resolution: 1920 x 1080 Thread 1 "mythfrontend" received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in () #1 0x00007fffd35ff993 in () at /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so #2 0x00007fffd3600dbd in () at /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so #3 0x00007fffd35febb7 in () at /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so #4 0x00007fffd69378c1 in QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext*) const () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #5 0x00007ffff48a607f in QOpenGLContext::create() () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #6 0x00007ffff6583654 in MythRenderOpenGL::setWidget(QWidget*) (this=0x555555cd5200, Widget=0x7fffc0014500) at opengl/mythrenderopengl.cpp:525 #7 0x00007ffff6422775 in MythPainterWindowGL::MythPainterWindowGL(MythMainWindow*, MythMainWindowPrivate*, MythRenderOpenGL*) (this=0x7fffc0014500, win=0x555555ce0ef0, priv=0x555555ce2820, rend=0x555555cd5200) at mythmainwindow.cpp:352 #8 0x00007ffff642659b in MythMainWindow::Init(QString const&, bool) (this=0x555555ce0ef0, forcedpainter=..., mayReInit=false) at mythmainwindow.cpp:1116 #9 0x00005555555d5fbe in main(int, char**) (argc=1, argv=0x7fffffffe378) at main.cpp:2091 (gdb)
When I start mythtv-setup on this box the crash is the same.
I do not have a problem running the same mythtv version on Fedora-31 boxes using only the Intel built-in graphics.
Attachments (1)
Change History (11)
comment:1 Changed 5 years ago by
Resolution: | → Works for me |
---|---|
Status: | new → closed |
comment:2 Changed 5 years ago by
Resolution: | Works for me |
---|---|
Status: | closed → new |
Reopening this ticket after confirmation that Ubuntu version 18 and the Nvidia driver version 340 is a combination that should work with mythtv master.
The frontend crash has also been reported on the mailing list ( see https://forum.mythtv.org/viewtopic.php?f=36&t=3494) for Nvidia ION where the latest available driver is version 340.
comment:3 Changed 5 years ago by
Owner: | set to Mark Kendall |
---|---|
Status: | new → assigned |
Backtrace with today's master with mythtv-setup and nvidia driver 340:
Thread 1 "mythtv-setup" received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in () #1 0x00007fffd41ff993 in () at /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so #2 0x00007fffd4200dbd in () at /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so #3 0x00007fffd41febb7 in () at /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so #4 0x00007fffd75378c1 in QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext*) const () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #5 0x00007ffff517007f in QOpenGLContext::create() () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #6 0x00007ffff6591d75 in MythRenderOpenGL::SetWidget(QWidget*) (this=0x555555868640, Widget=0x55555596c990) at opengl/mythrenderopengl.cpp:522 #7 0x00007ffff64295e1 in MythPainterWindowGL::MythPainterWindowGL(MythMainWindow*, MythMainWindowPrivate*, MythRenderOpenGL*) (this=0x55555596c990, win=0x555555947370, priv=0x5555558cdf90, rend=0x555555868640) at mythmainwindow.cpp:351 #8 0x00007ffff642d251 in MythMainWindow::Init(bool) (this=0x555555947370, mayReInit=true) at mythmainwindow.cpp:1098 #9 0x000055555559160c in main(int, char**) (argc=1, argv=0x7fffffffe348) at main.cpp:564 (gdb) fr 6 #6 0x00007ffff6591d75 in MythRenderOpenGL::SetWidget (this=0x555555868640, Widget=0x55555596c990) at opengl/mythrenderopengl.cpp:522 522 if (!create()) (gdb) l 517 // Ensure surface type is always OpenGL 518 m_window->setSurfaceType(QWindow::OpenGLSurface); 519 if (native && native->windowHandle()) 520 native->windowHandle()->setSurfaceType(QWindow::OpenGLSurface); 521 522 if (!create()) 523 LOG(VB_GENERAL, LOG_CRIT, LOC + "Failed to create OpenGLContext!"); 524 else 525 Widget->setAttribute(Qt::WA_PaintOnScreen); 526 } (gdb) fr 7 #7 0x00007ffff64295e1 in MythPainterWindowGL::MythPainterWindowGL (this=0x55555596c990, win=0x555555947370, priv=0x5555558cdf90, rend=0x555555868640) at mythmainwindow.cpp:351 351 m_render->SetWidget(this); (gdb) l 346 setAttribute(Qt::WA_DontCreateNativeAncestors); 347 winId(); 348 #ifdef Q_OS_MACOS 349 setVisible(true); // must be visible before OpenGL initialisation on OSX 350 #endif 351 m_render->SetWidget(this); 352 } 353 354 QPaintEngine *MythPainterWindowGL::paintEngine() const 355 { (gdb)
comment:4 Changed 5 years ago by
Milestone: | needs_triage → 31.0 |
---|---|
Priority: | minor → blocker |
Severity: | medium → high |
Status: | assigned → accepted |
Thanks Klaas. I've finally managed to reproduce the issue - but no closer to figuring out what is causing it.
comment:6 Changed 5 years ago by
The missing libGLX is a good point, have added this now and the crash is gone but now it hangs.....
Changed settings.pro to add libGLX:
diff --git a/mythtv/settings.pro b/mythtv/settings.pro index 3f49f9943f..dbff360cca 100755 --- a/mythtv/settings.pro +++ b/mythtv/settings.pro @@ -229,6 +229,9 @@ win32 { EXTRA_LIBS += $$CONFIG_OPENGL_LIBS } + # KdW hack + EXTRA_LIBS += -lGLX + # remove warn_{on|off} from CONFIG since we set it in our CFLAGS CONFIG -= warn_on warn_off
The resulting mythfrontend does now link to libGLX and it now goes beyond the "create" call in which it crashed previously. This is the log now:
Dec 30 14:03:48 myth3 mythfrontend: mythfrontend[1182]: I CoreContext mythmainwindow.cpp:1004 (Init) Using Frameless Window Dec 30 14:03:48 myth3 mythfrontend: mythfrontend[1182]: I CoreContext mythmainwindow.cpp:1020 (Init) Using Full Screen Window Dec 30 14:03:48 myth3 mythfrontend: mythfrontend[1182]: I CoreContext mythdisplay.cpp:145 (SetWidget) Display: New main widget Dec 30 14:03:48 myth3 mythfrontend: mythfrontend[1182]: I CoreContext mythdisplay.cpp:241 (GetDesiredScreen) Display: Found screen number 0 (HDMI-0) Dec 30 14:03:48 myth3 mythfrontend: mythfrontend[1182]: I CoreContext mythmainwindow.cpp:1053 (Init) UI Screen Resolution: 1920 x 1080 Dec 30 14:03:48 myth3 mythfrontend: mythfrontend[1182]: C CoreContext opengl/mythrenderopengl.cpp:523 (SetWidget) OpenGL: Failed to create OpenGLContext! Dec 30 14:03:48 myth3 mythfrontend: mythfrontend[1182]: E CoreContext opengl/mythrenderopengl.cpp:217 (Init) OpenGL: MythRenderOpenGL is not a valid OpenGL rendering context Dec 30 14:03:48 myth3 mythfrontend: mythfrontend[1182]: W CoreContext mythmainwindow.cpp:1106 (Init) OpenGL painter not recommended with this system's hardware/drivers. Falling back to Qt painter. Dec 30 14:03:48 myth3 mythfrontend: mythfrontend[1182]: I CoreContext opengl/mythrenderopengl.cpp:142 (~MythRenderOpenGL) OpenGL: MythRenderOpenGL closing Dec 30 14:03:48 myth3 mythfrontend: mythfrontend[1182]: W CoreContext opengl/mythrenderopengl.#003:210 (contextToBeDestroyed) OpenGL: Context about to be destroyed D
Mythfrontend keeps running but the problem is now that there appears nothing on the screen.
comment:7 Changed 5 years ago by
So GLX was a bit of a red herring.
The actual crash is at the first point the Qt platform plugin tries to reference an OpenGL function (glGetString I think in this case). So, long story short, the problem is actually OpenGL ES2.0 - or linking to it as well as desktop GL.
I've attached a simple patch to disable it in configure but need to work out a proper solution (that works for all of the other platforms/distributions)
Changed 5 years ago by
Attachment: | noopengles.diff added |
---|
comment:8 Changed 5 years ago by
I can confirm that disabling the opengles as described in the patch does fix the problem in my system (today's master, Ubuntu 18.04.3, Nvidia GT520, driver 340.107). Thanks!
comment:10 Changed 5 years ago by
Resolution: | → Fixed |
---|---|
Status: | accepted → closed |
I'm assuming this is now fixed.
This problem is solved by updating the NVIDIA driver from version 340.107 to version 390.129 with the following steps:
This works for me because my card, the GT-520, was new enough to be supported by the 390 driver. Older cards that only have older drivers will not work with today's mythtv pre-31.