java - "Found 1 deadlock" but trace shows that not locked by any thread -
the jvm tells me deadlock has occurred:
found 1 java-level deadlock: ============================= "tp-processor107": waiting ownable synchronizer 0x00002aaaf58e70f0, (a java.util.concurrent.locks.reentrantreadwritelock$nonfairsync), held "indextrackerthread3" "indextrackerthread3": waiting ownable synchronizer 0x00002aaaf4394580, (a java.util.concurrent.locks.reentrantreadwritelock$nonfairsync), held "tp-processor16" "tp-processor16": waiting ownable synchronizer 0x00002aaaf58e70f0, (a java.util.concurrent.locks.reentrantreadwritelock$nonfairsync), held "indextrackerthread3" we can see indextrackerthread3 waiting resource held tp-processor16, , vice-versa. indeed deadlock.
we can see indextrackerthread3 waiting 0x00002aaaf4394580:
"indextrackerthread3": - parking wait <0x00002aaaf4394580> my question:
in the threads dump, why there no line - locked <0x00002aaaf4394580> ?
it seems 0x00002aaaf58e70f0 not locked thread. locking it?
in deadlock documentation have read (example), every different - parking wait <0x123> line, there 1 - locked <0x123> line. begin suspecting jvm bug. misunderstanding something?
note: sorry linking pastebin, question not answerable without having full dump. brevity, removed lines contained " at", not include lock information.
the java.util.concurrent package utilizes extralingual, native parking mechanism (as other native mechanisms, such atomic compare-and-swap). can see i'm talking here.
the pattern describe occuring in thread dump stems classic java idiom synchronized(lock) { lock.wait(); }.
Comments
Post a Comment