Bug 1217 - SIGSEGV in glXMakeCurrentReadSGI during NativeWindowFactory_ShutdownHook seen on Asus EEEPC 700 "the first netbook"
Summary: SIGSEGV in glXMakeCurrentReadSGI during NativeWindowFactory_ShutdownHook seen...
Status: UNCONFIRMED
Alias: None
Product: Jogl
Classification: JogAmp
Component: x11 (show other bugs)
Version: tbd
Hardware: pc_x86_32 linux
: --- enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2015-09-15 09:41 CEST by Xerxes Rånby
Modified: 2015-10-09 06:27 CEST (History)
1 user (show)

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments
test_dbg.log and hs_err_pid15968.log (149.42 KB, application/force-download)
2015-09-15 09:41 CEST, Xerxes Rånby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xerxes Rånby 2015-09-15 09:41:20 CEST
Created attachment 732 [details]
test_dbg.log and hs_err_pid15968.log

Asus EEEPC 700 "the first netboot" from 2007 trigger a SIGSEGV in glXMakeCurrentReadSGI during NativeWindowFactory_ShutdownHook

tested using
gluegen_886-joal_612-jogl_1433-jocl_1079-signed
JogAmp JOGL 2.3.2-rc-20150829

java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)

OS: Xandros running KDE and IceWM

Mesa3D: 
Swap Interval  1
GL Profile     GLProfile[GL2/GL2.sw]
GL Version     1.3 (Compat profile, compat[], hardware) - 1.3 Mesa 6.5.1 [GL 1.3.0, vendor 6.5.1 (Mesa 6.5.1)]
Quirks         [NoDoubleBufferedPBuffer, NoSetSwapIntervalPostRetarget, NoSurfacelessCtx]
Impl. class    jogamp.opengl.gl4.GL4bcImpl
GL_VENDOR      Tungsten Graphics, Inc
GL_RENDERER    Mesa DRI Intel(R) 915GM 20050225
GL_VERSION     1.3 Mesa 6.5.1
GLSL           false, has-compiler-func: true
GL FBO: basic false, full false
GL_EXTENSIONS  80
GLX_EXTENSIONS 21 

The crash can be reproduced by using the default installed java plugin and visiting the 
http://jogamp.org/deployment/archive/master/gluegen_886-joal_612-jogl_1433-jocl_1079-signed/jogl-applet-version-napplet.html url
the crash is then triggered when the user exiting the page, taking down the plugin and webbrowser.

The crash can also be reproduced by running a
sh etc/test.sh
sh etc/test_dbg.sh
runtime version check or debug log (attached).

Backtrace from hs_err_pid15968.log

#  SIGSEGV (0xb) at pc=0xb4d641f0, pid=15968, tid=3037985680
#
# Java VM: Java HotSpot(TM) Client VM (11.2-b01 mixed mode, sharing linux-x86)
# Problematic frame:
# C  0xb4d641f0

C  0xb4d641f0
C  [libGL.so.1+0x17e40]  glXMakeCurrentReadSGI+0x290
C  [libjogl_desktop.so+0x891ef]  Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXMakeContextCurrent0__JJJJJ+0x60
j  jogamp.opengl.x11.glx.GLX.dispatch_glXMakeContextCurrent0(JJJJJ)Z+0
j  jogamp.opengl.x11.glx.GLX.glXMakeContextCurrent(JJJJ)Z+45
j  jogamp.opengl.x11.glx.X11GLXContext.glXMakeContextCurrent(JJJJ)Z+16
j  jogamp.opengl.x11.glx.X11GLXContext.makeCurrentImpl()V+33
j  jogamp.opengl.GLContextImpl.makeCurrentWithinLock(I)I+723
j  jogamp.opengl.GLContextImpl.makeCurrent(Z)I+488
j  jogamp.opengl.GLContextImpl.makeCurrent()I+2
j  jogamp.opengl.GLContextImpl.destroy()V+255
j  jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.releaseSharedResource(Ljogamp/opengl/SharedResourceRunner$Resource;)V+149
j  jogamp.opengl.SharedResourceRunner.releaseSharedResources()V+46
j  jogamp.opengl.SharedResourceRunner.run()V+453
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub


Output from test_dbg.log

