[JAVA-616] Semaphore released more times than acquired (java.lang.Error thrown on java 7) Created: 02/Aug/12 Updated: 29/Aug/12 Resolved: 07/Aug/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | 2.7.3 |
| Fix Version/s: | 2.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | gross | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | crash, driver | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
linux 2.6, 3.4 |
||
| Description |
|
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:
|
| Comments |
| Comment by Jeffrey Yemin [ 29/Aug/12 ] |
|
Closing as part of 2.9.0 release process. |
| Comment by auto [ 07/Aug/12 ] |
|
Author: {u'date': u'2012-08-07T09:36:06-07:00', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}Message: |
| Comment by Jeffrey Yemin [ 03/Aug/12 ] |
|
Thanks for reporting this. Can you work around this for now by restarting your application more often than that? |
| Comment by gross [ 03/Aug/12 ] |
|
Yes, about 2 months. |
| Comment by Jeffrey Yemin [ 03/Aug/12 ] |
|
Yeah, I see the difference in the code for Java 6 and Java 7. This will happen after Integer.MAX_VALUE uncontended releases to the connection pool. I assume this happened after running your application for quite a while? |