JDK-4145700 : Solaris-x86: Java2D demo SEGV filling a cubic curve path.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: solaris_2.6
  • CPU: x86
  • Submitted: 1998-06-04
  • Updated: 2001-08-06
  • Resolved: 2001-08-06
Related Reports
Relates :  
Description
b70a0, sys_thread_t:0x823a1e8, state:R) prio=6 *current thread*
        at sun.awt.color.CMM.cmmCombineTransforms(Native Method)
        at sun.awt.color.ICC_Transform.<init>(Compiled Code)
        at java.awt.image.ColorConvertOp.filter(Compiled Code)
        at demos.Colors.ColorConvert.drawDemo(Compiled Code)
        at J2DCanvas.paint(Compiled Code)
        at sun.awt.motif.MComponentPeer.handleEvent(Compiled Code)
        at java.awt.Component.dispatchEventImpl(Compiled Code)
        at java.awt.Component.dispatchEvent(Compiled Code)
        at java.awt.EventQueue.dispatchEvent(Compiled Code)
        at java.awt.EventDispatchThread.run(Compiled Code)
    "Finalizer" (TID:0xdc899560, sys_thread_t:0x80963b8, state:CW) prio=8
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(Compiled Code)
        at java.lang.ref.ReferenceQueue.remove(Compiled Code)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:128)
    "Reference Handler" (TID:0xdc899458, sys_thread_t:0x8095db8, state:CW) prio=10
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Compiled Code)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209)
    "Signal dispatcher" (TID:0xdc899328, sys_thread_t:0x808a888, state:CW) prio=10
    "Thread-5" (TID:0xdc841100, sys_thread_t:0x80501f8, state:CW) prio=5
Monitor Cache Dump:
    sun.awt.motif.MToolkit@DC8B6EB0/DC932370: owner "AWT-Input" (0x8257678) 0 entries
        Waiting to enter:
            "Rotator3D Demo" (0x88d9520)
            "MemoryMonitor" (0x86450e0)
            "PerformanceMonitor" (0x864f388)
        Waiting to be notified:
            "AWT-Motif" (0x8258758)
    java.lang.ref.ReferenceQueue$Lock@DC899578/DC8CF258: <unowned>
        Waiting to be notified:
            "Finalizer" (0x80963b8)
    com.sun.java.swing.TimerQueue@DC89EB38/DC9589B8: <unowned>
        Waiting to be notified:
            "TimerQueue" (0x856e550)
    java.lang.ref.Reference$Lock@DC899308/DC8CEF68: <unowned>
        Waiting to be notified:
            "Reference Handler" (0x8095db8)
    sun.awt.AWTFinalizer@DC8B85D8/DC96FEB0: <unowned>
        Waiting to be notified:
            "AWT-Finalizer" (0x85bbf28)
    sun.awt.ScreenUpdater@DC899BA0/DC95F2C0: <unowned>
        Waiting to be notified:
            "Screen Updater" (0x85aeb38)
Registered Monitor Dump:
    PCMap lock: <unowned>
    utf8 hash table: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class linking lock: <unowned>
    System class loader lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Monitor cache lock: <unowned>
    Dynamic loading lock: <unowned>
    Monitor IO lock: <unowned>
    User signal monitor: <unowned>
        Waiting to be notified:
            "Signal dispatcher" (0x808a888)
    Child death monitor: <unowned>
    I/O monitor: <unowned>
    Alarm monitor: <unowned>
        Waiting to be notified:
            "Internal clock" (0x80530b8)
    Thread queue lock: <unowned>
        Waiting to be notified:
            "Thread-5" (0x80501f8)
    Monitor registry: owner "AWT-EventQueue-0" (0x823a1e8) 1 entry
Abort


rekha.rangarajan@eng 1998-08-18

Java2D is still crashing with JDK-1.2fcs-F on Solaris-x86 (test machine: Dino)
Java2D crashes regardless of whether JIT is turned ON or OFF.  So, tried both
java Java2Demo and java -Djava.compiler= Java2Demo
rekha.rangarajan@eng 1998-08-18

Java2D is still crashing with Java2D:02-Sep-98@05:08 (/net/capra/export/JavaMedia/2D/builds/current/solaris).  Java2D crashes regardless of whether JIT is turned ON or OFF.  So, tried both
java Java2Demo and java -Djava.compiler= Java2Demo

rekha.rangarajan@eng 1998-09-02

==================================


phil.race@eng 1998-09-11

There have been various bugs which crashed the demo on x86.

The description in this bug report characterises several which are known
and fixed

Specifically  :-

-------

