Opened 5 years ago

Closed 5 years ago

#1203 closed defect (fixed)

Resolve thread deadlocks

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: minor Milestone: Reggie v4.24.1
Component: net.sf.basedb.reggie Keywords:


I have had some issues with thread deadlocks during re-installation of Reggie during development. The problem seems to be located to the Reggie class. During re-installation a lot things is going in order to initialize configuration and setting up services. And it also seems like a request from the web browser is coming in at the same time to get new count values. If the timing is unfortunate it seems like two different threads can deadlock in various methods in the Reggie class. I have seen it in Reggie.getRootSessionControl() and Reggie.reloadConfig(). The other "offending" party is the Registry class in BASE that keeps track of all installed extensions.

It should not be too hard to solve this in the Reggie code, since there is actually no reason that the two methods above should block each other. The syncronization statement is locking too much. We need to implement two (or more) different locks.

The only workaround seems to be to restart Tomcat.

Change History (1)

comment:1 by Nicklas Nordborg, 5 years ago

Resolution: fixed
Status: newclosed

In 5749:

Fixes #1203: Resolve thread deadlocks

This should hopefully fix the deadlock problem.

Note: See TracTickets for help on using tickets.