United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7144542 [macosx] Crash in liblwawt.dylib setBusy() when exiting an FX app run with j2d pipeline
7144542 : [macosx] Crash in liblwawt.dylib setBusy() when exiting an FX app run with j2d pipeline

Details
Type:
Bug
Submit Date:
2012-02-10
Status:
Closed
Updated Date:
2012-05-21
Project Name:
JDK
Resolved Date:
2012-05-04
Component:
client-libs
OS:
generic
Sub-Component:
java.awt
CPU:
generic
Priority:
P3
Resolution:
Cannot Reproduce
Affected Versions:
8
Fixed Versions:
8

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

Description
Run an FX app (e.g. HelloRectangle toy) with J2D:

java -Dprism.order=j2d -cp /jfx/artifacts/sdk/rt/lib/jfxrt.jar:dist/HelloWorld.jar helloworld.HelloRectangle

Java will crash after closing the application.

Note:

1. This happens with both latest Oracle JDK Mac Port build, as well as the latest Java update for Apple JDK.

2. This isn't happening with older builds of Oracle Mac Port (e.g. I've tried a build from early Dec 2011 and it won't crash; I assume that older Apple JDKs didn't crash either since the problem manifested itself only now).

More details: http://javafx-jira.kenai.com/browse/RT-19541

The crash log:

Stack: [7fff65055000,7fff65855000],  sp=7fff658523e0,  free space=8180k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.dylib+0x27f3ae]  ThreadStateTransition::trans_from_native(JavaThreadState)+0xa
V  [libjvm.dylib+0x277a19]  jni_CallStaticVoidMethodV+0x3d
C  [JavaNativeFoundation+0x3c20]  JNFCallStaticVoidMethod+0xae
C  [liblwawt.dylib+0xde46]  setBusy+0x79
C  [CoreFoundation+0x63bd7]  __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__+0x17
C  [CoreFoundation+0x63b36]  __CFRunLoopDoObservers+0x176
C  [CoreFoundation+0x38dd6]  __CFRunLoopRun+0x426
C  [CoreFoundation+0x38676]  CFRunLoopRunSpecific+0xe6
C  [java+0x5cb4]  CreateExecutionEnvironment+0x349
C  [java+0x37b8]  JLI_Launch+0x78d
C  [java+0x7a30]  main+0x6c
C  [java+0x13f4]  start+0x34

                                    

Comments
EVALUATION

I've copied the JVM from JDK8 to my build of JDK 7u6 and that didn't help.

Further investigation revealed that the actual problem was that we were loading the headfull lwawt dynamic library even though the headless mode was explicitly requested. If we load the headless version of the library (which corresponds to what JDK 8 does on the Mac), the crash is no longer reproducible.

Note that this Evaluation entry relates to the the 7u6 SubCR of the bug. On JDK 8 the issue isn't reproducible, so I'm closing this SubCR.
                                     
2012-05-04
EVALUATION

There was some synchronization performed, and the current state of 7u6 seems to be very close to what we have in 7u4 now. However, the HotSpot version is stil 23b21 in 7u6, and the crash is still reproducible.

I believe that this is a HotSpot bug and not a JDK/AWT issues.
                                     
2012-05-03
EVALUATION

It is still failing with the latest 7u4 build. Interesting, that according to the log the actual crash happens in HotSpot code, and -version says:

JDK8: HotSpot 24.0-b07

7u4:  HotSpot 23.0-b21

So I suspect this is actually a HotSpot bug which is fixed in the recent JVM code.

We need to wait till all fixes from 7u4 reach 7u6, and then re-test the issue (because currently the j2d pipleing is unuabale with 7u6). After that we may want to discuss this issue with HotSpot team.
                                     
2012-04-20
EVALUATION

I've reverted the workaround introduced with RT-19600, and this issue is not reproducible with the latest JDK 8 build anymore.
                                     
2012-04-19



Hardware and Software, Engineered to Work Together