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

Occasional SIGSEGV: non thread-safe use of strerr in getLastErrorString

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u51
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b85
    • CPU:
      x86
    • OS:
      linux

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "1.8.0_51"
        Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
        Java HotSpot(TM) Server VM (build 25.51-b03, mixed mode)

        FULL OS VERSION :
        Linux vm-obs-103 2.6.22.5-31-bigsmp #32 SMP Tue Feb 23 10:17:55 CET 2010 i686 i686 i386 GNU/Linux
        openSUSE 10.3

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        Reproducibility depend on glibc version.
        For instance, I can't reproduce this with CentOS 6.4 but I can reproduce it in OpenSUSE 10.3 (glibc 2.6.1)

        A DESCRIPTION OF THE PROBLEM :
        This is a revised version of the bug-report in JI-9023129 with more information.

        When an Exception is thrown because of some OS-error, like FileNotFoundException or SocketTimeoutException, an error message is constructed using getLastErrorString() which calls strerror(). strerr() is documented to be not thread-safe in the man pages. Concurrent modification of the returned static char* string by Exceptions throw in other Threads cause occasional segmentation faults, depending on the actual implementation of strerr() in glibc.

        THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Yes

        THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes

        REGRESSION. Last worked in version 6u45

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        while true; do jdk1.8.0_51/bin/java -server -cp . StrerrBug; done

        It usually will take several minutes units a core s dumped.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        dumps core.
        should not dump core.
        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # SIGSEGV (0xb) at pc=0xb7e77a08, pid=15824, tid=2246953872
        #
        # JRE version: Java(TM) SE Runtime Environment (8.0_51-b16) (build 1.8.0_51-b16)
        # Java VM: Java HotSpot(TM) Server VM (25.51-b03 mixed mode linux-x86 )
        # Problematic frame:
        # C [libc.so.6+0x6ca08] strcmp+0x8
        #
        # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
        #
        # If you would like to submit a bug report, please visit:
        # http://bugreport.java.com/bugreport/crash.jsp
        # The crash happened outside the Java Virtual Machine in native code.
        # See problematic frame for where to report the bug.
        #

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

        Current thread (0x081cec00): JavaThread "Test 1" [_thread_in_native, id=15837, stack(0x85e8c000,0x85edd000)]

        siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x00000021

        Registers:
        EAX=0x00000021, EBX=0xb7f39ff4, ECX=0x00000021, EDX=0xa7a0af08
        ESP=0x85edb904, EBP=0x85edb998, ESI=0x00000001, EDI=0x00000002
        EIP=0xb7e77a08, EFLAGS=0x00010202, CR2=0x00000021

        Top of Stack: (sp=0x85edb904)
        0x85edb904: b7e2f0e5 00000021 a7a0af08 081d92d8
        0x85edb914: 02a5b229 0000027b 85edbbe0 8662f7e8
        0x85edb924: b7e31d0b b7f39ff4 b7f1e139 00000000
        0x85edb934: 081dcf78 081dd060 85dff000 b7f1de61
        0x85edb944: 00000012 000004e9 0000024c 85e15e33
        0x85edb954: 00000026 00000019 00000422 a7a0af08
        0x85edb964: 081d790c b7f3ac20 00000000 85e03eac
        0x85edb974: 081d9228 8662f7e8 9d18e4d0 85edbcd0

        Instructions: (pc=0xb7e77a08)
        0xb7e779e8: 40 c1 e9 10 84 c9 74 05 38 d1 74 d6 40 5f c3 90
        0xb7e779f8: 90 90 90 90 90 90 90 90 8b 4c 24 04 8b 54 24 08
        0xb7e77a08: 8a 01 3a 02 75 09 41 42 84 c0 75 f4 31 c0 c3 b8
        0xb7e77a18: 01 00 00 00 b9 ff ff ff ff 0f 42 c1 c3 90 90 90

        Register to memory mapping:

        EAX=0x00000021 is an unknown value
        EBX=0xb7f39ff4: <offset 0x12eff4> in /lib/libc.so.6 at 0xb7e0b000
        ECX=0x00000021 is an unknown value
        EDX=0xa7a0af08 is an unknown value
        ESP=0x85edb904 is pointing into the stack for thread: 0x081cec00
        EBP=0x85edb998 is pointing into the stack for thread: 0x081cec00
        ESI=0x00000001 is an unknown value
        EDI=0x00000002 is an unknown value


        Stack: [0x85e8c000,0x85edd000], sp=0x85edb904, free space=318k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        C [libc.so.6+0x6ca08] strcmp+0x8
        C [libc.so.6+0x24c54]
        C [libc.so.6+0x23b23] dcgettext+0x43
        C [libc.so.6+0x6cf29] __strerror_r+0x109
        C [libc.so.6+0x6cd85] strerror+0x35
        C [libjava.so+0x16b68] getLastErrorString+0x48
        C [libjava.so+0x16366] throwFileNotFoundException+0x36
        C [libjava.so+0x17267] fileOpen+0x117
        C [libjava.so+0xce1f] Java_java_io_FileInputStream_open0+0x3f
        j java.io.FileInputStream.open0(Ljava/lang/String;)V+0
        j java.io.FileInputStream.open(Ljava/lang/String;)V+2
        j java.io.FileInputStream.<init>(Ljava/io/File;)V+106
        j java.io.FileInputStream.<init>(Ljava/lang/String;)V+17
        j StrerrBug$1.run()V+50
        v ~StubRoutines::call_stub
        V [libjvm.so+0x4f285f] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x101f
        V [libjvm.so+0x741849] os::os_exception_wrapper(void (*)(JavaValue*, methodHandle*, JavaCallArguments*, Thread*), JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x19
        V [libjvm.so+0x4f2c72] JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x262
        V [libjvm.so+0x4f30ab] JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)+0x4b
        V [libjvm.so+0x585120] thread_entry(JavaThread*, Thread*)+0x90
        V [libjvm.so+0x876569] JavaThread::thread_main_inner()+0x109
        V [libjvm.so+0x8766eb] JavaThread::run()+0x14b
        V [libjvm.so+0x749269] java_start(Thread*)+0x119
        C [libpthread.so.0+0x5192] start_thread+0xd2
        C [libc.so.6+0xc302e] clone+0x5e

        Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
        j java.io.FileInputStream.open0(Ljava/lang/String;)V+0
        j java.io.FileInputStream.open(Ljava/lang/String;)V+2
        j java.io.FileInputStream.<init>(Ljava/io/File;)V+106
        j java.io.FileInputStream.<init>(Ljava/lang/String;)V+17
        j StrerrBug$1.run()V+50
        v ~StubRoutines::call_stub

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

        Java Threads: ( => current thread )
          0x081d9400 JavaThread "Test 3" [_thread_blocked, id=15839, stack(0x85d53000,0x85da4000)]
          0x081d8000 JavaThread "Test 2" [_thread_blocked, id=15838, stack(0x85da4000,0x85df5000)]
        =>0x081cec00 JavaThread "Test 1" [_thread_in_native, id=15837, stack(0x85e8c000,0x85edd000)]
          0x081cdc00 JavaThread "Test 0" [_thread_in_native, id=15836, stack(0x85edd000,0x85f2e000)]
          0x081c6c00 JavaThread "Service Thread" daemon [_thread_blocked, id=15834, stack(0x85faf000,0x86000000)]
          0x08181800 JavaThread "C1 CompilerThread1" daemon [_thread_blocked, id=15833, stack(0x86134000,0x861b5000)]
          0x0817b400 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=15832, stack(0x861b5000,0x86236000)]
          0x08179c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=15831, stack(0x86236000,0x86287000)]
          0x08157800 JavaThread "Finalizer" daemon [_thread_blocked, id=15830, stack(0x86287000,0x862d8000)]
          0x08156000 JavaThread "Reference Handler" daemon [_thread_blocked, id=15829, stack(0x862d8000,0x86329000)]
          0x08050c00 JavaThread "main" [_thread_in_vm, id=15825, stack(0xb6f8f000,0xb6fe0000)]

        Other Threads:
          0x08152c00 VMThread [stack: 0x86329000,0x863aa000] [id=15828]

        VM state:not at safepoint (normal execution)

        VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
        [0x0804f9f0] Threads_lock - owner thread: 0x08050c00

        Heap:
         PSYoungGen total 9472K, used 1311K [0x9d0c0000, 0x9db40000, 0xa7a00000)
          eden space 8192K, 16% used [0x9d0c0000,0x9d207d20,0x9d8c0000)
          from space 1280K, 0% used [0x9da00000,0x9da00000,0x9db40000)
          to space 1280K, 0% used [0x9d8c0000,0x9d8c0000,0x9da00000)
         ParOldGen total 22016K, used 0K [0x87e00000, 0x89380000, 0x9d0c0000)
          object space 22016K, 0% used [0x87e00000,0x87e00000,0x89380000)
         Metaspace used 1810K, capacity 2204K, committed 2328K, reserved 4400K

        Card table byte_map: [0xa7a53000,0xa7b52000] byte_map_base: 0xa7614000

        Marking Bits: (ParMarkBitMap*) 0xb79f56e0
         Begin Bits: [0x86c74000, 0x87464000)
         End Bits: [0x87464000, 0x87c54000)

        Polling page: 0xb7f80000

        CodeCache: size=245760Kb used=678Kb max_used=678Kb free=245081Kb
         bounds [0xa7f12000, 0xa8152000, 0xb6f12000]
         total_blobs=173 nmethods=16 adapters=73
         compilation: enabled

        Compilation events (10 events):
        Event: 0,059 Thread 0x08181800 12 1 java.lang.ref.Reference::get (5 bytes)
        Event: 0,059 Thread 0x08181800 nmethod 12 0xa7fb9808 code [0xa7fb9900, 0xa7fb99a0]
        Event: 0,061 Thread 0x08181800 13 3 java.util.Arrays::copyOfRange (63 bytes)
        Event: 0,061 Thread 0x08181800 nmethod 13 0xa7fb9a08 code [0xa7fb9c00, 0xa7fba4c8]
        Event: 0,064 Thread 0x08181800 14 1 java.lang.ThreadLocal::access$400 (5 bytes)
        Event: 0,064 Thread 0x08181800 nmethod 14 0xa7fbac48 code [0xa7fbad40, 0xa7fbadc0]
        Event: 0,065 Thread 0x08181800 15 3 java.lang.String::getChars (62 bytes)
        Event: 0,065 Thread 0x08181800 nmethod 15 0xa7fbae48 code [0xa7fbafa0, 0xa7fbb2b0]
        Event: 0,070 Thread 0x08181800 16 3 java.lang.System::getSecurityManager (4 bytes)
        Event: 0,070 Thread 0x08181800 nmethod 16 0xa7fbb4c8 code [0xa7fbb5e0, 0xa7fbb6a0]

        GC Heap History (0 events):
        No events

        Deoptimization events (0 events):
        No events

        Internal exceptions (7 events):
        Event: 0,031 Thread 0x08050c00 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class; name or signature does not match> (0x9d0d0418) thrown at [/HUDSON3/workspace/8-2-build-linux-i586/jdk8u51/3951/hotspot/src/share/vm/pri
        Event: 0,031 Thread 0x08050c00 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not match> (0x9d0d0698) thrown at [/HUDSON3/workspace/8-2-build-linux-i586/jdk8u51/3951/hotspot/src/share/vm/prims/jni.cpp, line 3
        Event: 0,070 Thread 0x081d9400 Exception <a 'java/io/FileNotFoundException'> (0x9d1df070) thrown at [/HUDSON3/workspace/8-2-build-linux-i586/jdk8u51/3951/hotspot/src/share/vm/prims/jni.cpp, line 709]
        Event: 0,071 Thread 0x081d9400 Exception <a 'java/io/FileNotFoundException'> (0x9d1df9b8) thrown at [/HUDSON3/workspace/8-2-build-linux-i586/jdk8u51/3951/hotspot/src/share/vm/prims/jni.cpp, line 709]
        Event: 0,071 Thread 0x081cec00 Exception <a 'java/io/FileNotFoundException'> (0x9d18d258) thrown at [/HUDSON3/workspace/8-2-build-linux-i586/jdk8u51/3951/hotspot/src/share/vm/prims/jni.cpp, line 709]
        Event: 0,071 Thread 0x081cec00 Exception <a 'java/io/FileNotFoundException'> (0x9d18d848) thrown at [/HUDSON3/workspace/8-2-build-linux-i586/jdk8u51/3951/hotspot/src/share/vm/prims/jni.cpp, line 709]
        Event: 0,071 Thread 0x081cec00 Exception <a 'java/io/FileNotFoundException'> (0x9d18de38) thrown at [/HUDSON3/workspace/8-2-build-linux-i586/jdk8u51/3951/hotspot/src/share/vm/prims/jni.cpp, line 709]

        Events (10 events):
        Event: 0,069 Thread 0x081d8000 Thread added: 0x081d8000
        Event: 0,070 Thread 0x081d9400 Thread added: 0x081d9400
        Event: 0,070 loading class java/lang/Shutdown
        Event: 0,070 loading class java/lang/Shutdown done
        Event: 0,070 loading class java/lang/Shutdown$Lock
        Event: 0,070 loading class java/lang/Shutdown$Lock done
        Event: 0,070 loading class java/io/FileNotFoundException
        Event: 0,070 loading class java/io/IOException
        Event: 0,070 loading class java/io/IOException done
        Event: 0,070 loading class java/io/FileNotFoundException done


        Dynamic libraries:
        08048000-08049000 r-xp 00000000 08:03 2665393 /home/pttest/jdk1.8.0_51/bin/java
        08049000-0804a000 rw-p 00000000 08:03 2665393 /home/pttest/jdk1.8.0_51/bin/java
        0804a000-08229000 rw-p 0804a000 00:00 0 [heap]
        85aa7000-85cf7000 rw-p 85aa7000 00:00 0
        85cf7000-85cf9000 r-xp 00000000 08:03 1752720 /usr/lib/gconv/ISO8859-15.so
        85cf9000-85cfb000 rw-p 00001000 08:03 1752720 /usr/lib/gconv/ISO8859-15.so
        85cfb000-85d02000 r--s 00000000 08:03 1752768 /usr/lib/gconv/gconv-modules.cache
        85d02000-85d53000 rw-p 85d02000 00:00 0
        85d53000-85d56000 ---p 85d53000 00:00 0
        85d56000-85da4000 rw-p 85d56000 00:00 0
        85da4000-85da7000 ---p 85da4000 00:00 0
        85da7000-85df5000 rw-p 85da7000 00:00 0
        85df5000-85dfd000 r-xp 00000000 08:03 2191198 /lib/libnss_files-2.6.1.so
        85dfd000-85dff000 rw-p 00007000 08:03 2191198 /lib/libnss_files-2.6.1.so
        85dff000-85e1e000 r--p 00000000 08:03 1639192 /usr/share/locale/de/LC_MESSAGES/libc.mo
        85e1e000-85e53000 r--s 00000000 08:03 264633 /var/run/nscd/dbwKFSI7 (deleted)
        85e53000-85e8c000 rw-p 85e53000 00:00 0
        85e8c000-85e8f000 ---p 85e8c000 00:00 0
        85e8f000-85edd000 rw-p 85e8f000 00:00 0
        85edd000-85ee0000 ---p 85edd000 00:00 0
        85ee0000-85f2e000 rw-p 85ee0000 00:00 0
        85f2e000-85f2f000 ---p 85f2e000 00:00 0
        85f2f000-85faf000 rw-p 85f2f000 00:00 0
        85faf000-85fb2000 ---p 85faf000 00:00 0
        85fb2000-86021000 rw-p 85fb2000 00:00 0
        86021000-86100000 ---p 86021000 00:00 0
        86105000-86114000 r-xp 00000000 08:03 2191209 /lib/libresolv-2.6.1.so
        86114000-86116000 rw-p 0000e000 08:03 2191209 /lib/libresolv-2.6.1.so
        86116000-86118000 rw-p 86116000 00:00 0
        86118000-8611c000 r-xp 00000000 08:03 2191196 /lib/libnss_dns-2.6.1.so
        8611c000-8611e000 rw-p 00003000 08:03 2191196 /lib/libnss_dns-2.6.1.so
        8611e000-86133000 r-xp 00000000 08:03 474498 /home/pttest/jdk1.8.0_51/jre/lib/i386/libnet.so
        86133000-86134000 rw-p 00014000 08:03 474498 /home/pttest/jdk1.8.0_51/jre/lib/i386/libnet.so
        86134000-86137000 ---p 86134000 00:00 0
        86137000-861b5000 rw-p 86137000 00:00 0
        861b5000-861b8000 ---p 861b5000 00:00 0
        861b8000-86236000 rw-p 861b8000 00:00 0
        86236000-86239000 ---p 86236000 00:00 0
        86239000-86287000 rw-p 86239000 00:00 0
        86287000-8628a000 ---p 86287000 00:00 0
        8628a000-862d8000 rw-p 8628a000 00:00 0
        862d8000-862db000 ---p 862d8000 00:00 0
        862db000-86329000 rw-p 862db000 00:00 0
        86329000-8632a000 ---p 86329000 00:00 0
        8632a000-863f9000 rw-p 8632a000 00:00 0
        863f9000-865d1000 r--s 03d0c000 08:03 279407 /home/pttest/jdk1.8.0_51/jre/lib/rt.jar
        865d1000-86872000 rw-p 865d1000 00:00 0
        86872000-86a78000 ---p 86872000 00:00 0
        86a78000-87c54000 rw-p 86a78000 00:00 0
        87c54000-87c55000 ---p 87c54000 00:00 0
        87c55000-87cd5000 rw-p 87c55000 00:00 0
        87cd5000-87cd6000 ---p 87cd5000 00:00 0
        87cd6000-87d61000 rw-p 87cd6000 00:00 0
        87d61000-87e00000 ---p 87d61000 00:00 0
        87e00000-89380000 rw-p 87e00000 00:00 0
        89380000-9d0c0000 ---p 89380000 00:00 0
        9d0c0000-9db40000 rw-p 9d0c0000 00:00 0
        9db40000-a7a00000 ---p 9db40000 00:00 0
        a7a02000-a7a05000 rw-p a7a02000 00:00 0
        a7a05000-a7a07000 r-xp 00000000 08:03 2191388 /lib/libnss_mdns4_minimal.so.2
        a7a07000-a7a09000 rw-p 00001000 08:03 2191388 /lib/libnss_mdns4_minimal.so.2
        a7a09000-a7a3f000 r--p 00000000 08:03 1753994 /usr/lib/locale/de_DE@euro/LC_CTYPE
        a7a3f000-a7a40000 r--p 00000000 08:03 1753988 /usr/lib/locale/de_DE@euro/LC_NUMERIC
        a7a40000-a7a41000 r--p 00000000 08:03 1753312 /usr/lib/locale/de_DE@euro/LC_TIME
        a7a41000-a7a47000 r--p 00000000 08:03 1767674 /usr/lib/locale/de_DE@euro/LC_COLLATE
        a7a47000-a7a5e000 rw-p a7a47000 00:00 0
        a7a5e000-a7afc000 ---p a7a5e000 00:00 0
        a7afc000-a7b02000 rw-p a7afc000 00:00 0
        a7b02000-a7b51000 ---p a7b02000 00:00 0
        a7b51000-a7b5b000 rw-p a7b51000 00:00 0
        a7b5b000-a7f12000 ---p a7b5b000 00:00 0
        a7f12000-a8152000 rwxp a7f12000 00:00 0
        a8152000-b6f12000 ---p a8152000 00:00 0
        b6f12000-b6f2b000 r-xp 00000000 08:03 474519 /home/pttest/jdk1.8.0_51/jre/lib/i386/libzip.so
        b6f2b000-b6f2c000 rw-p 00018000 08:03 474519 /home/pttest/jdk1.8.0_51/jre/lib/i386/libzip.so
        b6f2c000-b6f61000 r--s 00000000 08:03 264492 /var/run/nscd/passwd
        b6f61000-b6f85000 r-xp 00000000 08:03 474492 /home/pttest/jdk1.8.0_51/jre/lib/i386/libjava.so
        b6f85000-b6f86000 rw-p 00023000 08:03 474492 /home/pttest/jdk1.8.0_51/jre/lib/i386/libjava.so
        b6f86000-b6f8d000 r-xp 00000000 08:03 2191211 /lib/librt-2.6.1.so
        b6f8d000-b6f8f000 rw-p 00006000 08:03 2191211 /lib/librt-2.6.1.so
        b6f8f000-b6f92000 ---p b6f8f000 00:00 0
        b6f92000-b6fe0000 rw-p b6f92000 00:00 0
        b6fe0000-b7003000 r-xp 00000000 08:03 2191189 /lib/libm-2.6.1.so
        b7003000-b7005000 rw-p 00022000 08:03 2191189 /lib/libm-2.6.1.so
        b7005000-b7978000 r-xp 00000000 08:03 490784 /home/pttest/jdk1.8.0_51/jre/lib/i386/server/libjvm.so
        b7978000-b79e4000 rw-p 00973000 08:03 490784 /home/pttest/jdk1.8.0_51/jre/lib/i386/server/libjvm.so
        b79e4000-b7e0b000 rw-p b79e4000 00:00 0
        b7e0b000-b7f38000 r-xp 00000000 08:03 2191181 /lib/libc-2.6.1.so
        b7f38000-b7f39000 r--p 0012c000 08:03 2191181 /lib/libc-2.6.1.so
        b7f39000-b7f3b000 rw-p 0012d000 08:03 2191181 /lib/libc-2.6.1.so
        b7f3b000-b7f3e000 rw-p b7f3b000 00:00 0
        b7f3e000-b7f40000 r-xp 00000000 08:03 2191187 /lib/libdl-2.6.1.so
        b7f40000-b7f42000 rw-p 00001000 08:03 2191187 /lib/libdl-2.6.1.so
        b7f42000-b7f56000 r-xp 00000000 08:03 98223 /home/pttest/jdk1.8.0_51/lib/i386/jli/libjli.so
        b7f56000-b7f57000 rw-p 00014000 08:03 98223 /home/pttest/jdk1.8.0_51/lib/i386/jli/libjli.so
        b7f57000-b7f6a000 r-xp 00000000 08:03 2191207 /lib/libpthread-2.6.1.so
        b7f6a000-b7f6c000 rw-p 00013000 08:03 2191207 /lib/libpthread-2.6.1.so
        b7f6c000-b7f6f000 rw-p b7f6c000 00:00 0
        b7f6f000-b7f70000 r--p 00000000 08:03 1767620 /usr/lib/locale/de_DE@euro/LC_MONETARY
        b7f70000-b7f71000 r--p 00000000 08:03 1767636 /usr/lib/locale/de_DE@euro/LC_MESSAGES/SYS_LC_MESSAGES
        b7f71000-b7f72000 r--p 00000000 08:03 1767697 /usr/lib/locale/de_DE@euro/LC_PAPER
        b7f72000-b7f73000 r--p 00000000 08:03 1753310 /usr/lib/locale/de_DE@euro/LC_NAME
        b7f73000-b7f74000 r--p 00000000 08:03 1753307 /usr/lib/locale/de_DE@euro/LC_ADDRESS
        b7f74000-b7f75000 r--p 00000000 08:03 1753311 /usr/lib/locale/de_DE@euro/LC_TELEPHONE
        b7f75000-b7f76000 r--p 00000000 08:03 1767702 /usr/lib/locale/de_DE@euro/LC_MEASUREMENT
        b7f76000-b7f77000 r--p 00000000 08:03 1753308 /usr/lib/locale/de_DE@euro/LC_IDENTIFICATION
        b7f77000-b7f7f000 rw-s 00000000 08:03 376308 /tmp/hsperfdata_pttest/15824
        b7f7f000-b7f80000 rw-p b7f7f000 00:00 0
        b7f80000-b7f81000 r--p b7f80000 00:00 0
        b7f81000-b7f8c000 r-xp 00000000 08:03 474550 /home/pttest/jdk1.8.0_51/jre/lib/i386/libverify.so
        b7f8c000-b7f8d000 rw-p 0000b000 08:03 474550 /home/pttest/jdk1.8.0_51/jre/lib/i386/libverify.so
        b7f8d000-b7f8e000 rw-p b7f8d000 00:00 0
        b7f8e000-b7fa8000 r-xp 00000000 08:03 2191174 /lib/ld-2.6.1.so
        b7fa8000-b7faa000 rw-p 0001a000 08:03 2191174 /lib/ld-2.6.1.so
        bfaa5000-bfaa6000 rwxp bfaa5000 00:00 0
        bfae3000-bfaf9000 rw-p bfae3000 00:00 0 [stack]
        ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]

        VM Arguments:
        java_command: StrerrBug
        java_class_path (initial): .
        Launcher Type: SUN_STANDARD

        Environment Variables:
        JRE_HOME=/usr/lib/jvm/jre
        PATH=/bin:/usr/bin
        LD_LIBRARY_PATH=/home/pttest/jdk1.8.0_51/jre/lib/i386/server:/home/pttest/jdk1.8.0_51/jre/lib/i386:/home/pttest/jdk1.8.0_51/jre/../lib/i386::/usr/lib/jvm/jdk1.8.0_45/jre/lib/i386:/usr/lib/jvm/jdk1.8.0_45/jre/lib/i386/client
        SHELL=/bin/bash
        HOSTTYPE=i386
        OSTYPE=linux
        MACHTYPE=i686-suse-linux

        Signal Handlers:
        SIGSEGV: [libjvm.so+0x8c2ce0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
        SIGBUS: [libjvm.so+0x8c2ce0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
        SIGFPE: [libjvm.so+0x7434f0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
        SIGPIPE: [libjvm.so+0x7434f0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
        SIGXFSZ: [libjvm.so+0x7434f0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
        SIGILL: [libjvm.so+0x7434f0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
        SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
        SIGUSR2: [libjvm.so+0x744a80], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO
        SIGHUP: [libjvm.so+0x745f30], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
        SIGINT: [libjvm.so+0x745f30], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
        SIGTERM: [libjvm.so+0x745f30], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
        SIGQUIT: [libjvm.so+0x745f30], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO


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

        OS:LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32"

        uname:Linux 2.6.22.5-31-bigsmp #32 SMP Tue Feb 23 10:17:55 CET 2010 i686
        libc:glibc 2.6.1 NPTL 2.6.1
        rlimit: STACK 8192k, CORE 0k, NPROC 16384, NOFILE 8192, AS 2502640k
        load average:0,44 0,27 0,24

        /proc/meminfo:
        MemTotal: 2076016 kB
        MemFree: 78476 kB
        Buffers: 21744 kB
        Cached: 1641812 kB
        SwapCached: 58224 kB
        Active: 1651260 kB
        Inactive: 271464 kB
        HighTotal: 1179584 kB
        HighFree: 13908 kB
        LowTotal: 896432 kB
        LowFree: 64568 kB
        SwapTotal: 1052248 kB
        SwapFree: 876480 kB
        Dirty: 1424 kB
        Writeback: 0 kB
        AnonPages: 238384 kB
        Mapped: 1112260 kB
        Slab: 50752 kB
        SReclaimable: 35544 kB
        SUnreclaim: 15208 kB
        PageTables: 6040 kB
        NFS_Unstable: 0 kB
        Bounce: 0 kB
        CommitLimit: 2090256 kB
        Committed_AS: 753032 kB
        VmallocTotal: 112632 kB
        VmallocUsed: 5224 kB
        VmallocChunk: 107288 kB
        HugePages_Total: 0
        HugePages_Free: 0
        HugePages_Rsvd: 0
        Hugepagesize: 2048 kB


        CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 58 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, aes, clmul, tsc, tscinvbit, tscinv

        /proc/cpuinfo:
        processor : 0
        vendor_id : GenuineIntel
        cpu family : 6
        model : 58
        model name : Intel(R) Xeon(R) CPU E3-1270 V2 @ 3.50GHz
        stepping : 9
        cpu MHz : 3491.386
        cache size : 8192 KB
        physical id : 0
        siblings : 2
        core id : 0
        cpu cores : 2
        fdiv_bug : no
        hlt_bug : no
        f00f_bug : no
        coma_bug : no
        fpu : yes
        fpu_exception : yes
        cpuid level : 13
        wp : yes
        flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht nx rdtscp lm constant_tsc pni ssse3 cx16 popcnt lahf_lm
        bogomips : 6988.36
        clflush size : 64

        processor : 1
        vendor_id : GenuineIntel
        cpu family : 6
        model : 58
        model name : Intel(R) Xeon(R) CPU E3-1270 V2 @ 3.50GHz
        stepping : 9
        cpu MHz : 3491.386
        cache size : 8192 KB
        physical id : 0
        siblings : 2
        core id : 1
        cpu cores : 2
        fdiv_bug : no
        hlt_bug : no
        f00f_bug : no
        coma_bug : no
        fpu : yes
        fpu_exception : yes
        cpuid level : 13
        wp : yes
        flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht nx rdtscp lm constant_tsc pni ssse3 cx16 popcnt lahf_lm
        bogomips : 6984.61
        clflush size : 64



        Memory: 4k page, physical 2076016k(78476k free), swap 1052248k(876480k free)

        vm_info: Java HotSpot(TM) Server VM (25.51-b03) for linux-x86 JRE (1.8.0_51-b16), built on Jun 8 2015 18:05:11 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)

        time: Thu Aug 6 17:45:22 2015
        elapsed time: 0 seconds (0d 0h 0m 0s)



        REPRODUCIBILITY :
        This bug can be reproduced occasionally.

        ---------- BEGIN SOURCE ----------
        import java.io.FileInputStream;
        import java.io.FileOutputStream;
        import java.net.InetSocketAddress;
        import java.net.Socket;

        public class StrerrBug {
          
          public static void main(String[] args) {
            for (int i = 0; i < 5; i++) {
              new Thread("Test " + i) {
                @Override
                public void run() {
                  for (int c = 0; ; c++) {
                    try {
                      //XXX synchronized (getClass()) { // this prevents the bug from showing up
                      switch (((int)(Math.random() * 1000000)) % 4) {
                      case 0:
                        new FileInputStream("/tmp/hbfjkhsdbfjsadjhfbdsja");
                        break;
                      case 1:
                        new FileOutputStream("/jglkdsjgldjlkg");
                        break;
                      case 2:
                        Socket sock = new Socket();
                        sock.connect(new InetSocketAddress("www.google.de", 3000), 1);
                        break;
                      case 3:
                        System.exit(1);;
                      }
                      //XXX }
                    } catch (Exception e) {
                      System.out.println(getName() + ": " + e.getClass().getName());
                    }
                  }
                }
              }.start();
            }
          }
        }

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

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  robm Robert Mckenna
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: