{"action":"opened","issue":{"url":"https://api.github.com/repos/OpenHFT/Chronicle-Map/issues/20","labels_url":"https://api.github.com/repos/OpenHFT/Chronicle-Map/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/OpenHFT/Chronicle-Map/issues/20/comments","events_url":"https://api.github.com/repos/OpenHFT/Chronicle-Map/issues/20/events","html_url":"https://github.com/OpenHFT/Chronicle-Map/issues/20","id":67151108,"number":20,"title":"IllegalMonitorStateException reading from ChronicleMap","user":{"login":"uberbrodt","id":978339,"avatar_url":"https://avatars.githubusercontent.com/u/978339?v=3","gravatar_id":"","url":"https://api.github.com/users/uberbrodt","html_url":"https://github.com/uberbrodt","followers_url":"https://api.github.com/users/uberbrodt/followers","following_url":"https://api.github.com/users/uberbrodt/following{/other_user}","gists_url":"https://api.github.com/users/uberbrodt/gists{/gist_id}","starred_url":"https://api.github.com/users/uberbrodt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uberbrodt/subscriptions","organizations_url":"https://api.github.com/users/uberbrodt/orgs","repos_url":"https://api.github.com/users/uberbrodt/repos","events_url":"https://api.github.com/users/uberbrodt/events{/privacy}","received_events_url":"https://api.github.com/users/uberbrodt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-08T15:06:39Z","updated_at":"2015-04-08T15:06:39Z","closed_at":null,"body":"Hi, I have a rather large map (4.8GB serialized in memory mapped file, ~8M entries) that I'm using in a Scala/Akka project. At one point I have a parallelized search (~200 Actors) that are pulling values out of the map and performing a distance calculation. I'm seeing slow response times and the following errors:\r\n\r\nGrabbing lock held by processId: 134217728, threadId: 0\r\nGrabbing lock held by processId: 134217728, threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by processId: 134217729, threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by processId: 134217729, threadId: 0\r\nGrabbing lock held by processId: 134217728, threadId: 0\r\nGrabbing lock held by processId: 134217728, threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by processId: 134217728, threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by processId: 134217728, threadId: 0\r\nGrabbing lock held by processId: 134217728, threadId: 0\r\nGrabbing lock held by processId: 134217728, threadId: 0\r\nGrabbing lock held by processId: 134217728, threadId: 0\r\nGrabbing lock held by threadId: 0\r\nGrabbing lock held by processId: 134217728, threadId: 0\r\nGrabbing lock held by threadId: 0\r\nFailed to unlock as expected\r\njava.lang.IllegalMonitorStateException: writersLock underflow 0\r\n\tat net.openhft.lang.io.AbstractBytes.unlockRWWriteLock(AbstractBytes.java:2800) ~[lang-6.6.1.jar:na]\r\n\tat net.openhft.chronicle.map.VanillaChronicleMap$Segment.readUnlock(VanillaChronicleMap.java:1649) [chronicle-map-2.1.4.jar:2.1.4]\r\n\tat net.openhft.chronicle.map.VanillaChronicleMap$Segment.acquire(VanillaChronicleMap.java:1731) [chronicle-map-2.1.4.jar:2.1.4]\r\n\tat net.openhft.chronicle.map.VanillaChronicleMap.lookupUsing(VanillaChronicleMap.java:639) [chronicle-map-2.1.4.jar:2.1.4]\r\n\tat net.openhft.chronicle.map.VanillaChronicleMap.lookupUsing(VanillaChronicleMap.java:625) [chronicle-map-2.1.4.jar:2.1.4]\r\n\tat net.openhft.chronicle.map.VanillaChronicleMap.get(VanillaChronicleMap.java:576) [chronicle-map-2.1.4.jar:2.1.4]\r\n\tat net.uberbrodt.idistance.SearchCluster$$anonfun$qualityFilterList$1.apply(SearchCluster.scala:38) [classes/:na]\r\n\tat net.uberbrodt.idistance.SearchCluster$$anonfun$qualityFilterList$1.apply(SearchCluster.scala:37) [classes/:na]\r\n\tat scala.collection.immutable.List.map(List.scala:277) [scala-library-2.11.6.jar:na]\r\n\tat net.uberbrodt.idistance.SearchCluster.qualityFilterList(SearchCluster.scala:37) [classes/:na]\r\n\tat net.uberbrodt.idistance.SearchCluster.findNearestNeighbors(SearchCluster.scala:107) [classes/:na]\r\n\tat net.uberbrodt.idistance.SearchCluster$$anonfun$receive$1.applyOrElse(SearchCluster.scala:24) [classes/:na]\r\n\tat akka.actor.Actor$class.aroundReceive(Actor.scala:465) [akka-actor_2.11-2.3.9.jar:na]\r\n\tat net.uberbrodt.idistance.SearchCluster.aroundReceive(SearchCluster.scala:17) [classes/:na]\r\n\tat akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) [akka-actor_2.11-2.3.9.jar:na]\r\n\tat akka.actor.ActorCell.invoke(ActorCell.scala:487) [akka-actor_2.11-2.3.9.jar:na]\r\n\tat akka.dispatch.Mailbox.processMailbox(Mailbox.scala:254) [akka-actor_2.11-2.3.9.jar:na]\r\n\tat akka.dispatch.Mailbox.run(Mailbox.scala:221) [akka-actor_2.11-2.3.9.jar:na]\r\n\tat akka.dispatch.Mailbox.exec(Mailbox.scala:231) [akka-actor_2.11-2.3.9.jar:na]\r\n\tat scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [scala-library-2.11.6.jar:na]\r\n\tat scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [scala-library-2.11.6.jar:na]\r\n\tat scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [scala-library-2.11.6.jar:na]\r\n\tat scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [scala-library-2.11.6.jar:na]\r\nFailed to unlock as expected\r\n\r\n\r\nThe project completes, but I'm not sure what the errors mean. Too much parallelism? Map too large? I'll work on creating a test project that can be used to replicate the issue if necessary."}}