<AWT Dev> VM hangs in VS2008 build

Artem Ananiev Artem.Ananiev at Sun.COM
Tue Jul 13 04:56:19 PDT 2010

Hi, AWT & HotSpot teams,

I've just experienced a problem with a simple test - see the attached 
file. The test shows a file dialog and then hangs when the dialog is 
being disposed. I tried to get a stack trace... and failed, both with 
jstack and ctrl+break from the console.

When I attached to the process with Visual Studio, I noticed several 
suspicious threads:

1. One of the threads with AWT code waits for safe_Malloc() to return, 
which in turn waits for JVM code in Monitor::set_owner_implementation():

  ntdll.dll!_ZwWaitForSingleObject at 12()
  ntdll.dll!_ZwWaitForSingleObject at 12()
  jvm.dll!Monitor::set_owner_implementation(Thread * 
new_owner=0x00000000)  Line 1307
  ntdll.dll!_RtlEnterCriticalSection at 4()
  ntdll.dll!@RtlpAllocateHeap at 24()
  ntdll.dll!_RtlAllocateHeap at 12()
  [Frames below may be incorrect and/or missing, no symbols loaded for 
  awt.dll!safe_Malloc(unsigned int size=6)  Line 85
  awt.dll!CreateLocaleObject(JNIEnv_ * env=0x04601d34, const char * 
name=0x002a1e58)  Line 539
  awt.dll!Java_sun_awt_windows_WInputMethod_getNativeLocale(JNIEnv_ * 
env=0x04601d34, _jclass * cls=0x065bf728)  Line 299

2. Another thread is in os::free():

  ntdll.dll!_ZwWaitForSingleObject at 12()
  ntdll.dll!_ZwWaitForSingleObject at 12()
  KernelBase.dll!_GetProcAddress at 8()
  ntdll.dll!_RtlEnterCriticalSection at 4()
  ntdll.dll!@RtlpFreeHeap at 16()
  ntdll.dll!_RtlFreeHeap at 12()
  kernel32.dll!_HeapFree at 12()
  [Frames below may be incorrect and/or missing, no symbols loaded for 
  jvm.dll!os::free(void * memblock=0x01f64d50)  Line 602
  jvm.dll!ChunkPool::free_all_but(unsigned int n=5)  Line 152
  jvm.dll!ChunkPoolCleaner::task()  Line 195
  jvm.dll!PeriodicTask::real_time_tick(unsigned int delay_time=50)  Line 60
  jvm.dll!WatcherThread::run()  Line 1086
  jvm.dll!java_start(Thread * thread=0x01f5c800)  Line 377

3. One more thread waiting for a memory-related operation - I suspect 
it's the thread that should provide the stack trace:

  ntdll.dll!_ZwWaitForSingleObject at 12()
  ntdll.dll!_ZwWaitForSingleObject at 12()
  jvm.dll!InterfaceSupport::serialize_memory(JavaThread * 
thread=0x00000148)  Line 37
  kernel32.dll!_WaitForSingleObjectExImplementation at 12()
  kernel32.dll!_WaitForSingleObject at 8()
  jvm.dll!Win32AttachListener::dequeue()  Line 233
  jvm.dll!AttachListener::dequeue()  Line 353
  jvm.dll!attach_listener_thread_entry(JavaThread * thread=0x01f4d800, 
Thread * __the_thread__=0x01f4d800)  Line 376
  jvm.dll!JavaThread::thread_main_inner()  Line 1402
  jvm.dll!java_start(Thread * thread=0x01f4d800)  Line 377

Any ideas about what's going? The hang only occurs if I build JDK and 
HotSpot using VS2008 - exactly the same JDK7-b99 promoted build (which 
is built with VS2003) works fine. If I change the file dialog with a 
regular AWT modal dialog, the problem goes away as well.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Test.java
Url: http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20100713/0cc1bb04/Test.java 

More information about the awt-dev mailing list