JDK-8021369 : JVM crashes with message " Program terminated with signal 11, Segmentation fault "
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 7u21
  • Priority: P3
  • Status: Closed
  • Resolution: Incomplete
  • OS: linux_redhat_5.0
  • Submitted: 2013-07-24
  • Updated: 2014-05-12
  • Resolved: 2014-05-12
Related Reports
Relates :  
Description
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.
Comments
No response was received from the submitter. As there is not enough information in this report to make headway it is being closed. If this issue is seen, please open a new report with all necessary information. This report ID can be referenced.
12-05-2014

Mail was sent to submitter requesting more information.
23-04-2014

possibly related to 7183443.
30-07-2013

I have not been able to reproduce this issue on a similar machine. cat /etc/*release* Enterprise Linux Enterprise Linux Server release 5.7 (Carthage) Oracle Linux Server release 5.7 Red Hat Enterprise Linux Server release 5.7 (Tikanga) # uname -a Linux pepper.ie.oracle.com 2.6.18-274.12.1.0.1.el5 #1 SMP Tue Nov 29 13:32:55 EST 2011 x86_64 x86_64 x86_64 GNU/Linux Of most interest here is the glic version that is installed. The stacktrace shows that the SEGV is ultimately coming from there. ldd --version ldd (GNU libc) 2.5 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper. Can the submitter please contact the relevant external parties to try to get more information about the system config, and testcase for this issue.
30-07-2013