JDK-4108102 : SIGSEGV in VM initialization on locale ja
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.2.0
  • Priority: P1
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1
  • CPU: generic
  • Submitted: 1998-01-30
  • Updated: 1998-02-04
  • Resolved: 1998-02-04
Related Reports
Duplicate :  
Relates :  
Description
$ export LC_ALL=ja
$ /usr/green/bin/jdkx -b /export/local/putback/build/solaris hotjava
/export/local/putback/build/solaris/bin/java -classpath .:/usr/local/java/hjb1.1.2/solaris/lib/classes.zip:/usr/local/java/hjb1.1.2/solaris/lib/ssl.zip:/usr/local/java/hjb1.1.2/solaris/lib:/export/local/putback/build/solaris/lib/classes.zip:/export/local/putback/build/solaris/classes -Dhotjava.home=/usr/local/java/hjb1.1.2/solaris -mx32m sunw.hotjava.Main
SIGSEGV   11*  segmentation violation
    si_signo [11]: SIGSEGV   11*  segmentation violation
    si_errno [0]: Error 0
    si_code [1]: SEGV_MAPERR [addr: 0x0]

        stackbase=F0000000, stackpointer=EFFFDA68

Full thread dump:
    "CachedReference sweeper" (TID:0xed632b90, sys_thread_t:0x5bb30, state:CW) prio=9
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:315)
        at java.lang.Runtime.waitForMemoryAdvice(Runtime.java:569)
        at java.lang.ref.CachedReference$Sweeper.run(CachedReference.java:346)
        at java.lang.Thread.run(Thread.java:490)
    "Finalizer" (TID:0xed632318, sys_thread_t:0x4fa80, state:CW) prio=8
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:86)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:99)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:131)
    "Reference handler" (TID:0xed6323c8, sys_thread_t:0x46e90, state:CW) prio=10
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:315)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:198)
    "Async Garbage Collector" (TID:0xed6321b0, sys_thread_t:0x48148, state:R) prio=1
    "Idle thread" (TID:0xed6321f8, sys_thread_t:0x48028, state:R) prio=0
    "Clock" (TID:0xed6322d0, sys_thread_t:0x3f7a0, state:CW) prio=12
    "main" (TID:0xed632038, sys_thread_t:0x20a30, state:R) prio=5 *current thread*
        at java.lang.System.initProperties(Native Method)
        at java.lang.System.initializeSystemClass(System.java:664)
Monitor Cache Dump:
Registered Monitor Dump:
    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 IO lock: <unowned>
    Child death monitor: <unowned>
    Event monitor: <unowned>
    I/O monitor: <unowned>
    Alarm monitor: <unowned>
        Waiting to be notified:
            "Clock" (0x3f7a0)
    Sbrk lock: <unowned>
    Thread queue lock: <unowned>
    Monitor registry: owner "main" (0x20a30, 1 entry)
Thread Alarm Q:
/usr/green/bin/jdkx[12]: 9311 Abort(coredump)
$ /usr/green/bin/jdkx -b /export/local/putback/build/solaris swingset
cd /export/local/putback/build/solaris/demo/jfc/SwingSet
/export/local/putback/build/solaris/bin/java SwingSet
SIGSEGV   11*  segmentation violation
    si_signo [11]: SIGSEGV   11*  segmentation violation
    si_errno [0]: Error 0
    si_code [1]: SEGV_MAPERR [addr: 0x0]

        stackbase=F0000000, stackpointer=EFFFDB88

Full thread dump:
    "CachedReference sweeper" (TID:0xee300b90, sys_thread_t:0x59518, state:CW) prio=9
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:315)
        at java.lang.Runtime.waitForMemoryAdvice(Runtime.java:569)
        at java.lang.ref.CachedReference$Sweeper.run(CachedReference.java:346)
        at java.lang.Thread.run(Thread.java:490)
    "Finalizer" (TID:0xee300318, sys_thread_t:0x449b0, state:CW) prio=8
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:86)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:99)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:131)
    "Reference handler" (TID:0xee3003c8, sys_thread_t:0x3cde8, state:CW) prio=10
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:315)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:198)
    "Async Garbage Collector" (TID:0xee3001b0, sys_thread_t:0x3db88, state:R) prio=1
    "Idle thread" (TID:0xee3001f8, sys_thread_t:0x3da68, state:R) prio=0
    "Clock" (TID:0xee3002d0, sys_thread_t:0x37148, state:CW) prio=12
    "main" (TID:0xee300038, sys_thread_t:0x20a30, state:R) prio=5 *current thread*
        at java.lang.System.initProperties(Native Method)
        at java.lang.System.initializeSystemClass(System.java:664)
Monitor Cache Dump:
Registered Monitor Dump:
    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 IO lock: <unowned>
    Child death monitor: <unowned>
    Event monitor: <unowned>
    I/O monitor: <unowned>
    Alarm monitor: <unowned>
        Waiting to be notified:
            "Clock" (0x37148)
    Sbrk lock: <unowned>
    Thread queue lock: <unowned>
    Monitor registry: owner "main" (0x20a30, 1 entry)
