-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.7.3
-
Component/s: Connection Management
-
Environment:linux 2.6, 3.4
openjdk7, oracle jdk7 (u2, u4, u5)
It seems like _waiting semaphore release more times than acquired.
Java 6 was tolerant to releasing a lot of permits (so it just overflows without any significant promblems). It may hold some threads in temporal starvation (because semapthore will have negative number of permits). But with such error after some time it will return to normal state.
But Java 7 will throw java.lang.Error in such case.
There's stack trace:
java.lang.Error: Maximum permit count exceeded at java.util.concurrent.Semaphore$Sync.tryReleaseShared(Semaphore.java:197) [rt.jar:1.7.0_04] at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1340) [rt.jar:1.7.0_04] at java.util.concurrent.Semaphore.release(Semaphore.java:431) [rt.jar:1.7.0_04] at com.mongodb.util.SimplePool.done(SimplePool.java:129) [mongo-java-driver-2.7.3.jar:] at com.mongodb.util.SimplePool.done(SimplePool.java:103) [mongo-java-driver-2.7.3.jar:]