Exception occurred during event dispatching:
java.lang.NullPointerException
        at sun.awt.Albert.TBezierList.mergeArray(Compiled Code)

is the fixed JIT bug, id: 4149943, and its dup 4157675

-------------

Description: Java2D is still crashing on x86 with the C-bld.  I have some info o
n one of the seg-vios.  This time, it crashed when I attempted to go to the Colo
rs tab.

is the fixed CMM bug id 4099441, and the dup 4120723

---------------

However there remains at least one bug, which is reproducible in most
parts of the demo because it always shows up as a SEGV in the native
code which performs the pathfilling calculations.

Its a very hard and immediate SEGV which does not print out a Java stack
trace.

The way to confirm its the same crash is to obtain a core file and
run dbx, and note the stack trace.

This crash manifests itself as a runaway recursion of the function
processToRunsArc3, invoked when filling a cubic curve path.

The core dump would show a stack backtrace something like this :-

  [1] processToRunsArc3(0x841f170, 0xb40841f1, 0xf3b40841), at 0xdb9b38f3
  ...
  ...
  [507] processToRunsArc3(0x841f170, 0xb40841f1, 0xf3b40841), at 0xdb9b38f3
  [508] processToRunsArc3(0x841f170, 0xb40841f1, 0xf3b40841), at 0xdb9b38f3
  [509] RunsBuilder_appendCubic(0x841f170, 0x640841f1, 0x29640841), at 0xdb9b2a2c
  [510] appendCubic_describeTo(0x841f170, 0x80841f1, 0x90080841), at 0xdb9aea30
  [511] sendTo(0x841f170, 0xb40841f1, 0xe8b40841), at 0xdb9aec28
  [512] setOutputArea(0x841f170, 0xb40841f1, 0xf3b40841), at 0xdb9b49f3
  [513] Java_sun_dc_pr_PathFiller_setOutputArea(0x84a63bc, 0x1c084a63, 0xe61c084a), at 0xdb9af79e
  [514] sysInvokeNative(0x84a63bc, 0x60084a63, 0xf760084a), at 0xdffb0553
  [515] invokeJNINativeMethod(o = 0xdc850198, mb = 0x84109f8, args_size = 5, ee = 0x84a63bc), line 526 in "classruntime.c"
  [516] ExecuteJava_C(initial_pc = 0xdb4c9f38 "\xd6^[^A\xb1\xc4\xe3O^H\x98\xe3O^H", ee = 0x84a63bc), line 1456 in "executeJava.c"
  [517] do_execute_java_method_vararg(ee = 0x84a63bc, obj = 0xdc8c4b30, method_name = 0x8074800 "run", method_signature = 0x804fc98 "()V", mb = (nil), isStaticCall = FALSE, args = 0xdb4c9fb8, otherBits = (nil), shortFloats = FALSE), line 540 in "interpreter.c"
  [518] execute_java_dynamic_method(ee = 0x84a63bc, obj = 0xdc8c4b30, method_name = 0xdffc2898 "run", signature = 0xdffc2890 "()V", ...), line 256 in "interpreter.c"
  [519] ThreadRT0(p = 0xdc8c4b30), line 2060 in "jvm.c"
  [520] saveStackBase(args = 0xdff95e0c), line 144 in "threads.c"
  [521] start_func(func = 0xdffa42d0 = &`libjvm_g.so`threads.c`saveStackBase(void *args), args = 0x8046e40), line 208 in "threads_md.c"
=>[522] 0x0(0x0, 0x0, 0x0), at 0xffffffff


A partial explanation of why this happens is that the floating point
values passed into the processToRunsArc3 method are badly corrupted.
The values that are printed out, if you add statements show that NaN, or -NaN
is passed in as floating point arguments.
So it recurses trying to split the path into smaller parts.

The cause may be a memory smash or some form of floating point problem.

If its a memory smash, its not clear where, since although there
are short/long casts, those should cause a problem on wintel as well
as solaris x86.
There's no (other) platform specific code in the affected library.

The non-optimised version does not crash (although in a possibly related
problem it does slowly leak memory).

This may mean that in the case of debug vs optimised versions
* some structures have moved and aren't getting smashed in the debug version
* there is a compiler optimiser bug in the optimised version
* some fp calculations are now being optimised and may now cause underflows/
  overflows/get different results, whereas they didn't in the debug version.

  - If I enable fp traps and catch fpe's I do see more of them in the
 optimised version. This could account for a SPARC/Intel difference as
 the Sun C compiler would invoke different fp h/w routines on the different
 architectures.
 However I can't locate anything which indicates that -xO2 optimises FP.

Also it takes a large test program like Java2D to reproduce the problem,
which lends itself to a memory smash theory.

The problem is harder to reproduce on some machines than others.
Catching the problem running under dbx has proved tricky.
Print statements are the only thing that has shown up anything
The RTC memory leak facilities of the debuggger aren't supported on x86.

By the time we crash its a long time after the problem was introduced.
Having to work backwards a long way to try to find this cause.

The bug is still reproducible in the engineering nightly build from
10-sep-98

rekha.rangarajan@eng 1998-06-04

Solaris x86 5.6 8-bit (test machine: Peas)
JDK: JDK1.2beta4-H
Java2D: /usr/local/java/jdk1.2/solaris/demo/jfc/Java2D

Description: 
Java2D crashes 3 out 5 times upon loading. The splashscreen for loading all tabs comes up and is successful.  Then Java2Demo canvas comes up and starts drawing some of the tests under Arcs_Curves when the crash occurs. Not much error info, just - Segmentation Fault

The other 2 times, it loads and when I try to click on Clipping tab, it crashes consistently with following error info:
Exception occurred during event dispatching:
java.lang.NullPointerException
        at sun.awt.Albert.TBezierList.mergeArray(Compiled Code)
        at sun.awt.Albert.TBezierList.SplitAtIntersectionsWith(Compiled Code)
        at sun.awt.Albert.TPathExtractor.render(Compiled Code)
        at java.awt.geom.Area.extract(Compiled Code)
        at java.awt.geom.Area.getPathIterator(Compiled Code)
        at sun.java2d.SunGraphics2D.getCompBounds(Compiled Code)
        at sun.awt.image.BufferedImageGraphics2D.invalidateCachedState(Compiled 
Code)
        at sun.awt.image.BufferedImageGraphics2D.invalidatePipe(Compiled Code)
        at sun.java2d.SunGraphics2D.invalidateClip(Compiled Code)
        at sun.java2d.SunGraphics2D.clip(Compiled Code)
        at sun.awt.image.BufferedImageGraphics2D.clip(Compiled Code)
        at demos.Clipping.ClipAnim.drawDemo(Compiled Code)
        at J2DCanvas.paint(Compiled Code)
        at sun.awt.motif.MComponentPeer.handleEvent(Compiled Code)
        at java.awt.Component.dispatchEventImpl(Compiled Code)
        at java.awt.Component.dispatchEvent(Compiled Code)
        at java.awt.EventQueue.dispatchEvent(Compiled Code)
        at java.awt.EventDispatchThread.run(Compiled Code)
java.lang.NullPointerException
        at sun.awt.Albert.TBezierList.mergeArray(Compiled Code)
        at sun.awt.Albert.TBezierList.SplitAtIntersectionsWith(Compiled Code)
        at sun.awt.Albert.TPathExtractor.render(Compiled Code)
        at java.awt.geom.Area.extract(Compiled Code)
        at java.awt.geom.Area.getPathIterator(Compiled Code)
        at sun.java2d.SunGraphics2D.getCompBounds(Compiled Code)
        at sun.awt.image.BufferedImageGraphics2D.invalidateCachedState(Compiled 
Code)
        at sun.awt.image.BufferedImageGraphics2D.invalidatePipe(Compiled Code)
        at sun.java2d.SunGraphics2D.invalidateClip(Compiled Code)
        at sun.java2d.SunGraphics2D.clip(Compiled Code)
        at sun.awt.image.BufferedImageGraphics2D.clip(Compiled Code)
        at demos.Clipping.ClipAnim.drawDemo(Compiled Code)
        at J2DCanvas.paint(Compiled Code)
        at J2DCanvas.run(Compiled Code)
        at java.lang.Thread.run(Compiled Code)
Segmentation Fault



rekha.rangarajan@eng 1998-06-17

Solaris x86 5.6 8-bit (test machine: Peas)
JDK: JDK1.2beta4-J
Java2D: /usr/local/java/jdk1.2/x86/demo/jfc/Java2D

Description:
Java2D crashes 4 out of 5 times with J-bld. I was able to load it one time 
and when I clicked on Clipping tab, it gave following NullPointerExcp error and crashed

Exception occurred during event dispatching:
java.lang.NullPointerException
        at sun.awt.Albert.TBezierList.mergeArray(Compiled Code)
        at sun.awt.Albert.TBezierList.SplitAtIntersectionsWith(Compiled Code)
        at sun.awt.Albert.TPathExtractor.render(Compiled Code)
        at java.awt.geom.Area.extract(Compiled Code)
        at java.awt.geom.Area.getPathIterator(Compiled Code)
        at sun.java2d.SunGraphics2D.getCompBounds(Compiled Code)
        at sun.awt.image.BufferedImageGraphics2D.invalidateCachedState(Compiled Code)
        at sun.awt.image.BufferedImageGraphics2D.invalidatePipe(Compiled Code)
        at sun.java2d.SunGraphics2D.invalidateClip(Compiled Code)
        at sun.java2d.SunGraphics2D.clip(Compiled Code)
        at sun.awt.image.BufferedImageGraphics2D.clip(Compiled Code)
        at demos.Clipping.ClipAnim.drawDemo(Compiled Code)
        at J2DCanvas.paint(Compiled Code)
        at sun.awt.motif.MComponentPeer.handleEvent(Compiled Code)
        at java.awt.Component.dispatchEventImpl(Compiled Code)
        at java.awt.Component.dispatchEvent(Compiled Code)
        at java.awt.EventQueue.dispatchEvent(Compiled Code)
        at java.awt.EventDispatchThread.run(Compiled Code)
java.lang.NullPointerException
        at sun.awt.Albert.TBezierList.mergeArray(Compiled Code)
Segmentation Fault

rekha.rangarajan@eng 1998-07-27
Solaris x86 8-bit (test machine: dino)
JDK-1.2fcs-C
/usr/local/java/jdk1.2fcs/x86/demo/jfc/Java2D

Description: Java2D is still crashing on x86 with the C-bld.  I have some info on one of the seg-vios.  This time, it crashed when I attempted to go to the Colors tab.

SIGSEGV   11*  segmentation violation
    si_signo [11]: SIGSEGV   11*  segmentation violation
    si_errno [0]: Error 0
    si_code [1]: SEGV_MAPERR [addr: 0x906abc0]

        stackpointer=DB7C1A88

Full thread dump:
    "Rotator3D Demo" (TID:0xdc894af0, sys_thread_t:0x88d9520, state:MW) prio=1
        at sun.awt.motif.X11Graphics.pSetFont(Native Method)
        at sun.awt.motif.X11Graphics.setFont(Compiled Code)
        at sun.awt.motif.MComponentPeer.getGraphics(Compiled Code)
        at java.awt.Component.getGraphics(Compiled Code)
        at J2DCanvas.run(Compiled Code)
        at java.lang.Thread.run(Compiled Code)
    "PerformanceMonitor" (TID:0xdc8c0360, sys_thread_t:0x864f388, state:MW) prio=1
        at sun.awt.motif.X11Graphics.X11LockViewResources(Native Method)
        at sun.awt.motif.X11Graphics.lock(Compiled Code)
        at sun.java2d.loops.LockableRaster.lock2D(Compiled Code)
        at sun.java2d.loops.LockableRaster.lock(Compiled Code)
        at sun.java2d.loops.RasterOutputManager.performOpaqueBlit(Compiled Code)
        at sun.java2d.loops.RasterOutputManager.compositeSrcDst(Compiled Code)
        at sun.java2d.loops.RasterOutputManager.renderImage(Compiled Code)
        at sun.java2d.SunGraphics2D.renderingPipeImage(Compiled Code)
        at sun.java2d.SunGraphics2D.drawImage(Compiled Code)
        at sun.awt.motif.X11Graphics.drawImage(Compiled Code)
        at PerformanceMonitor$PerformanceMonitorCanvas.paint(Compiled Code)
        at PerformanceMonitor$PerformanceMonitorCanvas.run(Compiled Code)
        at java.lang.Thread.run(Compiled Code)
    "MemoryMonitor" (TID:0xdc8bfa78, sys_thread_t:0x86450e0, state:MW) prio=1
        at sun.awt.motif.X11Graphics.X11LockViewResources(Native Method)
        at sun.awt.motif.X11Graphics.lock(Compiled Code)
        at sun.java2d.loops.LockableRaster.lock2D(Compiled Code)
        at sun.java2d.loops.LockableRaster.<init>(Compiled Code)
        at sun.java2d.loops.RasterOutputManager.renderImage(Compiled Code)
        at sun.java2d.SunGraphics2D.renderingPipeImage(Compiled Code)
        at sun.java2d.SunGraphics2D.drawImage(Compiled Code)
        at sun.awt.motif.X11Graphics.drawImage(Compiled Code)
        at MemoryMonitor$MemoryMonitorCanvas.paint(Compiled Code)
        at MemoryMonitor$MemoryMonitorCanvas.run(Compiled Code)
        at java.lang.Thread.run(Compiled Code)
    "AWT-Finalizer" (TID:0xdc8b85d8, sys_thread_t:0x85bbf28, state:CW) prio=9
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Compiled Code)
        at sun.awt.AWTFinalizer.run(Compiled Code)
    "Screen Updater" (TID:0xdc899ba0, sys_thread_t:0x85aeb38, state:CW) prio=4
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Compiled Code)
        at sun.awt.ScreenUpdater.nextEntry(Compiled Code)
        at sun.awt.ScreenUpdater.run(Compiled Code)
    "TimerQueue" (TID:0xdc89eb70, sys_thread_t:0x856e550, state:CW) prio=5
        at java.lang.Object.wait(Native Method)
        at com.sun.java.swing.TimerQueue.run(Compiled Code)
        at java.lang.Thread.run(Compiled Code)
    "AWT-Motif" (TID:0xdc8b72b8, sys_thread_t:0x8258758, state:CW) prio=5
        at java.lang.Object.wait(Native Method)
        at sun.awt.motif.MToolkit.run(Native Method)
        at java.lang.Thread.run(Compiled Code)
    "AWT-Input" (TID:0xdc8b72e0, sys_thread_t:0x8257678, state:R) prio=5
        at sun.awt.motif.InputThread.run(Native Method)
    "AWT-EventQueue-0" (TID:0xdc8b70a0, sys_thread_t:0x823a1e8, state:R) prio=6 *current thread*
        at sun.awt.color.CMM.cmmCombineTransforms(Native Method)
        at sun.awt.color.ICC_Transform.<init>(Compiled Code)
        at java.awt.image.ColorConvertOp.filter(Compiled Code)
        at demos.Colors.ColorConvert.drawDemo(Compiled Code)
        at J2DCanvas.paint(Compiled Code)
        at sun.awt.motif.MComponentPeer.handleEvent(Compiled Code)
        at java.awt.Component.dispatchEventImpl(Compiled Code)
        at java.awt.Component.dispatchEvent(Compiled Code)
        at java.awt.EventQueue.dispatchEvent(Compiled Code)
        at java.awt.EventDispatchThread.run(Compiled Code)
    "Finalizer" (TID:0xdc899560, sys_thread_t:0x80963b8, state:CW) prio=8
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(Compiled Code)
        at java.lang.ref.ReferenceQueue.remove(Compiled Code)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:128)
    "Reference Handler" (TID:0xdc899458, sys_thread_t:0x8095db8, state:CW) prio=10
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Compiled Code)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209)
    "Signal dispatcher" (TID:0xdc899328, sys_thread_t:0x808a888, state:CW) prio=10
    "Thread-5" (TID:0xdc841100, sys_thread_t:0x80501f8, state:CW) prio=5
Monitor Cache Dump:
    sun.awt.motif.MToolkit@DC8B6EB0/DC932370: owner "AWT-Input" (0x8257678) 0 entries
        Waiting to enter:
            "Rotator3D Demo" (0x88d9520)
            "MemoryMonitor" (0x86450e0)
            "PerformanceMonitor" (0x864f388)
        Waiting to be notified:
            "AWT-Motif" (0x8258758)
    java.lang.ref.ReferenceQueue$Lock@DC899578/DC8CF258: <unowned>
        Waiting to be notified:
            "Finalizer" (0x80963b8)
    com.sun.java.swing.TimerQueue@DC89EB38/DC9589B8: <unowned>
        Waiting to be notified:
            "TimerQueue" (0x856e550)
    java.lang.ref.Reference$Lock@DC899308/DC8CEF68: <unowned>
        Waiting to be notified:
            "Reference Handler" (0x8095db8)
    sun.awt.AWTFinalizer@DC8B85D8/DC96FEB0: <unowned>
        Waiting to be notified:
            "AWT-Finalizer" (0x85bbf28)
    sun.awt.ScreenUpdater@DC899BA0/DC95F2C0: <unowned>
        Waiting to be notified:
            "Screen Updater" (0x85aeb38)
Registered Monitor Dump:
    PCMap lock: <unowned>
    utf8 hash table: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class linking lock: <unowned>
    System class loader lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Monitor cache lock: <unowned>
    Dynamic loading lock: <unowned>
    Monitor IO lock: <unowned>
    User signal monitor: <unowned>
        Waiting to be notified:
            "Signal dispatcher" (0x808a888)
    Child death monitor: <unowned>
    I/O monitor: <unowned>
    Alarm monitor: <unowned>
        Waiting to be notified:
            "Internal clock" (0x80530b8)
    Thread queue lock: <unowned>
        Waiting to be notified:
            "Thread-5" (0x80501f8)
    Monitor registry: owner "AWT-EventQueue-0" (0x823a1e8) 1 entry
SIGABRT   6*   abort (generated by abort(3) routine)
    si_signo [6]: SIGABRT   6*   abort (generated by abort(3) routine)
    si_errno [0]: Error 0
    si_code [0]: SI_USER [pid: 1465, uid: 69244]
        stackpointer=DB7C1A88

Full thread dump:
    "Rotator3D Demo" (TID:0xdc894af0, sys_thread_t:0x88d9520, state:MW) prio=1
        at sun.awt.motif.X11Graphics.pSetFont(Native Method)
        at sun.awt.motif.X11Graphics.setFont(Compiled Code)
        at sun.awt.motif.MComponentPeer.getGraphics(Compiled Code)
        at java.awt.Component.getGraphics(Compiled Code)
        at J2DCanvas.run(Compiled Code)
        at java.lang.Thread.run(Compiled Code)
    "PerformanceMonitor" (TID:0xdc8c0360, sys_thread_t:0x864f388, state:MW) prio=1
        at sun.awt.motif.X11Graphics.X11LockViewResources(Native Method)
        at sun.awt.motif.X11Graphics.lock(Compiled Code)
        at sun.java2d.loops.LockableRaster.lock2D(Compiled Code)
        at sun.java2d.loops.LockableRaster.lock(Compiled Code)
        at sun.java2d.loops.RasterOutputManager.performOpaqueBlit(Compiled Code)
        at sun.java2d.loops.RasterOutputManager.compositeSrcDst(Compiled Code)
        at sun.java2d.loops.RasterOutputManager.renderImage(Compiled Code)
        at sun.java2d.SunGraphics2D.renderingPipeImage(Compiled Code)
        at sun.java2d.SunGraphics2D.drawImage(Compiled Code)
        at sun.awt.motif.X11Graphics.drawImage(Compiled Code)
        at PerformanceMonitor$PerformanceMonitorCanvas.paint(Compiled Code)
        at PerformanceMonitor$PerformanceMonitorCanvas.run(Compiled Code)
        at java.lang.Thread.run(Compiled Code)
    "MemoryMonitor" (TID:0xdc8bfa78, sys_thread_t:0x86450e0, state:MW) prio=1
        at sun.awt.motif.X11Graphics.X11LockViewResources(Native Method)
        at sun.awt.motif.X11Graphics.lock(Compiled Code)
        at sun.java2d.loops.LockableRaster.lock2D(Compiled Code)
        at sun.java2d.loops.LockableRaster.<init>(Compiled Code)
        at sun.java2d.loops.RasterOutputManager.renderImage(Compiled Code)
        at sun.java2d.SunGraphics2D.renderingPipeImage(Compiled Code)
        at sun.java2d.SunGraphics2D.drawImage(Compiled Code)
        at sun.awt.motif.X11Graphics.drawImage(Compiled Code)
        at MemoryMonitor$MemoryMonitorCanvas.paint(Compiled Code)
        at MemoryMonitor$MemoryMonitorCanvas.run(Compiled Code)
        at java.lang.Thread.run(Compiled Code)
    "AWT-Finalizer" (TID:0xdc8b85d8, sys_thread_t:0x85bbf28, state:CW) prio=9
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Compiled Code)
        at sun.awt.AWTFinalizer.run(Compiled Code)
    "Screen Updater" (TID:0xdc899ba0, sys_thread_t:0x85aeb38, state:CW) prio=4
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Compiled Code)
        at sun.awt.ScreenUpdater.nextEntry(Compiled Code)
        at sun.awt.ScreenUpdater.run(Compiled Code)
    "TimerQueue" (TID:0xdc89eb70, sys_thread_t:0x856e550, state:CW) prio=5
        at java.lang.Object.wait(Native Method)
        at com.sun.java.swing.TimerQueue.run(Compiled Code)
        at java.lang.Thread.run(Compiled Code)
    "AWT-Motif" (TID:0xdc8b72b8, sys_thread_t:0x8258758, state:CW) prio=5
        at java.lang.Object.wait(Native Method)
        at sun.awt.motif.MToolkit.run(Native Method)
        at java.lang.Thread.run(Compiled Code)
    "AWT-Input" (TID:0xdc8b72e0, sys_thread_t:0x8257678, state:R) prio=5
        at sun.awt.motif.InputThread.run(Native Method)
    "AWT-EventQueue-0" (TID:0xdc8

Comments
WORK AROUND to avoid this specific problem (and of course inadvertently some others no doubt), use java_g Also, it seems that the bug may not occur if you use native threads. I'm not positive about this, but it may help someone. ========================= I haven't had anyone independently verify this, but does look like the bug is green threads specific and can be worked around with setenv THREADS_FLAG native =========================
11-06-2004

SUGGESTED FIX phil.race@eng 1998-09-12 In build/solaris/makefiles/Defs-solaris.gmk, change _OPT = -xO2 to ifeq ($(ARCH), i386) _OPT = -xO2 -fprecision=single else _OPT = -xO2 endif This is definitely just a *suggested* fix right now. - And in fact it looks like it isn't going to work .. more research needed.
11-06-2004

EVALUATION Running with the latest nightly build, Java2Demo crashes upon start up in font codes (NativerFontWrapper.registerFonts()) as follows: java version "Java2D:08-Sep-98@06:17" %../../../bin/java_g Java2Demo Warning: opcode 212 not implemented yet Warning: JIT compiler failed for java/lang/ref/SoftReference.<init>(Ljava/lang/Object;)V Font specified in font.properties not found [-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-1] SIGSEGV 11* segmentation violation si_signo [11]: SIGSEGV 11* segmentation violation *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure *** panic: "../../../../../src/solaris/hpi/green_threads/src/signals.c", line 612: assertion failure *** panic: "../../../../../src/solaris/hpi/green_threads/src/signals.c", line 612: assertion failure SIGABRT 6* abort (generated by abort(3) routine) si_signo [6]: SIGABRT 6* abort (generated by abort(3) routine) *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure si_errno [0]: Error 0 si_code [0]: SI_USER [pid: 795, uid: 36095] stackpointer=8043d44 *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure Full thread dump Classic VM (Java2D:08-Sep-98@06:17, green threads): "Finalizer" (TID:0xdc899398, sys_thread_t:0x808f730, state:CW) prio=8 at java.lang.Object.wait(Native Method) at java.lang.ref.ReferenceQueue.remove(Compiled Code) at java.lang.ref.ReferenceQueue.remove(Compiled Code) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:174) "Reference Handler" (TID:0xdc899428, sys_thread_t:0x808c828, state:CW) prio=10 at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Compiled Code) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:209) "Signal dispatcher" (TID:0xdc899198, sys_thread_t:0x8085a90, state:CW) prio=5 "main" (TID:0xdc899258, sys_thread_t:0x8050f28, state:R) prio=5 at sun.awt.font.NativeFontWrapper.registerFonts(Native Method) at sun.java2d.SunGraphicsEnvironment.addPathFonts(Compiled Code) at sun.java2d.SunGraphicsEnvironment.registerFonts(Compiled Code) at sun.java2d.SunGraphicsEnvironment.access$1(Compiled Code) at sun.java2d.SunGraphicsEnvironment$2.run(Compiled Code) at java.security.AccessController.doPrivileged(Native Method) at sun.java2d.SunGraphicsEnvironment.loadFonts(Compiled Code) at sun.java2d.SunGraphicsEnvironment.initTerminalNames(Compiled Code) at sun.java2d.SunGraphicsEnvironment.initCompositeFonts(Compiled Code) at sun.awt.X11GraphicsEnvironment.initCompositeFonts(Compiled Code) at sun.java2d.SunGraphicsEnvironment$1.run(Compiled Code) at java.security.AccessController.doPrivileged(Native Method) at sun.java2d.SunGraphicsEnvironment.<init>(Compiled Code) at sun.awt.X11GraphicsEnvironment.<init>(Compiled Code) at java.lang.Class.newInstance(Native Method) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Compiled Code) at java.awt.Font.initializeFont(Compiled Code) at java.awt.Font.<init>(Compiled Code) at javax.swing.plaf.metal.DefaultMetalTheme.<init>(Compiled Code) at javax.swing.plaf.metal.MetalLookAndFeel.createDefaultTheme(Compiled Code) ... (more frames not shown) Monitor Cache Dump: java.lang.ref.Reference$Lock@DC899438/DC8CE778: <unowned> Waiting to be notified: "Reference Handler" (0x808c828) java.lang.Class@DC8A55D0/DC8FE390: owner "main" (0x8050f28) 1 entry java.lang.Class@DC8A48F8/DC8FAE08: owner "main" (0x8050f28) 2 entries sun.awt.X11GraphicsEnvironment@DC8A5620/DC8FE0F0: owner "main" (0x8050f28) 1 entry java.lang.ref.ReferenceQueue$Lock@DC8993B0/DC8CECB8: <unowned> Waiting to be notified: "Finalizer" (0x808f730) Registered Monitor Dump: PCMap lock: <unowned> utf8 hash table: <unowned> JNI pinning lock: <unowned> JNI global reference lock: <unowned> BinClass lock: <unowned> Class linking lock: <unowned> System class loader lock: <unowned> Code rewrite lock: <unowned> Heap lock: <unowned> Monitor cache lock: owner "main" (0x8050f28) 1 entry Dynamic loading lock: <unowned> Monitor IO lock: <unowned> User signal monitor: <unowned> Waiting to be notified: "Signal dispatcher" (0x8085a90) Child death monitor: <unowned> I/O monitor: <unowned> Alarm monitor: <unowned> Waiting to be notified: <unknown thread> (0x8053df0) Thread queue lock: owner "main" (0x8050f28) 1 entry Monitor registry: owner "main" (0x8050f28) 1 entry *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure *** panic: "../../../../../src/solaris/hpi/green_threads/src/signals.c", line 612: assertion failure Abort ================================= phil.race@eng 1998-09-11 on processToRunsArc3, invoked when filling a cubic curve path. The core dump would show a stack backtrace something like this :- [1] processToRunsArc3(0x841f170, 0xb40841f1, 0xf3b40841), at 0xdb9b38f3 ... ... [507] processToRunsArc3(0x841f170, 0xb40841f1, 0xf3b40841), at 0xdb9b38f3 [508] processToRunsArc3(0x841f170, 0xb40841f1, 0xf3b40841), at 0xdb9b38f3 [509] RunsBuilder_appendCubic(0x841f170, 0x640841f1, 0x29640841), at 0xdb9b2a2c [510] appendCubic_describeTo(0x841f170, 0x80841f1, 0x90080841), at 0xdb9aea30 [511] sendTo(0x841f170, 0xb40841f1, 0xe8b40841), at 0xdb9aec28 [512] setOutputArea(0x841f170, 0xb40841f1, 0xf3b40841), at 0xdb9b49f3 [513] Java_sun_dc_pr_PathFiller_setOutputArea(0x84a63bc, 0x1c084a63, 0xe61c084a), at 0xdb9af79e ..... A partial explanation of why this happens is that the floating point values passed into the processToRunsArc3 method are badly corrupted. The values that are printed out, if you add statements show that NaN, or -NaN is passed in as floating point arguments. So it recurses trying to split the path into smaller parts. A proper evaulation will require tracking down the cause of this. ========================================= phil.race@eng 1998-09-12 This is looking more and more like a FP related issue. Id I change the CFLAGS so that the optimised version is compiled wit -fprecision=single the problem disappears (for me at least!) This option to the Sun C compiler is specific to the intel version Unfortunately it seemed that compiling only the ductus lib (libdcpr.so) with this option did not fix the problem, although that needs to be verified. So its very possible this option could break something else. If the whole JDK needs this option that will require much more careful evaluation. Before than I need to understand why it works, or at least worked so far. I will try and consult an FP guru. =============== phil.race@eng 1998-09-14. It now looks as if the reason the problem stopped being reproducible was that the Java2D demo was modified and the problem just went away. I'm not really very confident that we could leave it at that. So I'm going to get the old version of the demo which showed the problem and run it on the new version of the jdk. ========================= phil.race@eng 1998-09-22 This is a really hard bug to track down. I still haven't located the root of it, despite a lot of effort. Because it needs a program which exercises the ductus lib from multiple threads and may take a while to show up, and when it does show up, its some time after the data corruption occurred, and there's no obvious place it happened. Running under the debugger doesn't tell me anything useful. Print statements tell me that the problem occured long before the crash, and I keep going back and back but not can't find where it starts. I disabled code optimisation for libdcpr.so, so the code is now generated by the same backend as the debug version, but the problem still occurs. Its impossible to be definite without finding the smoking gun, but I am now more inclined to believe its a VM bug, since it happens only with green threads. If it were because of a lack of thread safety in Java2D code, I would expect native threads to be the one showing it up more than green threads. Since the opposite happens it seems like a VM bug. If anyone has any ideas as to possible threading bug that is more likely to show up under green threads than native threads I'd be interested. If we believe that it is specific to the green threads VM on x86, then this bug is certainly deferrable, since the Solaris production VM does not use green threads at all, and users of the reference release can workaround it by setting an environment variable : setenv THREADS_FLAG native ========================= The bug is not reproducible in Merlin (current build b74) Ladybird (build 24). dmitri.trembovetski@eng 2001-08-06
06-08-2001