Bug 515

Summary: X11 AMD/ATI fglrx driver SIGSEGV (XQueryExtension, _XSend) if multiple Display connections are used.
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: x11Assignee: Sven Gothel <sgothel>
Status: VERIFIED FIXED    
Severity: major    
Priority: ---    
Version: 2   
Hardware: pc_all   
OS: linux   
Type: --- SCM Refs:
b54497155815852744adb657816cb4057948dae2
Workaround: TRUE
Attachments: Multiple X11 Display Connection Test

Description Sven Gothel 2011-08-31 15:28:22 CEST
Created attachment 265 [details]
Multiple X11 Display Connection Test

It is observed that ATI X11 drivers, eg. fglrx 8.78.6 upto fglrx 11.08/8.881,
are quite sensitive to multiple Display connections.

Here, closing displays shall happen in the same order as
they were opened, -OR- shall not be closed at all!

Otherwise some driver related bug appears and brings down the JVM
with an SIGSEGV.

You may test this, ie just reverse the destroy order below.
See also native test: jogl/test/native/displayMultiple02.c (attached)
Comment 1 Sven Gothel 2011-08-31 15:39:23 CEST
Since we cannot fix the driver .. this is a workaround avoiding SIGSEGV.

We don't close the X11 Display connection if driver vendor is ATI
via 'X11Util.markDisplayUncloseable(true)'.
This is currently exercised in X11GLXDrawableFactory shared resource initialization.

FIXME: To allow this workaround to function w/o JOGL usage, 
this detection and setting shall happen in X11Util itself, if we could query the driver vendor w/o GLX.