Comment 8 for bug 189580

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.