Issue Details (XML | Word | Printable)

Key: NUCCORE-608
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

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

Deadlock around OM.enlistInTransaction and OM.findObject

Created: 30/Nov/10 09:59 AM   Updated: 10/Dec/10 07:48 AM   Resolved: 30/Nov/10 10:58 AM
Component/s: Code Structure
Affects Version/s: None
Fix Version/s: 2.2.0.release


 Description  « Hide
Resulted from "test.jdo.general" MultithreadTest on very rare occasions (usually just worked).

Found one Java-level deadlock:
=============================
"Thread-5042":
  waiting to lock monitor 0x09c86500 (object 0x8a09fd58, a org.datanucleus.jdo.JDOPersistenceManager),
  which is held by "Thread-3044"
"Thread-3044":
  waiting to lock monitor 0x09c87310 (object 0x87350000, a org.jpox.samples.models.company.Employee),
  which is held by "Thread-3043"
"Thread-3043":
  waiting to lock monitor 0x09c87f90 (object 0x8a0a1ac0, a org.datanucleus.ObjectManagerImpl),
  which is held by "Thread-3044"

Java stack information for the threads listed above:
===================================================
"Thread-5042":
        at org.datanucleus.jdo.JDOPersistenceManager.evictAll(JDOPersistenceManager.java:418)
        - waiting to lock <0x8a09fd58> (a org.datanucleus.jdo.JDOPersistenceManager)
        at org.datanucleus.tests.MultithreadTest$5.run(MultithreadTest.java:289)
        at java.lang.Thread.run(Thread.java:619)
"Thread-3044":
        at org.jpox.samples.models.company.Person.jdoReplaceDetachedState(Person.java)
        - waiting to lock <0x87350000> (a org.jpox.samples.models.company.Employee)
        at org.datanucleus.jdo.state.JDOStateManagerImpl.resetDetachState(JDOStateManagerImpl.java:5022)
        at org.datanucleus.ObjectManagerImpl.getObjectFromCache(ObjectManagerImpl.java:4072)
        - locked <0x8a0a1ac0> (a org.datanucleus.ObjectManagerImpl)
        at org.datanucleus.ObjectManagerImpl.findObject(ObjectManagerImpl.java:2659)
        - locked <0x8a0a1ac0> (a org.datanucleus.ObjectManagerImpl)
        at org.datanucleus.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1662)
        - locked <0x8a09fd58> (a org.datanucleus.jdo.JDOPersistenceManager)
        at org.datanucleus.tests.MultithreadTest$4.run(MultithreadTest.java:277)
        at java.lang.Thread.run(Thread.java:619)
"Thread-3043":
        at org.datanucleus.ObjectManagerImpl.enlistInTransaction(ObjectManagerImpl.java:693)
        - waiting to lock <0x8a0a1ac0> (a org.datanucleus.ObjectManagerImpl)
        at org.datanucleus.jdo.state.JDOStateManagerImpl.enlistInTransaction(JDOStateManagerImpl.java:1047)
        at org.datanucleus.state.LifeCycleState.changeState(LifeCycleState.java:117)
        at org.datanucleus.jdo.state.Hollow.transitionWriteField(Hollow.java:151)
        at org.datanucleus.state.AbstractStateManager.transitionWriteField(AbstractStateManager.java:570)
        - locked <0x87350000> (a org.jpox.samples.models.company.Employee)
        at org.datanucleus.jdo.state.JDOStateManagerImpl.preWriteField(JDOStateManagerImpl.java:4592)
        at org.datanucleus.jdo.state.JDOStateManagerImpl.setStringField(JDOStateManagerImpl.java:2458)
        at org.jpox.samples.models.company.Person.jdoSetlastName(Person.java)
        at org.jpox.samples.models.company.Person.setLastName(Person.java:150)
        at org.datanucleus.tests.MultithreadTest$4.run(MultithreadTest.java:278)
        at java.lang.Thread.run(Thread.java:619)

Andy Jefferson added a comment - 30/Nov/10 10:58 AM
Fixed in SVN trunk.

Andy Jefferson made changes - 30/Nov/10 10:58 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Assignee Andy Jefferson [ andy ]
Fix Version/s 2.2.0.release [ 10931 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 10/Dec/10 07:48 AM
Status Resolved [ 5 ] Closed [ 6 ]