tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Leyke <alexley...@cs.com>
Subject JVM Error
Date Tue, 28 Jan 2003 18:40:56 GMT
>
>
>I've seen similar problems - java is very sensitive to each thread
>beeing 'registered'. My understanding is that attaching the
>thread will set all the TLDs that are needed, and jk2 is calling the 
>attach method - so I don't know what is wrong here.
>My bet would be on thread creation - I would add some printf with the
>TID serving the request ( before attaching the thread ). One thing that
>may happen in 10 minutes is the thread management code adding or removing
>threads. 
>
>Costin
>  
>
Right, something like that. The deepest I can debug is jk2_vm_attach 
function in jk_vm_default.c module. The function makes a call to JNI's 
GetEnv method, and if result indicates the thread is not attached, calls 
AttachCurrentThread. Well, I see Web server create a brand new thread, 
and GetEnv returns an environment pointer for it... This is obviously 
wrong and causes a problem later when JK2 attempts to call a static 
method in Tomcat.
I thought GetEnv may be broken somehow and altered the code so Attach 
always happens. No luck either - this time access violation happens in 
AttachCurrentThread and stack backtrace looks like this:

jk2_vm_attach(env = 0x1cc220, jkvm = 0x224fc0)
jni_AttachCurrentThread(0xfe0a0338, 0x580f00, 0x0, 0xfe092000, 
0xee171668, 0x0)
Thread::initialize_thread_local_storage(0x580f00, 0x6, 0x580f00, 0x0, 
0x0, 0x0)
ThreadLocalStorage::set_thread(0xfe092000, 0x580f00, 0x580f00, 
0xee17156c, 0x0, 0x0)
report_fatal(0x42, 0xfe092000, 0xfe0482a8, 0xee171, 0xfe092000, 0xee1714ac)
report_error(0xd4, 0xee170b7c, 0x42, 0xfe028208, 0xfe0ffddc, 0xfe092000)
Thread::print(0x580f00, 0xfe092000, 0x1e8, 0xee170, 0xfe092000, 0xee1702ec)
os::get_priority(0x580f00, 0xee1702ec, 0xfe092000, 0xee17033c, 
0x7fffffff, 0xfe092000)
os::get_native_priority(0x580f00, 0xee170284, 0x0, 0xee170b50, 0x79, 
0xee170357)

The offending thread doesn't seem to differ in any way (e.g., stack 
size, priority attributes) from previous Web server request thread which 
successfully attached itself to JVM. Am I missing some step here?

Thanks,
Alex


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message