Thread Alarm Q:
/usr/green/bin/jdkx[12]: 9322 Abort
$ /usr/green/bin/jdkx -b /export/local/putback/build/solaris demo -all

    The demos will be run in sequence.  When you're finished with one,
    exit the appletviewer and the next one will appear.

/export/local/putback/build/solaris/bin/java sun.applet.AppletViewer file:/export/local/putback/build/solaris/demo/applets/Animator/example1.html
SIGSEGV   11*  segmentation violation
    si_signo [11]: SIGSEGV   11*  segmentation violation
    si_errno [0]: Error 0
    si_code [1]: SEGV_MAPERR [addr: 0x0]

        stackbase=F0000000, stackpointer=EFFFDB48

Full thread dump:
    "CachedReference sweeper" (TID:0xee300b90, sys_thread_t:0x59498, state:CW) prio=9
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:315)
        at java.lang.Runtime.waitForMemoryAdvice(Runtime.java:569)
        at java.lang.ref.CachedReference$Sweeper.run(CachedReference.java:346)
        at java.lang.Thread.run(Thread.java:490)
    "Finalizer" (TID:0xee300318, sys_thread_t:0x44930, state:CW) prio=8
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:86)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:99)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:131)
    "Reference handler" (TID:0xee3003c8, sys_thread_t:0x3cd68, state:CW) prio=10
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:315)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:198)
    "Async Garbage Collector" (TID:0xee3001b0, sys_thread_t:0x3db08, state:R) prio=1
    "Idle thread" (TID:0xee3001f8, sys_thread_t:0x3d9e8, state:R) prio=0
    "Clock" (TID:0xee3002d0, sys_thread_t:0x370c8, state:CW) prio=12
    "main" (TID:0xee300038, sys_thread_t:0x20a30, state:R) prio=5 *current thread*
        at java.lang.System.initProperties(Native Method)
        at java.lang.System.initializeSystemClass(System.java:664)
Monitor Cache Dump:
Registered Monitor Dump:
    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 IO lock: <unowned>
    Child death monitor: <unowned>
    Event monitor: <unowned>
    I/O monitor: <unowned>
    Alarm monitor: <unowned>
        Waiting to be notified:
            "Clock" (0x370c8)
    Sbrk lock: <unowned>
    Thread queue lock: <unowned>
    Monitor registry: owner "main" (0x20a30, 1 entry)
Thread Alarm Q:
/usr/green/bin/jdkx[12]: 9336 Abort(coredump)

Comments
EVALUATION The crash appears to be caused by moving i18n converters into the extension directory. This is a bootstrap problem. In the Japanese locale, sun.io.ByteToCharConverter failed to load because somehow its static initializer requires the *VM* class loader to load CharToByteEUCJIS class (the class name passed to the findSystemClass0 method at the top of stack trace below). Note that all this happens before the extension class loader is even constructed. (dbx) print printStackTrace(EE(), 1000) at java.lang.ClassLoader.findSystemClass0(Native Method) at java.lang.ClassLoader.findSystemClass(ClassLoader.java:371) at java.lang.ClassLoader.loadClass(ClassLoader.java:228) at java.lang.ClassLoader.loadClass(ClassLoader.java:179) at sun.io.CharToByteConverter.getConverterClass(CharToByteConverter.java :101) at sun.io.CharToByteConverter.getDefaultConverterClass(CharToByteConvert er.java:119) at sun.io.CharToByteConverter.<clinit>(CharToByteConverter.java:72) at java.lang.String.getBytes(String.java:539) at java.io.File.list0(Native Method) at java.io.File.list(File.java:760) at sun.misc.ExtClassLoader.getExtURLs(ExtClassLoader.java:74) at sun.misc.ExtClassLoader.<init>(ExtClassLoader.java:43) at sun.misc.ExtClassLoader.<init>(ExtClassLoader.java:36) at sun.misc.Launcher.getExtClassLoader(Launcher.java:264) at sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java :98) at sun.io.ByteToCharConverter.getDefaultConverterClass(ByteToCharConvert er.java:118) at sun.io.ByteToCharConverter.<clinit>(ByteToCharConverter.java:71) at java.lang.System.initProperties(Native Method) at java.lang.System.initializeSystemClass(System.java:664) The reason for the crash is that the VM fails to deal with a failure condition on loading ByteToCharConverter at start-up time. This is part of the somewhat ugly makeJavaStringFromPlatformCString code left over from 1.1 time: byteToChar = (Hsun_io_ByteToCharConverter *) execute_java_static_method (ee, FindClass(ee, "sun/io/ByteToCharConverter", TRUE), "getConverter", "(Ljava/lang/String;)Lsun/io/ByteToCharConverter;", makeJavaString(encoding, strlen(encoding))); Note that the result value of FindClass(ee, "sun/io/ByteTo...) is not checked. sheng.liang@Eng 1998-01-30 BTW, this bug is reproducible by running any Java program under the "ja" (and I suspect any other foreign) locale. You don't have to run Hotjava. However, you need to run it on a machine with "ja" locale installed, such as Norbert's machine (called lindenberg). sheng.liang@Eng 1998-01-30
30-01-1998