Here is a stack trace of what happens when it has hung (results from JSTACK):
JSTACK FOR HANGING Process: Debugger attached successfully. Server compiler detected. JVM version is 1.5.0_06-b05 Thread [EMAIL PROTECTED]: (state = BLOCKED) - java.lang.Thread.sleep(long) (Interpreted frame) - java.lang.Thread.sleep(long) (Interpreted frame) - org.apache.log4j.helpers.FileWatchdog.run() @bci=11, line=95 (Interpreted frame) Thread [EMAIL PROTECTED]: (state = BLOCKED) - com.mftl.emx.hub.Server$FinalizerThreadBoost.finalize() @bci=29 (Interpreted frame) - java.lang.ref.Finalizer.invokeFinalizeMethod(java.lang.Object) (Interpreted frame) - java.lang.ref.Finalizer.runFinalizer() @bci=45, line=83 (Interpreted frame) - java.lang.ref.Finalizer.access$100(java.lang.ref.Finalizer) @bci=1, line=14 (Interpreted frame) - java.lang.ref.Finalizer$2.run() @bci=18, line=131 (Interpreted frame) - java.lang.Thread.run() @bci=11, line=595 (Interpreted frame) Thread [EMAIL PROTECTED]: (state = BLOCKED) - com.mftl.emx.hub.Server$MemoryMonitor.run() @bci=58 (Interpreted frame) Thread [EMAIL PROTECTED]: (state = BLOCKED) Thread [EMAIL PROTECTED]: (state = BLOCKED) - java.lang.Object.wait(long) (Interpreted frame) - java.lang.Object.wait(long) (Interpreted frame) - java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=116 (Interpreted frame) - java.lang.ref.ReferenceQueue.remove() @bci=2, line=132 (Interpreted frame) - java.lang.ref.Finalizer$FinalizerThread.run() @bci=3, line=159 (Interpreted frame) Thread [EMAIL PROTECTED]: (state = BLOCKED) - java.lang.Object.wait(long) (Interpreted frame) - java.lang.Object.wait(long) (Interpreted frame) - java.lang.Object.wait() @bci=2, line=474 (Interpreted frame) - java.lang.ref.Reference$ReferenceHandler.run() @bci=46, line=116 (Interpreted frame) Thread [EMAIL PROTECTED]: (state = BLOCKED) - java.lang.Object.wait(long) (Interpreted frame) - java.lang.Object.wait(long) (Interpreted frame) - java.lang.Thread.join(long) @bci=38, line=1095 (Interpreted frame) - java.lang.Thread.join() @bci=2, line=1148 (Interpreted frame) - java.lang.ref.Finalizer$1.run() @bci=43, line=115 (Interpreted frame) - java.security.AccessController.doPrivileged(java.security.PrivilegedAction) (Interpreted frame) - java.lang.ref.Finalizer.forkSecondaryFinalizer(java.lang.Runnable) @bci=10, line=121 (Interpreted frame) - java.lang.ref.Finalizer.runFinalization() @bci=7, line=126 (Interpreted frame) - java.lang.Runtime.runFinalization0() (Interpreted frame) - java.lang.Runtime.runFinalization() @bci=0, line=686 (Interpreted frame) - java.lang.System.runFinalization() @bci=3, line=912 (Interpreted frame) - com.mftl.emx.hub.Server.<clinit>() @bci=54 (Interpreted frame) FULL JSTACK FOR HANGING PROCESS ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb10 ___lwp_cond_wait + 0x4 0xfdeb4768 void ObjectMonitor::wait(long long,int,Thread*) + 0x59c 0xfdeb5978 void ObjectSynchronizer::wait(Handle,long long,Thread*) + 0xe8 0xfdeb5628 JVM_MonitorWait + 0x31c 0xf840c280 * java.lang.Object.wait(long) bci:469741230 (Interpreted frame) 0xf840c224 * java.lang.Object.wait(long) bci:0 (Interpreted frame) 0xf8405764 * java.lang.Thread.join(long) bci:38 line:1095 (Interpreted frame) 0xf8405764 * java.lang.Thread.join() bci:2 line:1148 (Interpreted frame) 0xf8405764 * java.lang.ref.Finalizer$1.run() bci:43 line:115 (Interpreted frame) 0xf8400218 <StubRoutines> 0xfdd9a808 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) + 0x5a0 0xfde28704 JVM_DoPrivileged + 0x500 0xfe7c9bec Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2 + 0x14 <interpreter> method entry point (kind = native) 0xf840c224 * java.security.AccessController.doPrivileged(java.security.PrivilegedAction) bci:0 (Interpreted frame) 0xf8405874 * java.lang.ref.Finalizer.forkSecondaryFinalizer(java.lang.Runnable) bci:10 line:121 (Interpreted frame) 0xf8405764 * java.lang.ref.Finalizer.runFinalization() bci:7 line:126 (Interpreted frame) 0xf8400218 <StubRoutines> 0xfdd9a808 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) + 0x5a0 0xfdedea14 jni_CallStaticVoidMethod + 0x500 0xfe7d2d98 Java_java_lang_Runtime_runFinalization0 + 0x84 <interpreter> method entry point (kind = native) 0xf840c224 * java.lang.Runtime.runFinalization0() bci:0 (Interpreted frame) 0xf8405764 * java.lang.Runtime.runFinalization() bci:0 line:686 (Interpreted frame) 0xf8405764 * java.lang.System.runFinalization() bci:3 line:912 (Interpreted frame) 0xf8405764 * com.mftl.emx.hub.Server.<clinit>() bci:94 (Interpreted frame) 0xf8400218 <StubRoutines> 0xfdd9a808 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) + 0x5a0 0xfddf0ab4 void instanceKlass::call_class_initializer_impl(instanceKlassHandle,Thread*) + 0x100 0xfdd79eec void instanceKlass::initialize_impl(instanceKlassHandle,Thread*) + 0x5ac 0xfdd676e8 void instanceKlass::initialize(Thread*) + 0x80 0xfdebf12c _jclass*find_class_from_class_loader(JNIEnv_*,symbolHandle,unsigned char,Handle,Handle,unsigned char,Thread*) + 0xd8 0xfdec0744 jni_FindClass + 0x6b8 0x00011edc main + 0xe3c 0x00011088 _start + 0x108 ----------------- [EMAIL PROTECTED] ----------------- 0xff29f4ac _signotifywait + 0x4 0xff361c90 thr_yield + 0x8c ----------------- [EMAIL PROTECTED] ----------------- 0xff35d9e0 _reap_wait + 0x38 0xff35d738 _reaper + 0x38 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb10 ___lwp_cond_wait + 0x4 0xfddc309c int Monitor::wait(int,long) + 0x16c 0xfdd9932c GCTask*GCTaskManager::get_task(unsigned) + 0x1e4 0xfdf5234c void GCTaskThread::run() + 0x180 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb10 ___lwp_cond_wait + 0x4 0xfddc309c int Monitor::wait(int,long) + 0x16c 0xfdd9932c GCTask*GCTaskManager::get_task(unsigned) + 0x1e4 0xfdf5234c void GCTaskThread::run() + 0x180 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb10 ___lwp_cond_wait + 0x4 0xff297168 _lwp_cond_timedwait + 0x98 0xfddc3258 int Monitor::wait(int,long) + 0x328 0xfdf6b4fc void VMThread::run() + 0x1b4 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb10 ___lwp_cond_wait + 0x4 0xfdeb4768 void ObjectMonitor::wait(long long,int,Thread*) + 0x59c 0xfdeb5978 void ObjectSynchronizer::wait(Handle,long long,Thread*) + 0xe8 0xfdeb5628 JVM_MonitorWait + 0x31c 0xf840c280 * java.lang.Object.wait(long) bci:469740825 (Interpreted frame) 0xf840c224 * java.lang.Object.wait(long) bci:0 (Interpreted frame) 0xf8405764 * java.lang.Object.wait() bci:2 line:474 (Interpreted frame) 0xf8405764 * java.lang.ref.Reference$ReferenceHandler.run() bci:46 line:116 (Interpreted frame) 0xf8400218 <StubRoutines> 0xfdd9a808 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) + 0x5a0 0xfdec319c void JavaCalls::call_virtual(JavaValue*,Handle,KlassHandle,symbolHandle,symbolHandle,Thread*) + 0x188 0xfdee2700 void thread_entry(JavaThread*,Thread*) + 0x134 0xfdede29c void JavaThread::run() + 0x1d8 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb10 ___lwp_cond_wait + 0x4 0xfdeb4768 void ObjectMonitor::wait(long long,int,Thread*) + 0x59c 0xfdeb5978 void ObjectSynchronizer::wait(Handle,long long,Thread*) + 0xe8 0xfdeb5628 JVM_MonitorWait + 0x31c 0xf840c280 * java.lang.Object.wait(long) bci:469741080 (Interpreted frame) 0xf840c224 * java.lang.Object.wait(long) bci:0 (Interpreted frame) 0xf8405764 * java.lang.ref.ReferenceQueue.remove(long) bci:44 line:116 (Interpreted frame) 0xf8405874 * java.lang.ref.ReferenceQueue.remove() bci:2 line:132 (Interpreted frame) 0xf8405874 * java.lang.ref.Finalizer$FinalizerThread.run() bci:3 line:159 (Interpreted frame) 0xf8400218 <StubRoutines> 0xfdd9a808 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) + 0x5a0 0xfdec319c void JavaCalls::call_virtual(JavaValue*,Handle,KlassHandle,symbolHandle,symbolHandle,Thread*) + 0x188 0xfdee2700 void thread_entry(JavaThread*,Thread*) + 0x134 0xfdede29c void JavaThread::run() + 0x1d8 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb5c _lwp_sema_wait + 0x8 0xff3590f0 _swtch + 0x158 0xff35c888 sema_wait + 0xbc 0xfdf61dc0 int check_pending_signals(int) + 0x254 0xfdf58ec8 void signal_thread_entry(JavaThread*,Thread*) + 0x34 0xfdede29c void JavaThread::run() + 0x1d8 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb10 ___lwp_cond_wait + 0x4 0xfddc33ec int Monitor::wait(int,long) + 0x4bc 0xfdf35d00 void CompileBroker::compiler_thread_loop() + 0x22c 0xfdede29c void JavaThread::run() + 0x1d8 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb10 ___lwp_cond_wait + 0x4 0xfddc33ec int Monitor::wait(int,long) + 0x4bc 0xfdf35d00 void CompileBroker::compiler_thread_loop() + 0x22c 0xfdede29c void JavaThread::run() + 0x1d8 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb10 ___lwp_cond_wait + 0x4 0xfddc33ec int Monitor::wait(int,long) + 0x4bc 0xfdf35d00 void CompileBroker::compiler_thread_loop() + 0x22c 0xfdede29c void JavaThread::run() + 0x1d8 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb10 ___lwp_cond_wait + 0x4 0xfddc309c int Monitor::wait(int,long) + 0x16c 0xfdf64b44 void LowMemoryDetector::low_memory_detector_thread_entry(JavaThread*,Thread*) + 0x2ec 0xfdede29c void JavaThread::run() + 0x1d8 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29dce8 _poll + 0x4 0xfdd90cd0 int os::sleep(Thread*,long long,int) + 0x25c 0xfdfa5194 void WatcherThread::run() + 0xe8 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb10 ___lwp_cond_wait + 0x4 0xfdeb4768 void ObjectMonitor::wait(long long,int,Thread*) + 0x59c 0xfdeb5978 void ObjectSynchronizer::wait(Handle,long long,Thread*) + 0xe8 0xfdd79adc void instanceKlass::initialize_impl(instanceKlassHandle,Thread*) + 0x19c 0xfdd676e8 void instanceKlass::initialize(Thread*) + 0x80 0xfdd96dc0 void LinkResolver::resolve_static_call(CallInfo&,KlassHandle&,symbolHandle,symbolHandle,KlassHandle,int,int,Thread*) + 0x194 0xfdd6b904 void LinkResolver::resolve_invoke(CallInfo&,Handle,constantPoolHandle,int,Bytecodes::Code,Thread*) + 0xc8 0xfdd703a0 void InterpreterRuntime::resolve_invoke(JavaThread*,Bytecodes::Code) + 0x3e8 0xf8416108 * com.mftl.emx.hub.Server$MemoryMonitor.run() bci:58 (Interpreted frame) 0xf8400218 <StubRoutines> 0xfdd9a808 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) + 0x5a0 0xfdec319c void JavaCalls::call_virtual(JavaValue*,Handle,KlassHandle,symbolHandle,symbolHandle,Thread*) + 0x188 0xfdee2700 void thread_entry(JavaThread*,Thread*) + 0x134 0xfdede29c void JavaThread::run() + 0x1d8 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29fb10 ___lwp_cond_wait + 0x4 0xfdeb4768 void ObjectMonitor::wait(long long,int,Thread*) + 0x59c 0xfdeb5978 void ObjectSynchronizer::wait(Handle,long long,Thread*) + 0xe8 0xfdd79adc void instanceKlass::initialize_impl(instanceKlassHandle,Thread*) + 0x19c 0xfdd676e8 void instanceKlass::initialize(Thread*) + 0x80 0xfdd96dc0 void LinkResolver::resolve_static_call(CallInfo&,KlassHandle&,symbolHandle,symbolHandle,KlassHandle,int,int,Thread*) + 0x194 0xfdd6b904 void LinkResolver::resolve_invoke(CallInfo&,Handle,constantPoolHandle,int,Bytecodes::Code,Thread*) + 0xc8 0xfdd703a0 void InterpreterRuntime::resolve_invoke(JavaThread*,Bytecodes::Code) + 0x3e8 0xf8416108 * com.mftl.emx.hub.Server$FinalizerThreadBoost.finalize() bci:29 (Interpreted frame) 0xf8400218 <StubRoutines> 0xfdd9a808 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) + 0x5a0 0xfddf84f4 void jni_invoke_nonstatic(JNIEnv_*,JavaValue*,_jobject*,JNICallType,_jmethodID*,JNI_ArgumentPusher*,Thread*) + 0x4e0 0xfdf108e8 jni_CallVoidMethod + 0x1f0 0xfe7cfb84 Java_java_lang_ref_Finalizer_invokeFinalizeMethod + 0x78 <interpreter> method entry point (kind = native) 0xf840c224 * java.lang.ref.Finalizer.invokeFinalizeMethod(java.lang.Object) bci:0 (Interpreted frame) 0xf8405764 * java.lang.ref.Finalizer.runFinalizer() bci:45 line:83 (Interpreted frame) 0xf8405764 * java.lang.ref.Finalizer.access$100(java.lang.ref.Finalizer) bci:1 line:14 (Interpreted frame) 0xf8405764 * java.lang.ref.Finalizer$2.run() bci:18 line:131 (Interpreted frame) 0xf8405c2c * java.lang.Thread.run() bci:11 line:595 (Interpreted frame) 0xf8400218 <StubRoutines> 0xfdd9a808 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) + 0x5a0 0xfdec319c void JavaCalls::call_virtual(JavaValue*,Handle,KlassHandle,symbolHandle,symbolHandle,Thread*) + 0x188 0xfdee2700 void thread_entry(JavaThread*,Thread*) + 0x134 0xfdede29c void JavaThread::run() + 0x1d8 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 ----------------- [EMAIL PROTECTED] ----------------- 0xff29dce8 _poll + 0x4 0xfdd90cd0 int os::sleep(Thread*,long long,int) + 0x25c 0xfdf0ca4c JVM_Sleep + 0x260 0xf840c280 * java.lang.Thread.sleep(long) bci:833143 (Interpreted frame) 0xf840c224 * java.lang.Thread.sleep(long) bci:0 (Interpreted frame) 0xf8405764 * org.apache.log4j.helpers.FileWatchdog.run() bci:11 line:95 (Interpreted frame) 0xf8400218 <StubRoutines> 0xfdd9a808 void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*) + 0x5a0 0xfdec319c void JavaCalls::call_virtual(JavaValue*,Handle,KlassHandle,symbolHandle,symbolHandle,Thread*) + 0x188 0xfdee2700 void thread_entry(JavaThread*,Thread*) + 0x134 0xfdede29c void JavaThread::run() + 0x1d8 0xfe264240 void*_start(void*) + 0x208 0xff36b11c _thread_start + 0x40 -----Original Message----- From: James Stauffer [mailto:[EMAIL PROTECTED] Sent: 10 July 2006 12:55 To: Log4J Users List Subject: Re: Log4J causing appln to hang Can you generate a stack trace during the hang? On 7/10/06, John Apling <[EMAIL PROTECTED]> wrote: > Hi, > > We're experiencing an intermittent problem (roughly 1 in 15 times) whereby > sometimes our Java application hangs soon after starting. It all started > after we upgraded the version of Java from 1.3.1.16 to 1.5.0.06 (everything > was fine before). We are using Log4J version 1.2.6. We have 2 threads that > are started from the static initialiser of the initial class. When the > problem occurs within each thread (in every case of failure) they both hang > at the point where the following statement is called: > > if (m_logger.isEnabledFor(Level.INFO)) > > (where m_logger is defined as "private static final Logger m_logger = > Logger.getLogger(Server.class.getName());") > > We know it hangs at this point as we have system.out.println() statements > immediately before and after this statement. > > The Java process still exists but the process hangs indefinitely. > > I have tried upgrading Log4J to version 1.2.13 but the same problem still > occurs. > > I have searched every Log4J bug on the buglist and also searched the Log4J > mailing lists as well as google searches and cannot find anything similar. > > Does anyone have any idea why this might be failing? > > (c) Message Copyright EMX Company Limited 2006. All rights reserved. > Full email disclaimer can be viewed at: > http://www.emx.co.uk/disclaimer.html > EMX Company Limited. > Tel: 01279 858300, Fax: 01279 858301, Client Services Tel: 01279 858333, > Website: www.emx.co.uk > > Calls, e-mails and written correspondence may be monitored to assist with > training, policy enforcement and resolution of disputes. > ____________________________________________________________________ > This email has been scanned for all viruses by MessageLabs. > -- James Stauffer Are you good? Take the test at http://www.livingwaters.com/good/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] © Message Copyright EMX Company Limited 2006. All rights reserved. Full email disclaimer can be viewed at: http://www.emx.co.uk/disclaimer.html EMX Company Limited. Tel: 01279 858300, Fax: 01279 858301, Client Services Tel: 01279 858333, Website: www.emx.co.uk Calls, e-mails and written correspondence may be monitored to assist with training, policy enforcement and resolution of disputes. ____________________________________________________________________ This email has been scanned for all viruses by MessageLabs. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
