-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
1.1.1
-
sparc
-
solaris_2.5
I have a small test program that I am including in attachments,
Running java exec3 is ok on jdk1.1.1, only one thread enters the
synchronized method
running java -debug exec3 a couple of times shows that the code has entered
a synchronized method despite a thread already spinning busy in there
Full thread dump:
"Thread-6" (TID:0xee31f8f8, sys_thread_t:0xef1a1de0, state:R) prio=5 *current thread*
mythread.stopper(exec3.java:8)
mythread.run(exec3.java:14)
"Thread-5" (TID:0xee31f8b8, sys_thread_t:0xef1d1de0, state:R) prio=5
mythread.stopper(exec3.java:8)
mythread.run(exec3.java:14)
"Breakpoint handler" (TID:0xee31f5d8, sys_thread_t:0xef201de0, state:CW) prio=9
sun.tools.debug.BreakpointQueue.nextEvent(BreakpointQueue.java)
sun.tools.debug.BreakpointHandler.run(BreakpointHandler.java:187)
"Debugger agent" (TID:0xee3055d8, sys_thread_t:0xef231de0, state:CW) prio=10
java.net.PlainSocketImpl.accept(PlainSocketImpl.java:387)
java.net.ServerSocket.implAccept(ServerSocket.java:206)
java.net.ServerSocket.accept(ServerSocket.java:189)
sun.tools.debug.Agent.run(Agent.java:277)
java.lang.Thread.run(Thread.java)
"Finalizer thread" (TID:0xee300220, sys_thread_t:0xef2c1de0, state:CW) prio=1
"Async Garbage Collector" (TID:0xee3001d8, sys_thread_t:0xef2f1de0, state:R) prio=1
"Idle thread" (TID:0xee300190, sys_thread_t:0xef3c1de0, state:R) prio=0
"Clock" (TID:0xee3000d0, sys_thread_t:0xef3f1de0, state:CW) prio=12
"main" (TID:0xee3000a8, sys_thread_t:0x4ed58, state:CW) prio=5
Monitor Cache Dump:
<unknown key> (0xef2f1de0): owner "Async Garbage Collector" (0xef2f1de0, 1 entry)
sun.tools.debug.BreakpointQueue@EE31F600/EE376AE0: <unowned>
Waiting to be notified:
"Breakpoint handler"
java.net.PlainSocketImpl@EE305408/EE354CE8: owner "Debugger agent" (0xef231de0, 1 entry)
mythread@EE31F8B8/EE3C6B58: owner "Thread-5" (0xef1d1de0, 1 entry)
mythread@EE31F8F8/EE333D78: owner "Thread-6" (0xef1a1de0, 1 entry)
Registered Monitor Dump:
Thread queue lock: <unowned>
Waiting to be notified:
"main"
Running java exec3 is ok on jdk1.1.1, only one thread enters the
synchronized method
running java -debug exec3 a couple of times shows that the code has entered
a synchronized method despite a thread already spinning busy in there
Full thread dump:
"Thread-6" (TID:0xee31f8f8, sys_thread_t:0xef1a1de0, state:R) prio=5 *current thread*
mythread.stopper(exec3.java:8)
mythread.run(exec3.java:14)
"Thread-5" (TID:0xee31f8b8, sys_thread_t:0xef1d1de0, state:R) prio=5
mythread.stopper(exec3.java:8)
mythread.run(exec3.java:14)
"Breakpoint handler" (TID:0xee31f5d8, sys_thread_t:0xef201de0, state:CW) prio=9
sun.tools.debug.BreakpointQueue.nextEvent(BreakpointQueue.java)
sun.tools.debug.BreakpointHandler.run(BreakpointHandler.java:187)
"Debugger agent" (TID:0xee3055d8, sys_thread_t:0xef231de0, state:CW) prio=10
java.net.PlainSocketImpl.accept(PlainSocketImpl.java:387)
java.net.ServerSocket.implAccept(ServerSocket.java:206)
java.net.ServerSocket.accept(ServerSocket.java:189)
sun.tools.debug.Agent.run(Agent.java:277)
java.lang.Thread.run(Thread.java)
"Finalizer thread" (TID:0xee300220, sys_thread_t:0xef2c1de0, state:CW) prio=1
"Async Garbage Collector" (TID:0xee3001d8, sys_thread_t:0xef2f1de0, state:R) prio=1
"Idle thread" (TID:0xee300190, sys_thread_t:0xef3c1de0, state:R) prio=0
"Clock" (TID:0xee3000d0, sys_thread_t:0xef3f1de0, state:CW) prio=12
"main" (TID:0xee3000a8, sys_thread_t:0x4ed58, state:CW) prio=5
Monitor Cache Dump:
<unknown key> (0xef2f1de0): owner "Async Garbage Collector" (0xef2f1de0, 1 entry)
sun.tools.debug.BreakpointQueue@EE31F600/EE376AE0: <unowned>
Waiting to be notified:
"Breakpoint handler"
java.net.PlainSocketImpl@EE305408/EE354CE8: owner "Debugger agent" (0xef231de0, 1 entry)
mythread@EE31F8B8/EE3C6B58: owner "Thread-5" (0xef1d1de0, 1 entry)
mythread@EE31F8F8/EE333D78: owner "Thread-6" (0xef1a1de0, 1 entry)
Registered Monitor Dump:
Thread queue lock: <unowned>
Waiting to be notified:
"main"