Issue Details (XML | Word | Printable)

Key: GROOVY-1964
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Jochen Theodorou
Reporter: John Williams
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
groovy

deadlock in MemoryAwareConcurrentReadMap.get

Created: 02/Jul/07 10:05 AM   Updated: 03/Jul/07 09:54 AM
Component/s: groovy-jdk
Affects Version/s: 1.1-beta-1
Fix Version/s: 1.1-beta-2

Time Tracking:
Not Specified

File Attachments: 1. Text File threads.txt (17 kB)

Environment: Linux JDK 1.5
Issue Links:
Duplicate
 


 Description  « Hide
I've found a deadlock in MemoryAwareConcurrentReadMap.get that affects calls to MetaClassRegistryImpl.getMetaClass. This particular case seems to happen very infrequently; the last time I saw it happen was after my program had been running for 4.5 hours. I have seen it more than once, however, so I'm fairly certain this bug will strike any Groovy program that runs long enough.

This issue may be related GROOVY-1890 but I can't be certain from the information I have.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Guillaume Laforge added a comment - 02/Jul/07 10:23 AM
Could you try with a snapshot of Groovy 1.1-beta-2 that you can download there?
http://build.canoo.com/groovy/

I encountered this problem with beta-1, but this problem has been solved with GROOVY-1890, so you shouldn't have it anymore.
If you could double-check, that would be great.


Guillaume Laforge added a comment - 02/Jul/07 10:47 AM
I've had a closer look at the stacktraces you got, and the ones I had too, and they are the same.
So I can confirm you this bug is fixed by GROOVY-1890 in SVN Trunk.
The fix will be in Groovy 1.1-beta-2.

Guillaume Laforge added a comment - 02/Jul/07 10:48 AM
Already fixed in SVN Trunk.
Fix available in Groovy 1.1-beta-2.

Jochen Theodorou added a comment - 02/Jul/07 10:50 AM
As I found a free version of java5's ConcurrentreaderMap I will MemoryAwareConcurrentReadMap class and replace it, with a new version based on the ConcurrentReaderMap.

John Williams added a comment - 03/Jul/07 09:46 AM
I switched to 1.1-BETA-2 and the problem seems to have disappeared as expected. My program that originally hung after 4.5 hours has run for nearly 18 hours now with no problems.

Jochen Theodorou added a comment - 03/Jul/07 09:54 AM
I very much hope it... not only was the other deadlock fixed, the map is now replaced with a new version that is based on ConcurrentReaderHashMap and should be free of deadlocks.. I hope.. If you have tested it in the last 10 hours or so, then you should have the new map