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

sun/java2d/SurfaceData doesn't compile with empty DISPLAY

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 5.0
    • client-libs
    • None
    • 2d
    • generic
    • solaris_2.6

      When running java_g with -XX:+CompileTheWorld, the sun/java2d/SurfaceData class gets
      compiled and it's static initializer is being called. If DISPLAY is set to nothing,
      then the initializer calls the DGA library with empty DISPLAY and fails with a core dump.
      If DISPLAY is set to something, this doesn't happen. Looks like a bug in the DGA
      library, but I guess it could be worked around by checking the DISPLAY variable for a
      non empty value before calling the DGA code. Please advice. Otherwise, -XX:+CompileTheWorld
      doesn't work. Please see the stack trace and original description from HP below.

      =>[1] _fini(0x6, 0x0, 0xffbfc180, 0x0, 0x1, 0xffbfb9d4), at 0xff31e42c
       [2] _atoll(0x0, 0xffbfc218, 0x0, 0xfffffff8, 0x0, 0xffbfc241), at 0xff2b5c60
       [3] os::abort(0x1, 0xfef51412, 0xb, 0x2a200, 0x0, 0x0), at 0xfeaa2498
       [4] os::handle_unexpected_exception(0x43520, 0xb, 0xd1fbf014, 0xffbfd170, 0x0,
      0x0), at 0xfea95400
       [5] JVM_handle_solaris_signal(0xb, 0xffbfd170, 0xffbfceb8, 0x1, 0x0, 0x0), at
      0xfeab2d48
       [6] signalHandler(0xb, 0xffbfd170, 0xffbfceb8, 0x0, 0x0, 0x0), at 0xfeaa7ae8
       [7] 0xff3861a0(0xb, 0xffbfd170, 0xffbfceb8, 0xfeaa7a98, 0x0, 0x0), at 0xff3861
      9f
       [8] take_deferred_signal(0xb, 0xffbfd170, 0xffbfceb8, 0x0, 0x0, 0x0), at 0xff3
      7fed0
       [9] sigaction_internal(0xb, 0xffbfd170, 0xffbfceb8, 0xfffffff8, 0xffffffe0, 0x
      db473389), at 0xff380080
       [10] Solaris_DGA_Available(0x0, 0x0, 0x0, 0xffbfd2cc, 0xfdc21298, 0xd23d7b68),
      at 0xdb480e98
       [11] Solaris_DGA_LibInit(0x435cc, 0xd242a774, 0x0, 0x0, 0x0, 0x0), at 0xdb480f
      c8
       [12] Java_sun_awt_X11SurfaceData_initIDs(0x435cc, 0xffbfd440, 0xffbfd4bc, 0xff
      ffffff, 0xb8, 0x0), at 0xd23d7d1c
       [13] 0xdc000424(0x435cc, 0xffbfd440, 0xffbfd4bc, 0xffffffff, 0xb8, 0x0), at 0x
      dc000423
       [14] 0xdc011c58(0x43520, 0xb8, 0x0, 0x4, 0xffbfd45c, 0xffbfd458), at 0xdc011c5
      7
       [15] 0xdc006544(0xd9f98ea8, 0x43520, 0x0, 0xdc0287b0, 0xfeeaf3e1, 0xffbfd4e0),
      at 0xdc006543
       [16] 0xdc0001c8(0xffbfd5c8, 0xffbfd7a0, 0xa, 0xd9f98ea8, 0xdc00eb20, 0xffbfd7b
      4), at 0xdc0001c7
       [17] JavaCalls::call_helper(0xffbfd7b4, 0xdc000140, 0xffbfd7ac, 0x43520, 0x0,
      0x43b55), at 0xfe6f3030
       [18] os::os_exception_wrapper(0xfe6f2910, 0xffbfd798, 0xffbfd814, 0xffbfd7ac,
      0x43520, 0x43b55), at 0xfeaa79cc
       [19] JavaCalls::call(0xffbfd798, 0xffbfd814, 0xffbfd7ac, 0x43520, 0xffbfd6ec,
      0x43520), at 0xfe6f289c
       [20] instanceKlass::call_class_initializer_impl(0xffbfd894, 0x43520, 0xd9f990d
      8, 0xffbfd7f4, 0xffbfd81c, 0xffbfd818), at 0xfe65ebc4
       [21] instanceKlass::call_class_initializer(0xd9f990e0, 0x43520, 0x43520, 0x435
      20, 0xffbfd984, 0x0), at 0xfe65e8a8
       [22] instanceKlass::initialize_impl(0xffbfda60, 0x43520, 0xd9f990d8, 0x43520,
      0x81010100, 0xff00), at 0xfe65cce4
       [23] instanceKlass::initialize(0xd9f990e0, 0x43520, 0xd9f990d8, 0x43520, 0x436
      f6d, 0xffbfdaf8), at 0xfe65b80c
       [24] ClassLoader::compile_the_world_in(0x5cb06a0, 0xffbfe38c, 0x43520, 0x7efef
      eff, 0x81010100, 0xff00), at 0xfe431764
       [25] ClassPathZipEntry::compile_the_world13(0x9ed98, 0xffbfe40c, 0x43520, 0xff
      fffff8, 0x0, 0x43fdd), at 0xfe430e54
       [26] ClassPathZipEntry::compile_the_world(0x9ed98, 0xffbfe484, 0x43520, 0xd6f7
      b3e4, 0xf6, 0xd6f7b660), at 0xfe430b94
       [27] ClassLoader::compile_the_world(0x0, 0xff0b796c, 0x0, 0x0, 0x0, 0x0), at 0
      xfe4313bc
       [28] JNI_CreateJavaVM(0xffbfee90, 0xffbfee8c, 0xffbfe5b4, 0xfffffff8, 0xffffff
      e0, 0xffbfe5cd), at 0xfe74718c
       [29] InitializeJVM(0xffbfee90, 0xffbfee8c, 0xffbfee64, 0x28cf0, 0xffbfee6c, 0x
      400), at 0x1319c
       [30] main(0xffbfee60, 0xffbfeefc, 0xffbfef1c, 0x28800, 0x0, 0x0), at 0x11328
      (/java/devtools/sparc/SUNWspro/SC6.1/bin/../WS6U1/bin/sparcv9/dbx)

      ================= original description from HP ==============================

      CompileTheWorld dies with signal 11

      running 1.4.2 java_g (reproducible with 1.5.0 as well):

      export DISPLAY=""
      java_g -Xcomp -Xbatch -XX:+CompileTheWorld -XX:-DontCompileHugeMethods
      -XX:ReservedCodeCacheSize=500M hiworld

      results in SIGSEGV, (problem occurs in all 1.4 releases)

      CompileTheWorld (7734) : sun/security/action/GetIntegerAction
      CompileTheWorld (7735) : sun/awt/RepaintArea
      CompileTheWorld (7736) : java/awt/Transparency
      CompileTheWorld (7737) : sun/java2d/SurfaceData

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

      Current Java thread:
              at sun.awt.X11SurfaceData.initIDs(Native Method)
              at sun.awt.X11SurfaceData.<clinit>(X11SurfaceData.java:166)

      Dynamic libraries:
      0x10000 /solaris/jdk1.4.2/bin/java_g
      0xff350000 /usr/lib/libthread.so.1
      0xff390000 /usr/lib/libdl.so.1
      0xff200000 /usr/lib/libc.so.1
      0xff330000 /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
      0xfd400000
      /jdk1.4.2/jre/lib/sparc/server/libjvm_g.so
      0xff2d0000 /usr/lib/libCrun.so.1
      0xff1d0000 /usr/lib/libsocket.so.1
      0xff100000 /usr/lib/libnsl.so.1
      0xff0d0000 /usr/lib/libm.so.1
      0xff0b0000 /usr/lib/libsched.so.1
      0xff300000 /usr/lib/libw.so.1
      0xff090000 /usr/lib/libmp.so.2
      0xff050000
      /solaris/jdk1.4.2/jre/lib/sparc/native_threads/libhpi_
      g.so
      0xfe7d0000
      /solaris/jdk1.4.2/jre/lib/sparc/libverify_g.so
      0xfe780000
      /solaris/jdk1.4.2/jre/lib/sparc/libjava_g.so
      0xfe740000
      /solaris/jdk1.4.2/jre/lib/sparc/libzip_g.so
      0xfe4b0000 /usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.2
      0xfe490000
      /solaris/jdk1.4.2/jre/lib/sparc/libioser12_g.so
      0xf0480000
      /solaris/jdk1.4.2/jre/lib/sparc/libcmm_g.so
      0xfe420000
      /solaris/jdk1.4.2/jre/lib/sparc/libjpeg_g.so
      0xf0300000
      /solaris/jdk1.4.2/jre/lib/sparc/libawt_g.so
      0xf0200000
      /solaris/jdk1.4.2/jre/lib/sparc/libmlib_image_g.so
      0xf0100000
      /solaris/jdk1.4.2/jre/lib/sparc/motif21/libmawt_g.so
      0xefe80000 /usr/dt/lib/libXm.so.4
      0xfd390000 /usr/openwin/lib/libXt.so.4
      0xfd2d0000 /usr/openwin/lib/libXext.so.0
      0xfd2b0000 /usr/openwin/lib/libXtst.so.1
      0xfd1d0000 /usr/openwin/lib/libXmu.so.4
      0xefd80000 /usr/openwin/lib/libX11.so.4
      0xfb7a0000 /usr/openwin/lib/libdps.so.5
      0xfd1b0000 /usr/openwin/lib/libSM.so.6
      0xfb6d0000 /usr/openwin/lib/libICE.so.6
      0xfb6a0000 /usr/openwin/lib/libdga.so.1
      0xefb00000
      /solaris/jdk1.4.2/jre/lib/sparc/libfontmanager_g.so
      0xef800000
      /solaris/jdk1.4.2/jre/lib/sparc/libjsound_g.so
      0xfb5b0000
      /solaris/jdk1.4.2/jre/lib/sparc/libnet_g.so
      0xfb590000
      /solaris/jdk1.4.2/jre/lib/sparc/librmi_g.so
      0xef400000
      /solaris/jdk1.4.2/jre/lib/sparc/libmlib_image_v_g.so
      0xfb570000
      /solaris/jdk1.4.2/jre/lib/sparc/libnio_g.so
      0xfafe0000 /usr/lib/librt.so.1
      0xfafc0000 /usr/lib/libaio.so.1
      0xfafa0000
      /solaris/jdk1.4.2/jre/lib/sparc/libsunwjdga_g.so

      Heap at VM Abort:
      Heap
       def new generation total 2560K, used 1209K [0xf0800000, 0xf0a90000,
      0xf1d50000)
        eden space 2496K, 48% used [0xf0800000, 0xf092e430, 0xf0a70000)
        from space 64K, 0% used [0xf0a70000, 0xf0a70000, 0xf0a80000)
        to space 64K, 0% used [0xf0a80000, 0xf0a80000, 0xf0a90000)
       tenured generation total 5176K, used 3102K [0xf1d50000, 0xf225e000,
      0xf4800000)
         the space 5176K, 59% used [0xf1d50000, 0xf20578a8, 0xf2057a00,
      0xf225e000)
       compacting perm gen total 35840K, used 35835K [0xf4800000, 0xf6b00000,
      0xf8800000)
         the space 35840K, 99% used [0xf4800000, 0xf6afed80, 0xf6afee00,
      0xf6b00000)

      Local Time = Thu Jun 12 09:41:47 2003
      Elapsed Time = 626
      #
      # The exception above was detected in native code outside the VM
      #
      # Java VM: Java HotSpot(TM) Server VM (1.4.2-rc-b25-debug compiled mode)
      #
      # An error report file has been saved as hs_err_pid1724.log.
      # Please refer to the file for further information.
      #
      Dumping core....
      Abort
      The testcase hiworld.java is as follows

      public class hiworld {
         static public void main( String[] args ) {
            System.out.println( "hi world!" );
            System.exit( 0 );
            }
         }

      Bug Workaround: Setting the DISPLAY variable prevents the SIGSEGV.

            campbell Christopher Campbell (Inactive)
            ksoshals Kirill Soshalskiy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: