Timer-2 thread is waiting on the 0x00000000e1a23398, and it's also locking the 0x00000000e1a23398. Will this situation cause Timer-2 thread deadlock? Can anybody explain it for me?
This is not evidence of a deadlock.
Timer-2 is has acquired the lock on a TaskQueue
object and is waiting for a notify on the same object. Indeed, if the thread wasn't holding the lock at the point it called Object.wait()
it would have gotten an IllegalMonitorStateException
.
I am not saying that your application is not deadlocked at all. However, two threads "Timer-1" and "Timer2-" are both waiting for other threads to notify them. This is not a classic deadlock, where two threads would each be waiting for the other to release a lock.
What else can I figure out?
Well, from looking at the code of java.util.Timer
:
The "Timer-2" thread is simply waiting for the next time for the timer to trigger. This is completely normal behavior for a Timer
.
The "Timer-1" thread is in the process of executing a timer task. It appears to be trying to create an NSQ connection to a (presumably) remote service. If it is blocking, that presumably means that the service it is trying to connect to is inaccessible for some reason.
There is not much more that can be gleaned from the stack dumps ... without digging into the "com.trendrr.nsq" source code.
Is there any idea that can be used to find the cause reason?