ow2-proactive / programming

ProActive Programming library
http://proactive.activeeon.com/
GNU Affero General Public License v3.0
8 stars 19 forks source link

Deadlock in MOP class loader #904

Open activeeon-bot opened 13 years ago

activeeon-bot commented 13 years ago

Original issue created by Clement Mathieu on 16, May 2011 at 17:45 PM - PROACTIVE-1027


Synchronization between the MOPClassLoader and Javassist class pool is wrong and can lead to a deadlock. A such deadlock has been encountered when ProActiveRuntime.getClassData() and newActive() are called concurrently. ThreadDump attached

activeeon-bot commented 13 years ago

Attachments:

activeeon-bot commented 12 years ago

Original comment posted by Bastien Sauvan on 24, Apr 2012 at 18:17 PM


I also encountered the same problem by calling concurrently newActive() and MetaObjectInterfaceClassGenerator.generateInterface(). A quick and dirty fix in my case could be to encapsulate a part of the generateInterface method into a block synchronized on MOPClassLoader.getMOPClassLoader(). See attachments deadlock-component.txt and patch-component.diff.

activeeon-bot commented 10 years ago

Original comment posted by Youri Bonnaffe on 01, Apr 2014 at 15:22 PM


I had it while integration the REST API in Scheduling. It happened on eventListener = PAActiveObject.turnActive(eventListener); in org.ow2.proactive_grid_cloud_portal.scheduler.SchedulerStateListener#connect

activeeon-bot commented 10 years ago

Original comment posted by Brian Amedro on 07, Aug 2014 at 10:33 AM


Youri uses a poor workaround to avoid this bug (synchronized on method)