Window DestroyAction() hasScreen true, isNativeValid true - main-Display-.x11_:0.0-1-EDT-1
consumeWindowEvent: WindowEvent[EVENT_WINDOW_DESTROY_NOTIFY, NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1442307721929 d 0ms]], visible false 569/30, win[569/30 128x128], pixel[128x128]
GLWindow.destroy() main-Display-.x11_:0.0-1-EDT-1, start
main-Display-.x11_:0.0-1-EDT-1: GLContextImpl.destroy.0: obj 0x1e8a1f6, ctx 0x87b7850, isShared false, surf true 0x3000002, <54a328, a3d4cf>[count 1, qsz 0, owner <main-Display-.x11_:0.0-1-EDT-1>]
main-Display-.x11_:0.0-1-EDT-1: GLContext.resetStates(isInit false)
main-Display-.x11_:0.0-1-EDT-1: GLContextImpl.destroy.X: obj 0x1e8a1f6, ctx 0x0, isShared false, surf true 0x3000002, <54a328, a3d4cf>[count 0, qsz 0, owner <NULL>]
main-Display-.x11_:0.0-1-EDT-1: setRealized: drawable X11OnscreenGLXDrawable, surface WindowDriver, isProxySurface false: true -> false
    [2]: jogamp.opengl.GLDrawableImpl.setRealized(GLDrawableImpl.java:176)
    [3]: jogamp.opengl.GLAutoDrawableBase.destroyImplInLock(GLAutoDrawableBase.java:384)
    [4]: com.jogamp.newt.opengl.GLWindow.access$300(GLWindow.java:119)
    [5]: com.jogamp.newt.opengl.GLWindow$GLLifecycleHook.destroyActionInLock(GLWindow.java:631)
    [6]: jogamp.newt.WindowImpl$1.run(WindowImpl.java:1407)
    [7]: com.jogamp.common.util.RunnableTask.run(RunnableTask.java:150)
    [8]: jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:372)
GLWindow.destroy() main-Display-.x11_:0.0-1-EDT-1, fin
main-Display-.x11_:0.0-1-EDT-1 - X11GraphicsDevice.close(): X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x87a2cd8, owner true, ResourceToolkitLock[obj 0x1995d80, isOwner false, <17ee8b8, e0b6f5>[count 0, qsz 0, owner <NULL>]]]
X11Util.Display: Closed (real: true) NamedX11Display[:0.0, 0x87a2cd8, refCount 0, unCloseable false]. Thread main-Display-.x11_:0.0-1-EDT-1
Screen.removeReference() (main-Display-.x11_:0.0-1-EDT-1): 1 -> 0
Screen.destroy() (main-Display-.x11_:0.0-1-EDT-1): active 0
ScreenMonitorState.removeListener (size: 0): NEWT-Screen[.x11_:0.0-1-s0, idx 0, refCount 0, vsize [ 0 / 0  800 x 480 ] [pixels], [ 0 / 0  800 x 480 ] [window], X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x87bf308, owner true, ResourceToolkitLock[obj 0x12d3205, isOwner false, <1b383e9, 99681b>[count 0, qsz 0, owner <NULL>]]], idx 0], NEWT-Display[.x11_:0.0-1, excl false, refCount 1, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x87bf308, owner true, ResourceToolkitLock[obj 0x12d3205, isOwner false, <1b383e9, 99681b>[count 0, qsz 0, owner <NULL>]]]], monitors: [Monitor[Id 0x1 [primary], 203 x 121 mm, pixelScale [1.0, 1.0], viewport [ 0 / 0  800 x 480 ] [pixels], [ 0 / 0  800 x 480 ] [window], orig [Id 0x0, [ 800 x 480 pixels x 32 bpp ] @ 61.0 Hz, flags [], 0 degr], curr [Id 0x0, [ 800 x 480 pixels x 32 bpp ] @ 61.0 Hz, flags [], 0 degr], modeChanged false, modeCount 32]]]
ScreenMonitorState.unmap .x11_:0.0-1-s0 -> jogamp.newt.ScreenMonitorState@186768e
Display.removeReference() (main-Display-.x11_:0.0-1-EDT-1): 1 -> 0
Display.destroy(.x11_:0.0-1) BEGIN DisplayList[] entries: 1 - main-Display-.x11_:0.0-1-EDT-1
  [0] : NEWT-Display[.x11_:0.0-1, excl false, refCount 0, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x87bf308, owner true, ResourceToolkitLock[obj 0x12d3205, isOwner false, <1b383e9, 99681b>[count 0, qsz 0, owner <NULL>]]]], GC'ed false
Display.destroy(): NEWT-Display[.x11_:0.0-1, excl false, refCount 0, hasEDT true, edtRunning true, X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x87bf308, owner true, ResourceToolkitLock[obj 0x12d3205, isOwner false, <1b383e9, 99681b>[count 0, qsz 0, owner <NULL>]]]], active 0 main-Display-.x11_:0.0-1-EDT-1
Thread[main-Display-.x11_:0.0-1-EDT-1,5,main]: Default-EDT.invokeStop wait true
    [2]: jogamp.newt.DefaultEDTUtil.invokeStop(DefaultEDTUtil.java:148)
    [3]: jogamp.newt.DisplayImpl.stopEDT(DisplayImpl.java:398)
    [4]: jogamp.newt.DisplayImpl.destroy(DisplayImpl.java:471)
    [5]: jogamp.newt.DisplayImpl.removeReference(DisplayImpl.java:550)
    [6]: jogamp.newt.ScreenImpl.destroy(ScreenImpl.java:225)
    [7]: jogamp.newt.ScreenImpl.removeReference(ScreenImpl.java:250)
    [8]: jogamp.newt.WindowImpl.removeScreenReference(WindowImpl.java:798)
    [9]: jogamp.newt.WindowImpl.access$1400(WindowImpl.java:96)
    [10]: jogamp.newt.WindowImpl$1.run(WindowImpl.java:1422)
    [11]: com.jogamp.common.util.RunnableTask.run(RunnableTask.java:150)
    [12]: jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:372)
main-Display-.x11_:0.0-1-EDT-1 - X11GraphicsDevice.close(): X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x87bf308, owner true, ResourceToolkitLock[obj 0x12d3205, isOwner false, <1b383e9, 99681b>[count 0, qsz 0, owner <NULL>]]]
X11Util.Display: Closed (real: true) NamedX11Display[:0.0, 0x87bf308, refCount 0, unCloseable false]. Thread main-Display-.x11_:0.0-1-EDT-1
Thread[main-Display-.x11_:0.0-1-EDT-1,5,main]: Default-EDT signal STOP X edt: Thread[main-Display-.x11_:0.0-1-EDT-1,5,main]
Display.destroy(.x11_:0.0-1) END DisplayList[] entries: 1 - main-Display-.x11_:0.0-1-EDT-1
  [0] : NEWT-Display[.x11_:0.0-1, excl false, refCount 0, hasEDT true, edtRunning false, null], GC'ed false
consumeWindowEvent: WindowEvent[EVENT_WINDOW_DESTROYED, NEWTEvent[source:jogamp.newt.driver.x11.WindowDriver, consumed false, when:1442307722021 d 0ms]], visible false 569/30, win[569/30 128x128], pixel[128x128]
Window.destroy() END main-Display-.x11_:0.0-1-EDT-1
main-Display-.x11_:0.0-1-EDT-1: Default-EDT finished w/ 0 left, null
main-Display-.x11_:0.0-1-EDT-1: Default-EDT finished w/ 0 left EXIT, exception: null
NativeWindowFactory.shutdown() START: JVM Shutdown true, on thread NativeWindowFactory_ShutdownHook
NativeWindowFactory.shutdown - customShutdownHook #1/2
Window.shutdownAll 1 instances, on thread NativeWindowFactory_ShutdownHook
Window.shutdownAll[1/1]: 0x0, GCed false
Screen.shutdownAll 1 instances, on thread NativeWindowFactory_ShutdownHook
Screen.shutdownAll[1/1]: NEWT-Screen[.x11_:0.0-1-s0, idx 0, refCount 0, vsize [ 0 / 0  800 x 480 ] [pixels], [ 0 / 0  800 x 480 ] [window], null, NEWT-Display[.x11_:0.0-1, excl false, refCount 0, hasEDT true, edtRunning false, null], monitors: null], GCed false
Display.shutdownAll 1 instances, on thread NativeWindowFactory_ShutdownHook DisplayList[] entries: 1 - NativeWindowFactory_ShutdownHook
  [0] : NEWT-Display[.x11_:0.0-1, excl false, refCount 0, hasEDT true, edtRunning false, null], GC'ed false
