Since Confluence 4.3 I'm getting random deadlocks in the HTTP worker threads.
More specifically: Sometimes after starting Confluence with atlas-debug I can't load a single page as the respective thread is blocked. If I Ctrl-C the process and restart Confluence it sometimes works correctly.
I suspect the Active Objects Plugin that is shipped with Confluence 4.3 causing this. Blocked threads are locked in this method (excerpt of the attached full thread dump):
"http-1990-21" daemon prio=10 tid=0x11e34800 nid=0xa63 waiting for monitor entry [0x1133b000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.atlassian.activeobjects.osgi.DelegatingActiveObjects$MemoizingSupplier.get(DelegatingActiveObjects.java:142)
- waiting to lock <0x3a2323a8> (a com.atlassian.activeobjects.osgi.DelegatingActiveObjects$MemoizingSupplier)
at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.executeInTransaction(DelegatingActiveObjects.java:121)
Here's what I did:
- Started Confluence 4.3.2 using atlas-debug from a dummy plugin project with no modules.
- Tried to open the dashboard, was redirected to the login page.
- Logged in as admin/admin
- Was redirected to the dashboard (which seemed to load fine, maybe cached)
- Tried to open a space -> BLOCK, browser keeps loading page forever
- Pressed F5 to reload the dashboard -> BLOCK
- Pressed F5 again to reload the dashboard -> BLOCK
- and so on
In other cases the blocking also was triggered when initially loading the dashboard without being redirected to the login page before (I had a cookie that logged me in).
In the thread dump you'll see a lot of HTTP worker threads. Confluence created new ones since I pressed F5 quite some time to get more threads blocked in the same position.