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

Program including only logics crashed with EXCEPTION_ACCESS_VIOLATION

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • hs15
    • 6, 6u21
    • hotspot
    • x86
    • linux_redhat_5.0, windows_xp

        FULL PRODUCT VERSION :
        java version "1.6.0_03"
        Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
        Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)

        FULL OS VERSION :
        Microsoft Windows XP Professional Version 2002 Service Pack 2

        A DESCRIPTION OF THE PROBLEM :
        Complie file Main.java including contents described later, which has only logics with a little complex inheritance, and run then crush VM with message EXCEPTION_ACCESS_VIOLATION.

        Also I found that it is crushed by EXCEPTION_ACCESS_VIOLATION for Java 5.0 (jdk1.5.0_14) in the same Windows XP, and SIGSEGV for jdk1.5.0_10 in (uncertain) Linux OS.

        It seems that adding or deleting odd number of dummy methods prevents the crush.

        THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Yes

        THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        javac Main.java
        java Main

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        #
        # An unexpected error has been detected by Java Runtime Environment:
        #
        # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000001, pid=3968, tid=2644
        #
        # Java VM: Java HotSpot(TM) Client VM (1.6.0_03-b05 mixed mode, sharing)
        # Problematic frame:
        # C 0x00000001
        #
        # If you would like to submit a bug report, please visit:
        # http://java.sun.com/webapps/bugreport/crash.jsp
        #

        --------------- T H R E A D ---------------

        Current thread (0x002e6000): JavaThread "main" [_thread_in_vm, id=2644]

        siginfo: ExceptionCode=0xc0000005, reading address 0x00000001

        Registers:
        EAX=0x26a17cd0, EBX=0x002e6000, ECX=0x26a17d10, EDX=0x002e5a08
        ESP=0x0092fa70, EBP=0x00420001, ESI=0x2ad9b2f8, EDI=0x002e5a0c
        EIP=0x00000001, EFLAGS=0x00010206

          Top of Stack: (sp=0x0092fa70)
        0x0092fa70: 6d99b9f6 002e5058 26a18978 00000000
        0x0092fa80: 002e6000 002e5a10 26a17b10 2a9d0020
        0x0092fa90: 002e5a08 002e5058 00000009 002e5a08
        0x0092faa0: 002e5058 00000000 00420001 002e5030
        0x0092fab0: 002e5058 002e5424 6d99c32d 002e6000
        0x0092fac0: 002e5010 002e58b0 002e5a14 002e5ca4
        0x0092fad0: 0092fc8c 6d99c42f 00000160 002e5a0c
        0x0092fae0: 00000001 002e6000 002e6000 002e590c

        Instructions: (pc=0x00000001)
        0xfffffff1:


        Stack: [0x008e0000,0x00930000), sp=0x0092fa70, free space=318k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        C 0x00000001

        Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
        j Main.main([Ljava/lang/String;)V+3
        v ~StubRoutines::call_stub

        --------------- P R O C E S S ---------------

        Java Threads: ( => current thread )
          0x02b22000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3692]
          0x02b1d400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=720]
          0x02b1c000 JavaThread "Attach Listener" daemon [_thread_blocked, id=1148]
          0x02b0b800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=400]
          0x02abe400 JavaThread "Finalizer" daemon [_thread_blocked, id=3632]
          0x02abd400 JavaThread "Reference Handler" daemon [_thread_blocked, id=3584]
        =>0x002e6000 JavaThread "main" [_thread_in_vm, id=2644]

        Other Threads:
          0x02abc000 VMThread [id=3888]
          0x02b23400 WatcherThread [id=3852]

        VM state:not at safepoint (normal execution)

        VM Mutex/Monitor currently owned by a thread: None

        Heap
         def new generation total 960K, used 226K [0x229d0000, 0x22ad0000, 0x22eb0000)
          eden space 896K, 25% used [0x229d0000, 0x22a08820, 0x22ab0000)
          from space 64K, 0% used [0x22ab0000, 0x22ab0000, 0x22ac0000)
          to space 64K, 0% used [0x22ac0000, 0x22ac0000, 0x22ad0000)
         tenured generation total 4096K, used 0K [0x22eb0000, 0x232b0000, 0x269d0000)
           the space 4096K, 0% used [0x22eb0000, 0x22eb0000, 0x22eb0200, 0x232b0000)
         compacting perm gen total 12288K, used 290K [0x269d0000, 0x275d0000, 0x2a9d0000)
           the space 12288K, 2% used [0x269d0000, 0x26a18a60, 0x26a18c00, 0x275d0000)
            ro space 8192K, 66% used [0x2a9d0000, 0x2af1f860, 0x2af1fa00, 0x2b1d0000)
            rw space 12288K, 52% used [0x2b1d0000, 0x2b81f078, 0x2b81f200, 0x2bdd0000)

        Dynamic libraries:
        0x00400000 - 0x00423000 C:\Program Files\Java\jdk1.6.0_03\bin\java.exe
        0x7c940000 - 0x7c9dd000 C:\WINDOWS\system32\ntdll.dll
        0x7c800000 - 0x7c932000 C:\WINDOWS\system32\kernel32.dll
        0x77d80000 - 0x77e29000 C:\WINDOWS\system32\ADVAPI32.dll
        0x77e30000 - 0x77ec2000 C:\WINDOWS\system32\RPCRT4.dll
        0x77fa0000 - 0x77fb1000 C:\WINDOWS\system32\Secur32.dll
        0x7c340000 - 0x7c396000 C:\Program Files\Java\jdk1.6.0_03\jre\bin\msvcr71.dll
        0x6d870000 - 0x6daba000 C:\Program Files\Java\jdk1.6.0_03\jre\bin\client\jvm.dll
        0x77cf0000 - 0x77d7f000 C:\WINDOWS\system32\USER32.dll
        0x77ed0000 - 0x77f17000 C:\WINDOWS\system32\GDI32.dll
        0x76af0000 - 0x76b1b000 C:\WINDOWS\system32\WINMM.dll
        0x762e0000 - 0x762fd000 C:\WINDOWS\system32\IMM32.DLL
        0x60740000 - 0x60749000 C:\WINDOWS\system32\LPK.DLL
        0x73f80000 - 0x73feb000 C:\WINDOWS\system32\USP10.dll
        0x77bc0000 - 0x77c18000 C:\WINDOWS\system32\msvcrt.dll
        0x6d3c0000 - 0x6d3c8000 C:\Program Files\Java\jdk1.6.0_03\jre\bin\hpi.dll
        0x76ba0000 - 0x76bab000 C:\WINDOWS\system32\PSAPI.DLL
        0x6d820000 - 0x6d82c000 C:\Program Files\Java\jdk1.6.0_03\jre\bin\verify.dll
        0x6d460000 - 0x6d47f000 C:\Program Files\Java\jdk1.6.0_03\jre\bin\java.dll
        0x6d860000 - 0x6d86f000 C:\Program Files\Java\jdk1.6.0_03\jre\bin\zip.dll

        VM Arguments:
        java_command: Main
        Launcher Type: SUN_STANDARD

        Environment Variables:
        JAVA_HOME=C:\Program Files\Java\jdk1.6.0_03
        PATH=C:\Program Files\Java\jdk1.6.0_03\bin;C:\ant\bin;C:\agntctrl.win_ia32-TPTP-4.3.1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\svk\bin
        USERNAME=ikeda
        OS=Windows_NT
        PROCESSOR_IDENTIFIER=x86 Family 6 Model 14 Stepping 12, GenuineIntel



        --------------- S Y S T E M ---------------

        OS: Windows XP Build 2600 Service Pack 2

        CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 14 stepping 12, cmov, cx8, fxsr, mmx, sse, sse2, sse3

        Memory: 4k page, physical 1562604k(712752k free), swap 2971584k(2253852k free)

        vm_info: Java HotSpot(TM) Client VM (1.6.0_03-b05) for windows-x86, built on Sep 24 2007 22:24:33 by "java_re" with unknown MS VC++:1310



        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        public class Main {
            public static void main(String[] args) {
                System.out.println(new C());
            }
        }

        interface I {
            void i0();
            void i1();
        }

        abstract class A {
            void a0() {}
            abstract void i0();
        }

        abstract class B extends A implements I {
            void b0() {}
        }

        class C extends B {
            @Override public void i0() {}
            public void i1() {}
            void c0() {}
        }

        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        Use delegate instead of complex inheritance (?)
        Reproduced on Solaris-x64:

        % javac -g Main.java
        % java -showversion Main
        java version "1.7.0-ea"
        Java(TM) SE Runtime Environment (build 1.7.0-ea-b23)
        Java HotSpot(TM) Server VM (build 12.0-b01, mixed mode)

        #
        # An unexpected error has been detected by Java Runtime Environment:
        #
        # SIGSEGV (0xb) at pc=0xfea80850, pid=14666, tid=2
        #
        # Java VM: Java HotSpot(TM) Server VM (12.0-b01 mixed mode solaris-x86)
        # Problematic frame:
        # V [libjvm.so+0x480850]
        #
        # An error report file with more information is saved as:
        # /var/tmp/tbell/pub/tmpjava/hs_err_pid14666.log
        #
        # If you would like to submit a bug report, please visit:
        # http://java.sun.com/webapps/bugreport/crash.jsp
        #
        zsh: IOT instruction (core dumped) java -showversion Main


        % dbx /opt/java/jdk1.7.0/bin/java core
        Reading java
         [...snip...]
        (dbx) thread t@2
        t@2 (l@2) stopped in __lwp_kill at 0xfeea3307
        0xfeea3307: __lwp_kill+0x0007: jae __lwp_kill+0x15 [ 0xfeea3315, .+0xe ]

        (dbx) where
        current thread: t@2
        =>[1] __lwp_kill(0x2, 0x6), at 0xfeea3307
          [2] raise(0x6), at 0xfee58402
          [3] abort(0xfeccc000, 0xfe3d6468, 0xfe3d6468, 0xfeb95d63, 0x1, 0xfe3d65e4), at 0xfee35f0d
          [4] os::abort(0x1), at 0xfeada434
          [5] VMError::report_and_die(0xfe3d64c0), at 0xfeb95d63
          [6] JVM_handle_solaris_signal(0xb, 0xfe3d67e4, 0xfe3d65e4, 0x1), at 0xfe71b111
          [7] signalHandler(0xb, 0xfe3d67e4, 0xfe3d65e4), at 0xfe71a912
          [8] __sighndlr(0xb, 0xfe3d67e4, 0xfe3d65e4, 0xfe71a8ec), at 0xfee9f6bf
          [9] call_user_handler(0xb, 0xfe3d67e4, 0xfe3d65e4), at 0xfee9459b
          [10] sigacthandler(0xb, 0xfe3d67e4, 0xfe3d65e4, 0xf, 0x0, 0x4), at 0xfee947e4
          ---- called from signal handler with signal 11 (SIGSEGV) ------
          [11] klassItable::initialize_itable_for_interface(0x8065b78, 0x158, 0x80660ac, 0x1, 0x8065800), at 0xfea80850
          [12] klassItable::initialize_itable(0x8065b78, 0x1, 0x8065800), at 0xfea807b7
          [13] instanceKlass::link_class_impl(0x8065fac, 0x1, 0x8065800), at 0xfe96af78
          [14] instanceKlass::link_class(0xb6fa2578, 0x8065800), at 0xfe6e3352
          [15] instanceKlass::initialize_impl(0x8065fa8, 0x8065800), at 0xfe6e345a
          [16] instanceKlass::initialize(0xb6fa2578, 0x8065800), at 0xfe6dc2a0
          [17] InterpreterRuntime::_new(0x8065800, 0xb6fa1220, 0x3, 0xfb2122f3, 0xf3e05c20, 0xfe3d6c58), at 0xfe70809c
          [18] 0xfb21231a(0xf3e29838, 0x8065800, 0x8065f5c, 0x1f80, 0xfeccc000, 0x1), at 0xfb21231a
          [19] 0xfb200347(0xfe3d6cd0, 0xfe3d6edc, 0xa, 0xb6fa1440, 0xfb208f60, 0xfe3d6dd4, 0x1, 0x8065800), at 0xfb200347
          [20] JavaCalls::call_helper(0xfe3d6ed8, 0xfe3d6da4, 0xfe3d6dd0, 0x8065800), at 0xfe6f4847
          [21] os::os_exception_wrapper(0xfe6f46a4, 0xfe3d6ed8, 0xfe3d6da4, 0xfe3d6dd0, 0x8065800), at 0xfe6f4aef
          [22] JavaCalls::call(0xfe3d6ed8, 0x8065f5c, 0xfe3d6dd0, 0x8065800), at 0xfe6f4b27
          [23] jni_invoke_static(0x8065914, 0xfe3d6ed8, 0x0, 0x0, 0x80e6e34, 0xfe3d6ee4, 0x8065800), at 0xfe774a6f
          [24] jni_CallStaticVoidMethod(0x8065914, 0x8066b10, 0x80e6e34, 0x8066b20), at 0xfe77d97c
          [25] JavaMain(0x80471f8), at 0xfef623f5
          [26] _thr_setup(0xfe370200), at 0xfee9f382
          [27] _lwp_start(), at 0xfee9f5e0

              acorn Karen Kinnear (Inactive)
              tbell Tim Bell
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: