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

JNI Apps crash with SIGABRT using 1.4.1_01 on Linux

    Details

    • Subcomponent:
    • Resolved In Build:
      03
    • CPU:
      x86
    • OS:
      linux_redhat_7.2

      Backports

        Description

        On Red Hat Linux release 7.3 Kernel 2.4.18-3smp on an i686 with
        j2sdk-1_4_1_01-linux-i586
        java version "1.4.1_01"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
        Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

        Using gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)

        JNI program crash (with SIGABRT) while re-throwing an exception from the
        JNI layer in JDK 1.4.1 on Linux.

        Actual Output from testcase
        --------------------------
        Hello world!
        before doit
        throwing
        Abort


        This behavior is not seen with JDK 1.2.2_014 and on Solaris using JDK 1.4.1_01.

        Expected / Actual Output
        ------------------------
        Hello world!
        before doit
        throwing
        re-throwing in bad_alloc
        caught bad_alloc

        Testcase is located in the attachments and the native stack trace is below.

        GNU gdb Red Hat Linux (5.1.90CVS-5)
        Copyright 2002 Free Software Foundation, Inc.
        GDB is free software, covered by the GNU General Public License, and you are
        welcome to change it and/or distribute copies of it under certain
        conditions.
        Type "show copying" to see the conditions.
        There is absolutely no warranty for GDB. Type "show warranty" for details.
        This GDB was configured as "i386-redhat-linux"...
        (no debugging symbols found)...
        Core was generated by `java -Djava.library.path=. HelloWorld'.
        Program terminated with signal 6, Aborted.
        Reading symbols from /lib/i686/libpthread.so.0...
        (no debugging symbols found)...done.
        Loaded symbols for /lib/i686/libpthread.so.0
        Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
        Loaded symbols for /lib/libdl.so.2
        Reading symbols from /lib/i686/libc.so.6...(no debugging symbols
        found)...done.
        Loaded symbols for /lib/i686/libc.so.6
        Reading symbols from /lib/ld-linux.so.2...(no debugging symbols
        found)...done.
        Loaded symbols for /lib/ld-linux.so.2
        Reading symbols from
        /home/albert/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so...done.
        Loaded symbols for /home/albert/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
        Reading symbols from /lib/libnsl.so.1...done.
        Loaded symbols for /lib/libnsl.so.1
        Reading symbols from /lib/i686/libm.so.6...done.
        Loaded symbols for /lib/i686/libm.so.6
        Reading symbols from
        /home/albert/j2sdk1.4.1_01/jre/lib/i386/native_threads/libhpi.so...done.
        Loaded symbols for
        /home/albert/j2sdk1.4.1_01/jre/lib/i386/native_threads/libhpi.so
        Reading symbols from /home/albert/j2sdk1.4.1_01/jre/lib/i386/libverify.so...
        done.
        Loaded symbols for /home/albert/j2sdk1.4.1_01/jre/lib/i386/libverify.so
        Reading symbols from
        /home/albert/j2sdk1.4.1_01/jre/lib/i386/libjava.so...done.
        Loaded symbols for /home/albert/j2sdk1.4.1_01/jre/lib/i386/libjava.so
        Reading symbols from
        /home/albert/j2sdk1.4.1_01/jre/lib/i386/libzip.so...done.
        Loaded symbols for /home/albert/j2sdk1.4.1_01/jre/lib/i386/libzip.so
        Reading symbols from /lib/libnss_files.so.2...done.
        Loaded symbols for /lib/libnss_files.so.2
        Reading symbols from /home/albert/CBOE/linux/libhello.so...done.
        Loaded symbols for /home/albert/CBOE/linux/libhello.so
        #0 0x42029241 in kill () from /lib/i686/libc.so.6
        (gdb) where
        #0 0x42029241 in kill () from /lib/i686/libc.so.6
        #1 0x40033c4b in raise () from /lib/i686/libpthread.so.0
        #2 0x4202a7d2 in abort () from /lib/i686/libc.so.6
        #3 0x40345125 in __default_terminate () at ../../gcc/libgcc2.c:-1
        #4 0x40345142 in __terminate ()
           from /home/albert/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
        #5 0x4c6fde41 in __rethrow (index=0x4c7042ec)
           from /home/albert/CBOE/linux/libhello.so
        #6 0x4c6fcc32 in TestClass::doit (this=0xbfffd6c3) at TestClass.cpp:21
        #7 0x4c6fcd4b in TestClass::run (this=0xbfffd6c3) at TestClass.cpp:27
        #8 0x4c6fcb92 in Java_HelloWorld_displayHelloWorld (env=0x8051bec,
            obj=0xbfffd700) at HelloWorldImpl.cpp:12
        #9 0x423f9b52 in ?? ()
        #10 0x423f3ddb in ?? ()
        #11 0x423f1104 in ?? ()
        #12 0x40245116 in JavaCalls::call_helper ()
           from /home/albert/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
        #13 0x402dff45 in os::os_exception_wrapper ()
           from /home/albert/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
        #14 0x402451f4 in JavaCalls::call ()
           from /home/albert/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
        #15 0x4024d01c in jni_invoke_static ()
           from /home/albert/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
        #16 0x4025aa2a in jni_CallStaticVoidMethod ()
           from /home/albert/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
        #17 0x080494a5 in strcpy ()
        #18 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6
        (gdb)

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  atongschsunw Albert Tong-schmidt (Inactive)
                  Reporter:
                  atongschsunw Albert Tong-schmidt (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: