JDK-4434196 : Crash on fonts in headless mode - Solaris only, build 58
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.0
  • Priority: P1
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2001-04-05
  • Updated: 2001-04-05
  • Resolved: 2001-04-05
Related Reports
Duplicate :  
Relates :  
Description
The enclosed tests (see attached tar file) crash in font related code
while in headless mode on Solaris.  On Win2k there is no crash, and there is
no crash if run on Solaris not in headless mode.  I have not tested this
on Linux.  These test ran perfectly on Solaris with build 57, and are 
crashing on build 58.

Each test does some rendering into a BufferedImage, and this BufferedImage
is written to a disk file using ImageIO.

It crashes with both:

HEADLESS="-Djava.awt.headless=true -Djava.awt.headlesslib=true"
and
HEADLESS="-Djava.awt.headless=true"

In the attached files, unpack the tar.gz, cd bug, then type make.
Once it's built, type ./runit.

There are two slightly different crashes as shown below.  I notice that
both are crashing in XLoadQueryFont and this is a no-no for headless code.
A lot more of my test cases crash than these two, but the stack traces all
boil down to these two examples.


dherron@tokyojoe:/home/dherron/work/headless/Headless( 27 )% showrev -p
Patch: 109279-08 Obsoletes: 109048-06, 110180-01 Requires:  Incompatibles:  Packages: SUNWcsu, SUNWcsr, SUNWcarx, SUNWcsxu, SUNWhea, SUNWmdb, SUNWmdbx
Patch: 109740-03 Obsoletes: 109056-01, 110196-01 Requires:  Incompatibles:  Packages: SUNWcsr, SUNWcarx
Patch: 109742-02 Obsoletes: 109052-01 Requires:  Incompatibles:  Packages: SUNWcsr, SUNWcarx
Patch: 108652-28 Obsoletes:  Requires:  Incompatibles:  Packages: SUNWxwfnt, SUNWxwice, SUNWxwplt, SUNWxwicx, SUNWxwplx, SUNWxwdxm, SUNWxwinc, SUNWxwman, SUNWxwpmn, SUNWxwslb
Patch: 108940-07 Obsoletes:  Requires:  Incompatibles:  Packages: SUNWmfrun, SUNWdtbax
Patch: 108921-06 Obsoletes:  Requires:  Incompatibles:  Packages: SUNWdtwm


============== TextLayout

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0xF3FABA30
Function=XLoadQueryFont+0x4
Library=/usr/openwin/lib/libX11.so.4

Current Java thread:
        at sun.awt.font.NativeFontWrapper.getFontMetrics(Native Method)
        - locked <f8a04d18> (a java.lang.Class)
        at java.awt.Font.defaultLineMetrics(Font.java:1358)
        at java.awt.Font.getLineMetrics(Font.java:1425)
        at java.awt.font.TextLayout.fastInit(TextLayout.java:544)
        at java.awt.font.TextLayout.<init>(TextLayout.java:344)
        at headless.image.ACimages.render(ACimages.java:85)
        at headless.bit.Main.renderTest(Main.java:30)
        at headless.util.TestMain.runTest(TestMain.java:146)
        at headless.bit.Main.main(Main.java:45)

Dynamic libraries:
0x10000         /usr/local/java/jdk1.4/solsparc/bin/../bin/sparc/native_threads/java
0xff360000      /usr/lib/libthread.so.1
0xff3a0000      /usr/lib/libdl.so.1
0xff280000      /usr/lib/libc.so.1
0xff270000      /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
0xfe400000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/client/libjvm.so
0xff210000      /usr/lib/libCrun.so.1
0xff1f0000      /usr/lib/libsocket.so.1
0xff100000      /usr/lib/libnsl.so.1
0xff1c0000      /usr/lib/libm.so.1
0xff240000      /usr/lib/libw.so.1
0xff0d0000      /usr/lib/libmp.so.2
0xff0a0000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/native_threads/libhpi.so
0xff070000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libverify.so
0xff020000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libjava.so
0xfe7e0000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libzip.so
0xfa880000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libawt.so
0xf4280000      /usr/local/java/jdk1.4/solsparc/bin/../jre/lib/sparc/libmlib_image.so
0xfaad0000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/headless/libmawt.so
0xf4080000      /usr/lib/libXm.so.3
0xfa810000      /usr/openwin/lib/libXt.so.4
0xfaa90000      /usr/openwin/lib/libXext.so.0
0xfa9e0000      /usr/openwin/lib/libXtst.so.1
0xf3f80000      /usr/openwin/lib/libX11.so.4
0xfa9c0000      /usr/openwin/lib/libSM.so.6
0xfa990000      /usr/openwin/lib/libICE.so.6
0xf47c0000      /usr/openwin/lib/libdga.so.1
0xf46b0000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libcmm.so
0xf45b0000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libjpeg.so
0xf44d0000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libnet.so
0xf4690000      /usr/lib/nss_files.so.1
0xf4590000      /usr/lib/nss_nis.so.1
0xf3d80000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libfontmanager.so

Local Time = Wed Apr  4 18:49:41 2001
Elapsed Time = 10
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.0-beta-b58 mixed mode)
#
# An error report file has been saved as hs_err_pid582.log.
# Please refer to the file for further information.
#
Abort


============= drawString

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0xF3FABA30
Function=XLoadQueryFont+0x4
Library=/usr/openwin/lib/libX11.so.4

Current Java thread:
        at sun.awt.font.GlyphList.setupStringData(Native Method)
        at sun.awt.font.GlyphList.setFromString(GlyphList.java:104)
        - locked <f8953ce8> (a java.lang.Class)
        at sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:49)
        at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2982)
        at headless.image.Append.render(Append.java:61)
        at headless.bit.Main.renderTest(Main.java:30)
        at headless.util.TestMain.runTest(TestMain.java:146)
        at headless.bit.Main.main(Main.java:45)

Dynamic libraries:
0x10000         /usr/local/java/jdk1.4/solsparc/bin/../bin/sparc/native_threads/java
0xff360000      /usr/lib/libthread.so.1
0xff3a0000      /usr/lib/libdl.so.1
0xff280000      /usr/lib/libc.so.1
0xff270000      /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
0xfe400000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/client/libjvm.so
0xff210000      /usr/lib/libCrun.so.1
0xff1f0000      /usr/lib/libsocket.so.1
0xff100000      /usr/lib/libnsl.so.1
0xff1c0000      /usr/lib/libm.so.1
0xff240000      /usr/lib/libw.so.1
0xff0d0000      /usr/lib/libmp.so.2
0xff0a0000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/native_threads/libhpi.so
0xff070000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libverify.so
0xff020000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libjava.so
0xfe7e0000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libzip.so
0xfa880000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libawt.so
0xf4280000      /usr/local/java/jdk1.4/solsparc/bin/../jre/lib/sparc/libmlib_image.so
0xfaad0000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/headless/libmawt.so
0xf4080000      /usr/lib/libXm.so.3
0xfa810000      /usr/openwin/lib/libXt.so.4
0xfaa90000      /usr/openwin/lib/libXext.so.0
0xfa9e0000      /usr/openwin/lib/libXtst.so.1
0xf3f80000      /usr/openwin/lib/libX11.so.4
0xfa9c0000      /usr/openwin/lib/libSM.so.6
0xfa990000      /usr/openwin/lib/libICE.so.6
0xf47c0000      /usr/openwin/lib/libdga.so.1
0xf3e80000      /net/jdk.eng/export/disk6/promoted/jdk/1.4/beta/b58/binaries/solsparc/jre/lib/sparc/libfontmanager.so

Local Time = Wed Apr  4 18:49:44 2001
Elapsed Time = 2
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.0-beta-b58 mixed mode)
#
# An error report file has been saved as hs_err_pid599.log.
# Please refer to the file for further information.
#
Abort


Comments
EVALUATION Commit to fix in merlin-beta (crash). eric.hawkes@eng 2001-04-04 Again, this is a duplicate of the work that was done recently for 4365371. The tests run fine on the latest AWT build. Note: many of the tests return "NoClassDefFoundError": + imgtest headless.image.SimpleFill IGNORE IMAGE IMG: headless.image.SimpleFill Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.ACimages IGNORE IMAGE IMG: headless.image.ACimages Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.Append IGNORE IMAGE IMG: headless.image.Append Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.Arcs IGNORE IMAGE IMG: headless.image.Arcs Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.BezierAnim IGNORE IMAGE IMG: headless.image.BezierAnim Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.BullsEye IGNORE IMAGE IMG: headless.image.BullsEye Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.Caps IGNORE IMAGE IMG: headless.image.Caps Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.CurveQuadTo IGNORE IMAGE IMG: headless.image.CurveQuadTo Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.Curves IGNORE IMAGE IMG: headless.image.Curves Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.Dash IGNORE IMAGE IMG: headless.image.Dash Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.Ellipses IGNORE IMAGE IMG: headless.image.Ellipses Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.FillStroke IGNORE IMAGE IMG: headless.image.FillStroke Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.Outline IGNORE IMAGE IMG: headless.image.Outline Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + imgtest headless.image.WindingRule IGNORE IMAGE IMG: headless.image.WindingRule Exception in thread "main" java.lang.NoClassDefFoundError: headless/bit/Main + swingtest headless.swing.SimpleExample SWING IMG: headless.swing.SimpleExample Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.Buttons SWING IMG: headless.swing.Buttons Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.CBox SWING IMG: headless.swing.CBox Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.Labels SWING IMG: headless.swing.Labels Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.Layers SWING IMG: headless.swing.Layers Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.List SWING IMG: headless.swing.List Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.ListScrolled SWING IMG: headless.swing.ListScrolled Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.ProgressBars SWING IMG: headless.swing.ProgressBars Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.ScrollPane SWING IMG: headless.swing.ScrollPane Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.SimpleTable SWING IMG: headless.swing.SimpleTable Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.Sliders SWING IMG: headless.swing.Sliders Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.Spinners SWING IMG: headless.swing.Spinners Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.SplitPane SWING IMG: headless.swing.SplitPane Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.TabbedPane SWING IMG: headless.swing.TabbedPane Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.TextArea SWING IMG: headless.swing.TextArea Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main + swingtest headless.swing.TextField SWING IMG: headless.swing.TextField Exception in thread "main" java.lang.NoClassDefFoundError: headless/swingt/Main There are no crashes as described in the bug. michael.martak@Eng 2001-04-05
05-04-2001