Display.shutdownAll[1/1]: NEWT-Display[.x11_:0.0-1, excl false, refCount 0, hasEDT true, edtRunning false, null], GCed false
NativeWindowFactory.shutdown - customShutdownHook #2/2
GLDrawableFactory.shutdownAll 2 instances, on thread NativeWindowFactory_ShutdownHook
GLDrawableFactory.shutdownAll[1/2]:  jogamp.opengl.x11.glx.X11GLXDrawableFactory
DisplayGamma: Reset
X11GLXDrawableFactory.shutdown
SharedResourceRunner.stop() - NativeWindowFactory_ShutdownHook
SharedResourceRunner.run(): RELEASE START - main-SharedResourceRunner
Shutdown Shared:
Device  : X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x809d5d8, owner true, ResourceToolkitLock[obj 0x56a499, isOwner false, <cd2c3c, 13582d>[count 0, qsz 0, owner <NULL>]]]
Screen  : X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x809d5d8, owner true, ResourceToolkitLock[obj 0x56a499, isOwner false, <cd2c3c, 13582d>[count 0, qsz 0, owner <NULL>]]], idx 0]
Drawable: X11OnscreenGLXDrawable[Realized true,
	Factory   jogamp.opengl.x11.glx.X11GLXDrawableFactory@13d93f4,
	Handle    0x2e00002,
	Surface   WrappedSurface[ displayHandle 0x809d5d8
, surfaceHandle 0x2e00002
, size 64x64
, UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ]
, X11GLXGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x809d5d8, owner true, ResourceToolkitLock[obj 0x56a499, isOwner false, <cd2c3c, 13582d>[count 0, qsz 0, owner <NULL>]]], idx 0], visualID 0x23, fbConfigID 0x23,
	requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]],
	chosen    GLCaps[glx vid 0x23, fbc 0x23: rgba 5/6/5/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]]
, surfaceLock <fa7e74, 183f74d>[count 0, qsz 0, owner <NULL>]
, X11DummyUpstreamSurfaceHook[pixel 64x64]
, upstreamSurface false ]]
CTX     : X11GLXContext [Version 1.3 (Compat profile, compat[], hardware) - 1.3 Mesa 6.5.1 [GL 1.3.0, vendor 6.5.1 (Mesa 6.5.1)], options 0x2, this 0x173831b, handle 0x8107390, isShared false, jogamp.opengl.gl4.GL4bcImpl@fc9944,
	 quirks: [NoDoubleBufferedPBuffer, NoSetSwapIntervalPostRetarget, NoSurfacelessCtx],
	Drawable: X11OnscreenGLXDrawable[Realized true,
	Factory   jogamp.opengl.x11.glx.X11GLXDrawableFactory@13d93f4,
	Handle    0x2e00002,
	Surface   WrappedSurface[ displayHandle 0x809d5d8
, surfaceHandle 0x2e00002
, size 64x64
, UOB[ OWNS_SURFACE | WINDOW_INVISIBLE ]
, X11GLXGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x809d5d8, owner true, ResourceToolkitLock[obj 0x56a499, isOwner false, <cd2c3c, 13582d>[count 0, qsz 0, owner <NULL>]]], idx 0], visualID 0x23, fbConfigID 0x23,
	requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]],
	chosen    GLCaps[glx vid 0x23, fbc 0x23: rgba 5/6/5/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]]
, surfaceLock <fa7e74, 183f74d>[count 0, qsz 0, owner <NULL>]
, X11DummyUpstreamSurfaceHook[pixel 64x64]
, upstreamSurface false ]], direct true] 
    [2]: jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.releaseSharedResource(X11GLXDrawableFactory.java:324)
    [3]: jogamp.opengl.SharedResourceRunner.releaseSharedResources(SharedResourceRunner.java:371)
    [4]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [5]: java.lang.Thread.run(Unknown Source)
main-SharedResourceRunner: GLContextImpl.destroy.0: obj 0x173831b, ctx 0x8107390, isShared false, surf true 0x2e00002, <1546e25, b66cc>[count 0, qsz 0, owner <NULL>]
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xb4d641f0, pid=15968, tid=3037985680
#
# Java VM: Java HotSpot(TM) Client VM (11.2-b01 mixed mode, sharing linux-x86)
# Problematic frame:
# C  0xb4d641f0
#
# An error report file with more information is saved as:
# /media/USB Flash Disk/USB_DISK/jogamp-all-platforms/hs_err_pid15968.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Comment 1 Xerxes Rånby 2015-09-15 19:16:46 CEST
this bug is still reproducible using the 15-Sep-2015 17:11 test build:
http://jogamp.org/deployment/archive/master/gluegen_888-joal_614-jogl_1438-jocl_1083-signed/jogl-applet-version-napplet.html