Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4337142

JVM SEGV when multiple threads call TextLayout.getOutLine()

XMLWordPrintable

    • 2d
    • sparc
    • solaris_8

      Multithreaded program calling TextLayout's getOutline method for string of TrueType fonts causes the JVM to SEGV.

      The crash is repeatable, but the Java test program may need to be invoked several times in a row to cause the crash.

      Procedure for reproducing the problem:

      Log out from Solaris
      From dtlogin window, choose "Command line login"
      login as yourself.
      check that Xsun is not running (ps -ef | grep Xsun),
      log out
      When dtlogin screen reappears, log in as yourself
      In a termainal window running cshell (or modify the setenv below for your shell):
      check your version of java
      % java -version
         java version "1.2.2"
         Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunwjit)
      % setenv JAVA2D_USEPLATFORMFONT
      % java FontStress 1

      Now repeat the next line until you get a crash (for me it took no more than 3 times):
      % java FontStress 30
      % java FontStress 30
      % java FontStress 30

      Of the these FontStress runs will result in a JVM crash:

      % java FontStress 30
      ... (text omitted, see attachment output.txt for complete output of a run)

      "Thread-7" (TID:0x486940, sys_thread_t:0x486878, state:R, thread_t: t@17, threadID:0xf9701d78, stack_bottom:0xf9702000, stack_size:0x20000) prio=5 *current thread*

      [1] sun.awt.font.NativeFontWrapper.getFontMetrics(Native Method)
      [2] java.awt.Font.defaultLineMetrics(Font.java:1235)
      [3] java.awt.Font.getLineMetrics(Font.java:1302)
      [4] java.awt.font.TextLayout.fastInit(TextLayout.java:537)
      [5] java.awt.font.TextLayout.<init>(TextLayout.java:342)
      [6] FontStress.run(FontStress.java:39)
      [7] java.lang.Thread.run(Thread.java:479)


      I have reproduced the problem under SunOS 5.6 and 5.8 (Solaris 2.6 and Solaris 8) on an Ultra60 and Ultra10 respectively.

      Here's the

      % cat /etc/release
                                 Solaris 8 s28_38shwp2 SPARC
                 Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
                                  Assembled 21 January 2000
      % swap -s
      total: 354704k bytes allocated + 21408k reserved = 376112k used, 515832k available

      % prtconf | grep -i mega
      Memory size: 512 Megabytes


      OS patches:
      % showrev -p | nawk '{print $2}'
      108131-03
      108132-03
      107424-02
      108127-02

      % java -version
      java version "1.2.2"
      Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunwjit)

      % env | grep JAVA
      JAVA2D_USEPLATFORMFONT=

      tom.gould@east 2000-05-10

            dougfelt Doug Felt
            tgould Tom Gould (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: