FULL PRODUCT VERSION :
java version " 1.7.0_21 "
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
uname -a output:
Linux test-btms1 2.6.18-274.el5xen #1 SMP Fri Jul 8 17:45:44 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
The JVM crashes frequently due to a segmentation fault.
Output from gdb on problematic thread:
Program terminated with signal 11, Segmentation fault.
#0 0x0000003a396bd2a6 in gaih_inet () from /lib64/libc.so.6
(gdb) where
#0 0x0000003a396bd2a6 in gaih_inet () from /lib64/libc.so.6
#1 0x0000003a396be98a in getaddrinfo () from /lib64/libc.so.6
#2 0x00002b36912edeb4 in Java_java_net_Inet6AddressImpl_lookupAllHostAddr () from /opt/optier/corefirst/thirdparty/jdk/jre/lib/amd64/libnet.so
#3 0x00002b3661f0ec1c in ?? ()
#4 0x00000004b3914820 in ?? ()
#5 0x000000079c3a5710 in ?? ()
#6 0x0000000400000000 in ?? ()
#7 0x00002b36622e3f34 in ?? ()
#8 0x000000079c3a5710 in ?? ()
#9 0x000000079c3a5710 in ?? ()
#10 0x2a530f4000000002 in ?? ()
#11 0x0000000000000000 in ?? ()
(gdb) t
[Current thread is 1 (Thread 0x2b36ab966940 (LWP 30259))]
Related thread from jStack is:
Thread 30259: (state = IN_NATIVE)
- java.net.Inet6AddressImpl.lookupAllHostAddr(java.lang.String) @bci=0 (Compiled frame; information may be imprecise)
- java.net.InetAddress$1.lookupAllHostAddr(java.lang.String) @bci=4, line=894 (Compiled frame)
- java.net.InetAddress.getAddressesFromNameService(java.lang.String, java.net.InetAddress) @bci=51, line=1286 (Compiled frame)
- java.net.InetAddress.getAllByName0(java.lang.String, java.net.InetAddress, boolean) @bci=29, line=1239 (Compiled frame)
- java.net.InetAddress.getAllByName0(java.lang.String, boolean) @bci=3, line=1216 (Compiled frame)
- java.net.InetAddress.getHostFromNameService(java.net.InetAddress, boolean) @bci=66, line=600 (Compiled frame)
- java.net.InetAddress.getHostName(boolean) @bci=16, line=525 (Compiled frame)
- java.net.InetAddress.getHostName() @bci=2, line=497 (Compiled frame)
- java.net.InetSocketAddress$InetSocketAddressHolder.getHostName() @bci=23, line=82 (Compiled frame)
- java.net.InetSocketAddress$InetSocketAddressHolder.access$600(java.net.InetSocketAddress$InetSocketAddressHolder) @bci=1, line=56 (Compiled frame)
- java.net.InetSocketAddress.getHostName() @bci=4, line=345 (Compiled frame)
...
Possibly related bugs:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7183443 - fixed in update 6)
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7194275 - duplicate of previous one, so should also be fixed since update 6)
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6346701 - open and not fixed since JDK 5, but related to stack overflows. Our threads have pretty small stack traces. The thread related to this crash has only 27 lines in the stack trace (and is one of the largest ones in terms of stack size).
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Did not find a consistent way to reproduce this.
Happens more frequently in production, but this could either be related to a wider range of addresses to resolve, or to greater load.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
As described here: http://docs.oracle.com/javase/7/docs/api/java/net/InetAddress.html#getHostName%28%29
ACTUAL -
JVM crashes with the message " Program terminated with signal 11, Segmentation fault. "
REPRODUCIBILITY :
This bug can be reproduced often.