BUG: SIGSEGV upon exit

Hello All,

I am running SuSE 9.1 Pro , I have a TNT2 card , I am using NVidia driver 6106 (NVIDIA-Linux-x86-1.0-6106-pkg1.run).This is all about JOGL 1.1b3.JOGL generally operates right , but any jogl app I have run exits with SIGSEGV (including the gears demo shipped with the beta , and the code bellow).Everything is right , until the app exits.Upon exit I get:

An unexpected error has been detected by HotSpot Virtual Machine:

SIGSEGV (0xb) at pc=0x468439d2, pid=8318, tid=1167641520

Java VM: Java HotSpot™ Client VM (1.5.0-beta2-b51 mixed mode, sharing)

Problematic frame:

C [libGLcore.so.1+0x2e69d2] _nv000832gl+0x12

An error report file with more information is saved as hs_err_pid8318.log

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

Aborted

This has been tested with both java 1.4.2_05 and 1.5b2.This all started after the driver update , however all native OGL apps run fine (glxgears included),so it may not be driver only.For concreteness I am attaching a sample that crashes.It creates a window,GLCanvas, and when you press ‘q’ to quit System.exit(0) is called and BOOM!

Sample code:

import net.java.games.jogl.*;

import java.awt.;
import java.awt.event.
;

public class JCrash {
public static void main(String[] args) {
Frame frame = new Frame(“JCrash”);
GLDrawableFactory factory = GLDrawableFactory.getFactory();
GLCapabilities cap = new GLCapabilities();
GLCanvas canvas = factory.createGLCanvas(cap);
canvas.addKeyListener(new KeyListener(){
public void keyPressed(KeyEvent e) {
if (e.getKeyChar() == ‘q’) {
System.out.println(“Calling System.exit(0)”);
System.exit(0);
}
}
public void keyReleased(KeyEvent e) { }
public void keyTyped(KeyEvent e) { }

            });
            frame.add(canvas);                
            frame.pack();
            frame.setVisible(true);
    }

}

Output:

Calling System.exit(0)

An unexpected error has been detected by HotSpot Virtual Machine:

SIGSEGV (0xb) at pc=0x468439d2, pid=8380, tid=1167641520

Java VM: Java HotSpot™ Client VM (1.5.0-beta2-b51 mixed mode, sharing)

Problematic frame:

C [libGLcore.so.1+0x2e69d2] _nv000832gl+0x12

An error report file with more information is saved as hs_err_pid8380.log

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

Aborted

Any suggestions or comments are wellcome.

Ivan Yosifov.

I’m not expert here, but do you know what version of libGLcore.so you have, maybe you just have an old version of that particular file and an update could cure it. I don’t use *nix environments much, so I can’t really help with the problem, but this is where I’d start looking (in case you hadn’t yet).

libGLcore’s version is 6106 (the version of the driver).I don’t think this is a version mismatch problem.Any other ideas ?

Could you try the 1.1 beta 4 release that was just posted?

This problem seems not to be specific to JOGL – any Java3D app crashes exactly the same way as well. The topic was posted two weeks ago in the nvidia linux forum at http://www.nvnews.net/vbulletin/forumdisplay.php?f=14, but to no avail so far :frowning:

System: RedHat 7.3, Quadro 380 XGL, nvidia 1.0-6106, java 1.4.2_04 or any
recent 1.5.0 snapshot, Java3D 1.3.1.

-chris

This is definitely not a JOGL problem.The exactly same thing happens on exit by an Swing app with OpenGL pipeline enabled on Tiger Beta 2.I have filed a bug report for that http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5073409.
In addition all worked nice with previous NVidia driver (although glGears ran at half the fps they run at now).When using JOGL beta 3 on IBM’s jdk 1.4.2 there is NO crash at all.I will test Beta 4 when I have time (pretty busy lately).Though obviously not a JOGL problem it would be nice if JOGL contained some sort of workaround , if possible.

Workaround for exit crashes with nvidia 1.0-6106:

Make your Java application exit cleanly without calling System.exit().
This is a bit tricky to do: you’ll have to dispose() all top-level windows,
terminate your non-daemon helper threads, etc., there’s more
information on that subject in

http://java.sun.com/j2se/1.5.0/docs/api/java/awt/doc-files/AWTThreadIssues.html

I succeeded in doing this for my own application that uses OpenGL
through JNI with Java 1.5.0-beta3-b57: it now exits smoothly without crashing.
It seems to be important to use Java 1.5, as AFAIK, a few related bugfixes have only been committed to this release.

The same might work for JOGL.

This crash, in the context of Java3D, was filed as Java bug #5073103, see
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5073103

HTH,
-chris

Thanks , I will try that. It is not 1.5 specific.The crash occurs both on Sun 1.5 and Sun 1.4 and NOT on IBM 1.4 (heads up SUN).

Tried with 1.1b04 , same story.Ken wanted to know.

Could someone please file an Issue with the information above (specifically that in limo42’s post)? It should be low-priority, as it isn’t really a JOGL bug, but we may be able to figure out some sort of workaround.

Ken,

I fear this won’t be of much use anymore, as my workaround no longer does the trick with nvidia 1.0-6111. It looks now very much like a waste of time :frowning:
I think we’ll just have to monitor nvidia’s next releases and progress on the related Java bugs:
#5073103: java3d HelloUniverse runs but exiting produces the following message
#5073409: OGL: VM crash (SIGSEGV) on exit by ANY swing app on Nvidia 6106 drivers

-chris

Just a quick update to the current state of affairs:

Java bug #5073103 has been closed as “not a bug”. Quoting
from the report at sun’s bug database, it’s apparently an nvidia
problem:

Evaluation

xxxxx@xxxxx 2004-09-07

This is an NVIDIA driver bug introduced in their 6106 build. We
have filed it with NVIDIA, but they don’t have a fix yet. It’s still
broken in the 6111 driver.

And the comment to this issue from one of the guys in the NVIDIA
Linux Forum at www.nvnews.net (do a search for Java3D):

Yes, this is a known problem that will be addressed in a future
NVIDIA Linux driver release.

-chris

The exit crash is fixed for my app by the nvidia driver release 1.0-6629.
-chris