mythfrontend.real crashed with SIGSEGV in glXMakeCurrentReadSGI()

Bug #189580 reported by Mario Limonciello
36
Affects Status Importance Assigned to Milestone
Mesa
Fix Released
Medium
MythTV
Invalid
Unknown
mesa (Ubuntu)
Fix Released
Undecided
Unassigned
mythtv (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: mythtv

This happened when leaving a laptop running overnight. It's got an ATI FireGL T2 128, and is using the free driver. Tried to close mythfrontend, but it wouldn't react to the close properly, until eventually it crashed.

ProblemType: Crash
Architecture: i386
CrashCounter: 1
Date: Wed Feb 6 01:56:31 2008
Disassembly: 0xb29e8e10:
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/mythfrontend.real
NonfreeKernelModules: ath_hal
Package: mythtv-frontend 0.20.99+trunk15689-0ubuntu3 [modified: usr/share/mythtv/main_settings.xml]
PackageArchitecture: i386
ProcCmdline: /usr/bin/mythfrontend.real --logfile /var/log/mythtv/mythfrontend.log
ProcCwd: /home/supermario
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Signal: 11
SourcePackage: mythtv
StacktraceTop:
 ?? ()
 glXMakeCurrentReadSGI () from /usr/lib/libGL.so.1
 glXMakeCurrent () from /usr/lib/libGL.so.1
 QGLContext::doneCurrent () from /usr/lib/libqt-mt.so.3
 QGLContext::reset () from /usr/lib/libqt-mt.so.3
Title: mythfrontend.real crashed with SIGSEGV in glXMakeCurrentReadSGI()
Uname: Linux portablemario 2.6.24-5-generic #1 SMP Thu Jan 24 19:45:21 UTC 2008 i686 GNU/Linux
UserGroups: adm admin audio cdrom dialout dip floppy fuse kmem lpadmin mythtv netdev nvram plugdev powerdev scanner video

Related branches

Revision history for this message
Mario Limonciello (superm1) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Symbolic stack trace

StacktraceTop:?? ()
glXMakeCurrentReadSGI () from /usr/lib/libGL.so.1
glXMakeCurrent () from /usr/lib/libGL.so.1
QGLContext::doneCurrent (this=0x8394f50) at opengl/qgl_x11.cpp:731
QGLContext::reset (this=0x8394f50) at opengl/qgl_x11.cpp:685

Revision history for this message
Apport retracing service (apport) wrote : Symbolic threaded stack trace
Revision history for this message
Apport retracing service (apport) wrote : Stack trace with source code
Changed in mythtv:
status: New → Confirmed
Changed in mythtv:
status: Unknown → New
Changed in mythtv:
status: New → Invalid
Revision history for this message
Peter L Jones (peter-drealm) wrote :

Sounds like the same here although the app was being responsive -- I had just finished using it and chose to exit. The app then hung until the apport crash appeared.

Revision history for this message
David Morris (dave-greenacre) wrote :

Invalid upstream and is of the 0.20 branch

Changed in mythtv:
status: Confirmed → Invalid
Revision history for this message
David Morris (dave-greenacre) wrote :

isn't of the 0.20 branch but still marked invalid upstream.

Revision history for this message
Mario Limonciello (superm1) wrote :

Upstream MythTV indicated that this is actually a bug in mesa. Quoting on MythTV #4206:

For anyone keeping score at home various myth threads open and close the display for local queries. Inside X11 this eventually works its way down to dri_glx.c::OpenDriver? which dlopen's the correct .so on the first call. Subsequent calls get the handle from that initial dlopen.

Unfortunately this doesn't increment the reference count for the .so and a dlclose at the first nested XOpenDisplay/XCloseDisplay (like in libmythtv's get_glx_version) causes the dri library to be unloaded and soon after that MythTV go boom. The unload message in the initial report turned out to be the key, something I realized moments after submitting the bug.

The quick fix, and this is Linux-specific, is to tweak the inital search at the top of OpenDriver? in mesa's dri_glx.c.

Revision history for this message
Mario Limonciello (superm1) wrote :

Attaching a patch for this issue. I verified that it resolves things on my end.

Changed in mesa:
status: New → In Progress
Revision history for this message
Daniel Holbach (dholbach) wrote :

Bryce: what do you think?

Revision history for this message
laga (laga) wrote :

I've just applied this on my Gutsy box. Previously, mythfrontend would crash when exiting the "watch recordings" menu, but only if I wasn't running in fullscreen mode (eg with offsets applied). I never reported it because I thought it was a problem with my mixed Nvidia/Ati setup. After applying mesa.debdiff, I no longer get segfaults in glXMakeCurrentReadSGI(). Yay.

Revision history for this message
Bryce Harrington (bryce) wrote :

This looks safe enough to me; it's just a two liner to open the driver's dynamic library.

Changed in mesa:
status: Unknown → Confirmed
Changed in mythtv:
status: Unknown → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mesa - 7.0.3~rc2-1ubuntu1

---------------
mesa (7.0.3~rc2-1ubuntu1) hardy; urgency=low

  * Merge from debian unstable (LP: #189167), remaining changes:
    - Change maintainer address.
    - Drop lesstif-dev from Build-Depends.
    - Comment out GLw libs from control.
    - Add lpia to -dri and -dri-dbg package in debian/control.
    - Add lpia to ARCH_X86 in configs/debian-dri-default.
    - Add 101_ubuntu_hidden_glname.patch
    - Add 102_ubuntu_no_glw.patch
  * Drop patch 103_fix_rv410se.diff, applied upstream.
  * Add 103_dlopen_in_driveropen.diff and 104_fix_driveropen.diff from
    upstream; "Always call dlopen in DriverOpen". (LP: #189580)

 -- Timo Aaltonen <email address hidden> Tue, 26 Feb 2008 13:07:45 +0200

Changed in mesa:
status: In Progress → Fix Released
Changed in mesa:
status: Unknown → Fix Released
Revision history for this message
Peter Dodd (p-dodd) wrote :

I am using the Abit motherboard type Fata1ty F-I90HD with integrated graphics ATI Radeon Xpress 1250.

I am also using the Hauppauge WinTv-Nova-T-500 Tv Card.

I had to use the VGA output to install and setup Mythbuntu-8.04-beta-desktop-i386. (using HDMI output - the install failed!)

Unlike using a Nivida graphics card, the viewing of live TV programme the video frame output was not smooth but jerky.

Changing from one TV channel to another caused MythTv to fail.

I hope that this information is helpful.

Regards

Peter Dodd

Changed in mesa:
importance: Unknown → Medium
Changed in mesa:
importance: Medium → Unknown
Changed in mesa:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.