복구할 수 없는 StackOverFlow |
문제 설명 |
Unexpected Signal : 11 occurred at PC=0xfb9c22ec Function name=write (compiled Java code) Library=(N/A) Current Java thread: Dynamic libraries: 0x10000 /opt/bea/jdk131/jre/bin/../bin/sparc/native_threads/java 0xff350000 /usr/lib/lwp/libthread.so.1 0xff380000 /usr/lib/libdl.so.1 0xff200000 /usr/lib/libc.so.1 0xff330000 /usr/platform/SUNW,Ultra-Enterprise/lib/libc_psr.so.1 0xfee00000 /opt/bea/jdk131/jre/lib/sparc/client/libjvm.so 0xff2f0000 /usr/lib/libCrun.so.1 0xff1e0000 /usr/lib/libsocket.so.1 0xfed00000 /usr/lib/libnsl.so.1 0xff1b0000 /usr/lib/libm.so.1 0xff320000 /usr/lib/libw.so.1 0xff190000 /usr/lib/libmp.so.2 0xfede0000 /usr/lib/librt.so.1 0xfedc0000 /usr/lib/libaio.so.1 0xfecc0000 /opt/bea/jdk131/jre/lib/sparc/native_threads/libhpi.so 0xfec80000 /opt/bea/jdk131/jre/lib/sparc/libverify.so 0xfec40000 /opt/bea/jdk131/jre/lib/sparc/libjava.so 0xfec10000 /opt/bea/jdk131/jre/lib/sparc/libzip.so 0xfd810000 /opt/bea/jdk131/jre/lib/sparc/libnet.so 0xaafc0000 /usr/lib/nss_files.so.1 0x6c0c0000 /opt/bea/wlserver6.1/lib/solaris/libmuxer.so 0x6c0a0000 /usr/ucblib/libucb.so.1 0x6bfb0000 /usr/lib/libresolv.so.2 0x6bec0000 /usr/lib/libelf.so.1 0x6bf90000 /opt/bea/jdk131/jre/lib/sparc/libioser12.so 0x6bdc0000 /opt/bea/wlserver6.1/lib/solaris/libjsafe.so Local Time = Fri Nov 21 16:32:28 2003 Elapsed Time = 6143 # HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002BD 01 # # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # Java VM: Java HotSpot(TM) Client VM (1.3.1_07-b02 mixed mode) # |
문제 해결다음 항목을 모두 수행해야 하는 것은 아닙니다. 어떤 경우에는 다음 중 일부만 수행하여도 해결할 수 있습니다. 문제 발생 원인 페이지 맨 위
이 방법을 사용하면 이러한 유형의 프로그래밍 오류를 신속하게 탐지할 수 있습니다(다음 프로그램 참조).
코어 파일에서 정보 수집
생성된 코어 파일이 있으면 코어 파일에 대해 dbx 또는 gdb를 실행합니다. 다음은 dbx 및 gdb용 명령과 gdb에 의해 생성된 출력 예제입니다. (참고: DEBUG_PROG는 Java 환경에서 실행할 디버거나 프로파일러를 지정할 수 있는 환경 변수입니다.) |
$ java -version (need to use right version of jdk) $ ls /opt/bin/dbx (need to know dbx location) or "which dbx" $ export DEBUG_PROG=/opt/bin/dbx (or wherever "dbx" is located) For JDK 1.3.X do the following: $ <path to java command>/java corefile For JDK 1.4.X do the following: $ dbx <path to java command>/java corefile Now you will be in the debugger. Execute the following commands: (dbx) where ("shows a summary of the stack") (dbx) threads ("shows the state of the existing threads") (dbx) quit |
b. gdb:
$ java -version (need to use right version of jdk) $ ls /usr/local/bin/gdb (need to know gdb location) or "which gdb" $ export DEBUG_PROG=/usr/local/bin/gdb (or wherever "gdb" is located) For JDK 1.3.X do the following: $ <path to java command>/java corefile For JDK 1.4.X do the following: $ gdb <path to java command>/java corefile Now you will be in the debugger. Execute the following commands: (gdb) where ("shows a summary of the stack") (gdb) thr ("switch among threads or show the current thread") (gdb) info thr ("inquire about existing threads") (gdb) thread apply 1 bt ("apply a command to a list of threads, specifically the backtrace to thread #1") (gdb) quit |
where 명령을 사용하면 실행된 마지막 스레드의 스택 트레이스가 생성되고, thr 명령을 사용하면 현재 스레드가 표시되고, info thr 명령을 사용하면 모든 스레드의 상태가 표시되고, thread apply 1 bt 명령을 사용하면 코어 파일에 포함된 스레드 1의 스택 트레이스를 다른 방식으로 가져올 수 있습니다. 마지막 명령 thread apply # bt에서 #을 실제 스레드 번호로 바꾸어 개별 스레드의 스택 트레이스를 가져오거나 3을 "all"로 바꾸어 모든 스레드의 스택 트레이스를 가져올 수 있습니다. |
$ export DEBUG_PROG=/usr/local/bin/gdb
$ java core GNU gdb 5.0 Copyright 2000 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 "sparc-sun-solaris2.8"... (no debugging symbols found)... Core was generated by `/wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/bin/../bin/sparc/native_threads'. Program terminated with signal 9, Killed. Reading symbols from /usr/lib/libthread.so.1...(no debugging symbols found)... Loaded symbols for /usr/lib/libthread.so.1 Reading symbols from /usr/lib/libdl.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libdl.so.1 Reading symbols from /usr/lib/libc.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libc.so.1 Reading symbols from /usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1... (no debugging symbols found)...done. Loaded symbols for /usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1 Reading symbols from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so...(no debugging symbols found)...done. Loaded symbols for /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so Reading symbols from /usr/lib/libCrun.so.1...(no debugging symbols found)... Loaded symbols for /usr/lib/libCrun.so.1 Reading symbols from /usr/lib/libsocket.so.1...(no debugging symbols found)... Loaded symbols for /usr/lib/libsocket.so.1 Reading symbols from /usr/lib/libnsl.so.1...(no debugging symbols found)... Loaded symbols for /usr/lib/libnsl.so.1 Reading symbols from /usr/lib/libm.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libm.so.1 Reading symbols from /usr/lib/libw.so.1... warning: Lowest section in /usr/lib/libw.so.1 is .hash at 00000074 (no debugging symbols found)...done. Loaded symbols for /usr/lib/libw.so.1 Reading symbols from /usr/lib/libmp.so.2...(no debugging symbols found)... Loaded symbols for /usr/lib/libmp.so.2 Reading symbols from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/native_threads/libhpi.so...(no debugging symbols found)...done. Loaded symbols for /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/native_threads/libhpi.so Reading symbols from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/libverify.so...(no debugging symbols found)...done. Loaded symbols for /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/libverify.so Reading symbols from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/libjava.so...(no debugging symbols found)...done. Loaded symbols for /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/libjava.so Reading symbols from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/libzip.so...(no debugging symbols found)...done. Loaded symbols for /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/libzip.so Reading symbols from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/libnet.so...(no debugging symbols found)...done. Loaded symbols for /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/libnet.so Reading symbols from /wwsl/sharedInstalls/solaris/wls70sp2/server/lib/solaris/libfilelock.so...(no debugging symbols found)...done. Loaded symbols for /wwsl/sharedInstalls/solaris/wls70sp2/server/lib/solaris/libfilelock.so Reading symbols from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/libioser12.so...(no debugging symbols found)...done. Loaded symbols for /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/libioser12.so Reading symbols from /usr/lib/nss_nis.so.1...(no debugging symbols found)... Loaded symbols for /usr/lib/nss_nis.so.1 Reading symbols from /wwsl/sharedInstalls/solaris/wls70sp2/server/lib/solaris/libstackdump.so...(no debugging symbols found)...done. Loaded symbols for /wwsl/sharedInstalls/solaris/wls70sp2/server/lib/solaris/libstackdump.so Reading symbols from /usr/lib/libmd5.so.1...(no debugging symbols found)... Loaded symbols for /usr/lib/libmd5.so.1 Reading symbols from /wwsl/sharedInstalls/solaris/wls70sp2/server/lib/solaris/libmuxer.so...(no debugging symbols found)...done. Loaded symbols for /wwsl/sharedInstalls/solaris/wls70sp2/server/lib/solaris/libmuxer.so Reading symbols from /usr/ucblib/libucb.so.1...(no debugging symbols found)... Loaded symbols for /usr/ucblib/libucb.so.1 Reading symbols from /usr/lib/libresolv.so.2...(no debugging symbols found)... Loaded symbols for /usr/lib/libresolv.so.2 Reading symbols from /usr/lib/libelf.so.1...(no debugging symbols found)... Loaded symbols for /usr/lib/libelf.so.1 Reading symbols from /home/usera/wls70/solaris/projectWork/lib/libhello.so... (no debugging symbols found)...done. Loaded symbols for /home/usera/wls70/solaris/projectWork/lib/libhello.so (gdb) where #0 0xff369764 in __sigprocmask () from /usr/lib/libthread.so.1 #1 0xff35e978 in _resetsig () from /usr/lib/libthread.so.1 #2 0xff35e118 in _sigon () from /usr/lib/libthread.so.1 #3 0xff361158 in _thrp_kill () from /usr/lib/libthread.so.1 #4 0xff24b908 in raise () from /usr/lib/libc.so.1 #5 0xff2358f4 in abort () from /usr/lib/libc.so.1 #6 0xfe3c6904 in __1cCosFabort6Fl_v_ () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #7 0xfe3c59f8 in __1cCosbBhandle_unexpected_exception6FpnGThread_ipCpv_v_() from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #8 0xfe20a8bc in JVM_handle_solaris_signal () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #9 0xff36b82c in __sighndlr () from /usr/lib/libthread.so.1 #10 <signal handler called> #11 0xe9f90420 in Java_HelloWorld_displayHelloWorld () from /home/usera/wls70/solaris/projectWork/lib/libhello.so #12 0x90aec in ?? () #13 0x8dc54 in ?? () #14 0x8dc54 in ?? () #15 0x8dc54 in ?? () #16 0x8ddbc in ?? () #17 0x8dde0 in ?? () #18 0x8dc54 in ?? () #19 0x8dc54 in ?? () #20 0x8dde0 in ?? () #21 0x8dc78 in ?? () #22 0x8dc54 in ?? () #23 0x8ddbc in ?? () #24 0x8dc54 in ?? () #25 0xfe5324f0 in __1cMStubRoutinesG_code1_ () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #26 0xfe0cbe9c in __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_() from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #27 0xfe1f6dc4 in __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_() from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #28 0xfe1fcd94 in __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_() from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #29 0xfe21b708 in __1cMthread_entry6FpnKJavaThread_pnGThread__v_ () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #30 0xfe216208 in __1cKJavaThreadDrun6M_v_ () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #31 0xfe213ed0 in _start () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so (gdb) thr [Current thread is 1 (LWP 14 )] (gdb) info thr 16 LWP 13 0xff29d194 in _poll () from /usr/lib/libc.so.1 15 LWP 12 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1 14 LWP 11 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1 13 LWP 10 0xff29bc2c in _so_accept () from /usr/lib/libc.so.1 12 LWP 9 0xff29bc2c in _so_accept () from /usr/lib/libc.so.1 11 LWP 8 0xff29d194 in _poll () from /usr/lib/libc.so.1 10 LWP 7 0xff29d194 in _poll () from /usr/lib/libc.so.1 9 LWP 6 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1 8 LWP 5 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1 7 LWP 4 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1 6 LWP 3 0xff29d194 in _poll () from /usr/lib/libc.so.1 5 LWP 2 0xff29e958 in _signotifywait () from /usr/lib/libc.so.1 4 LWP 1 0xff29d194 in _poll () from /usr/lib/libc.so.1 3 LWP 16 0xff29c4fc in door_restart () from /usr/lib/libc.so.1 2 LWP 15 0xff369774 in private___lwp_cond_wait () from /usr/lib/libthread.so.1 * 1 LWP 14 0xff369764 in __sigprocmask () from /usr/lib/libthread.so.1 (gdb) thread apply 1 bt Thread 1 (LWP 14 ): #0 0xff369764 in __sigprocmask () from /usr/lib/libthread.so.1 #1 0xff35e978 in _resetsig () from /usr/lib/libthread.so.1 #2 0xff35e118 in _sigon () from /usr/lib/libthread.so.1 #3 0xff361158 in _thrp_kill () from /usr/lib/libthread.so.1 #4 0xff24b908 in raise () from /usr/lib/libc.so.1 #5 0xff2358f4 in abort () from /usr/lib/libc.so.1 #6 0xfe3c6904 in __1cCosFabort6Fl_v_ () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #7 0xfe3c59f8 in __1cCosbBhandle_unexpected_exception6FpnGThread_ipCpv_v_() from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #8 0xfe20a8bc in JVM_handle_solaris_signal () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #9 0xff36b82c in __sighndlr () from /usr/lib/libthread.so.1 #10 <signal handler called> #11 0xe9f90420 in Java_HelloWorld_displayHelloWorld () from /home/usera/wls70/solaris/projectWork/lib/libhello.so #12 0x90aec in ?? () #13 0x8dc54 in ?? () #14 0x8dc54 in ?? () #15 0x8dc54 in ?? () #16 0x8ddbc in ?? () #17 0x8dde0 in ?? () #18 0x8dc54 in ?? () #19 0x8dc54 in ?? () #20 0x8dde0 in ?? () #21 0x8dc78 in ?? () #22 0x8dc54 in ?? () #23 0x8ddbc in ?? () #24 0x8dc54 in ?? () #25 0xfe5324f0 in __1cMStubRoutinesG_code1_ () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #26 0xfe0cbe9c in __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_() from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #27 0xfe1f6dc4 in __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_() from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #28 0xfe1fcd94 in __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_() from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #29 0xfe21b708 in __1cMthread_entry6FpnKJavaThread_pnGThread__v_() from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #30 0xfe216208 in __1cKJavaThreadDrun6M_v_ () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so #31 0xfe213ed0 in _start () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so (gdb) quit |
스레드 덤프 수집JVM이 실행될 때 JVM의 스레드 덤프를 대개 5-10초 간격으로 주기적으로 수집할 수 있습니다. 이 정보를 사용하여 재귀적 코드를 찾아 수정할 수 있습니다. 스레드 덤프를 수집하려면 Java 프로세스 ID(PID)에서 다음 과정을 수행해야 합니다.
Windows 플랫폼:
JRockit JVM의 경우:
이 작업은 루트 java 프로세스에서 수행해야 합니다.
예를 들어, 사용자 "usera"가 시작한 프로세스를 찾으려면 ps -lU usera --forest를 실행합니다. Linux에서 JRockit을 사용하여 스레드 덤프를 얻는 특정 예제는 다음을 참조하십시오. http://e-docs.bea.com/wls/docs70/cluster/trouble.html#602852 JVM을 중지하여 스레드 덤프 가져오기 페이지 맨 위
이러한 방법으로 오류 페이지에서 발생하는 문제를 찾을 수 있습니다.
스택 크기 조정 페이지 맨 위 코드에서 다음 명령을 사용하지 마십시오.
대신 다음 명령을 사용하십시오.
이렇게 하면 재귀적 호출 스택 트레이스를 방지할 수 있습니다.
|
import java.util.Properties; public class stacktest { public static void main(String args[]) { int max = 500000; // or some other large number depending on the stack size for ( int i = 0; i < max; i++ ) { //Properties p = new Properties(System.getProperties()); // un-comment the line above and comment the following two lines // out to see the recursive stacktrace // containing "java.util.Properties.getProperty(Properties.java:475)" Properties p = new Properties(); p = System.getProperties(); p.put("blah", "blah"); System.setProperties(p); } System.out.println("Went through "+max+" iterations, now get a property"); String s = System.getProperty("some property other than blah"); } } |
추가 도움말이 필요하십니까? 패턴대로 작업했지만 추가 도움말이 필요한 경우 다음과 같이 할 수 있습니다.
이렇게 해도 문제를 해결할 수 없는 경우 유효한 유지보수 계약이 되어 있다면 http://support.bea.com/에 로그인하여 Support Case를 신청할 수 있습니다. |
고객 의견 이 지원 진단 패턴 "복구할 수 없는 StackOverFlow"가 도움이 되셨습니까? 여러분에게 꼭 필요한 정보나 지원 진단 패턴에 새로 추가하길 바라는 항목이 있으면 저희에게 알려주시기 바랍니다. |
책임의 한계에 대한 고지: BEA Systems, Inc.는 사용자와 BEA 간의 유지 보수 및 지원 계약 내용에 따라 이 웹 사이트에 기술 팁과 패치를 제공합니다. BEA에서 허가한 소프트웨어와 함께 이 정보 및 코드를 사용할 수 있지만 BEA는 기술 팁 및 패치와 관련하여 어떠한 명시적이거나 암시적인 보증도 하지 않습니다. 이 문서에 참조된 상표는 해당 소유자의 자산입니다. 자세한 상표 정보에 대해서는 제품 설명서를 참조하십시오. |