[jira] Created: (CAY-1120) Deadlock CayenneContextGraphManager when committing from two threads

From: Ari Maniatis (JIRA) ("Ari)
Date: Thu Oct 09 2008 - 19:32:11 EDT

  • Next message: Andrus Adamchik: "JDBC 4 drivers do not exist"

    Deadlock CayenneContextGraphManager when committing from two threads
    --------------------------------------------------------------------

                     Key: CAY-1120
                     URL: https://issues.apache.org/cayenne/browse/CAY-1120
                 Project: Cayenne
              Issue Type: Bug
              Components: Cayenne Core Library
        Affects Versions: 3.0
                Reporter: Ari Maniatis
                Assignee: Andrus Adamchik

    How to reproduce:

    * Try to commit some changes. This thread is delayed from completing the change by a lifecycle event which takes about 10 seconds to complete (in this case, contacting a credit card gateway)
    * while this lifecycle event is running, have another thread try to commit changes to a different context.

    Note that this is ROP, Cayenne 3.0 (from svn close to the M4 release)

    /10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- Deadlocked Thread:
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- ------------------
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- Thread Foxtrot Multi Worker Thread Runner #4 (Id = 147) BLOCKED org.apache.cayenne.CayenneContextGraphManage..57a5f
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.CayenneContextMergeHandler.runWithEventsDisabled(CayenneContextMergeHandler.java:267)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.CayenneContextMergeHandler.graphFlushed(CayenneContextMergeHandler.java:81)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.lang.reflect.Method.invoke(Method.java:585)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.util.Invocation.fire(Invocation.java:204)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.event.EventManager$Dispatch.fire(EventManager.java:423)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.event.DispatchQueue.dispatchEvent(DispatchQueue.java:157)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.event.DispatchQueue.dispatchEvent(DispatchQueue.java:58)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.event.EventManager.dispatchEvent(EventManager.java:362)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.event.EventManager.postEvent(EventManager.java:333)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.remote.ClientChannel.onSync(ClientChannel.java:220)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.CayenneContext.doCommitChanges(CayenneContext.java:228)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.CayenneContext.commitChanges(CayenneContext.java:187)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- ish.oncourse.cayenne.CayenneContext.commitChanges(CayenneContext.java:100)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- ish.oncourse.controller.ViewController.commitChanges(ViewController.java:1065)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- ish.oncourse.controller.EditController.saveRecord(EditController.java:622)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- ish.oncourse.controller.enrolment.QuickEnrollController.saveRecord(QuickEnrollController.java:637)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- ish.oncourse.controller.EditController$2.run(EditController.java:587)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- foxtrot.AbstractWorkerThread$1.run(AbstractWorkerThread.java:40)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.security.AccessController.doPrivileged(Native Method)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:36)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- foxtrot.workers.MultiWorkerThread$1.run(MultiWorkerThread.java:51)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.lang.Thread.run(Thread.java:613)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- Deadlocked Thread:
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- ------------------
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- Thread AWT-EventQueue-0 (Id = 15) BLOCKED org.apache.cayenne.event.DispatchQueu..688b9
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.event.DispatchQueue.dispatchEvent(DispatchQueue.java:54)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.event.EventManager.dispatchEvent(EventManager.java:362)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.event.EventManager.postEvent(EventManager.java:333)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.CayenneContextGraphManager.send(CayenneContextGraphManager.java:316)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.CayenneContextGraphManager.graphCommitted(CayenneContextGraphManager.java:147)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.CayenneContext.doCommitChanges(CayenneContext.java:242)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- org.apache.cayenne.CayenneContext.commitChanges(CayenneContext.java:187)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- ish.oncourse.cayenne.CayenneContext.commitChanges(CayenneContext.java:100)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- ish.oncourse.PreferenceController.setValue(PreferenceController.java:131)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- ish.persistence.CommonPreferenceController.setListViewDividerPosition(CommonPreferenceController.java:1133)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- ish.oncourse.controller.ListController.dispose(ListController.java:778)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- ish.oncourse.controller.ViewController.windowClosing(ViewController.java:812)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:292)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:291)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.Window.processWindowEvent(Window.java:1213)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- javax.swing.JFrame.processWindowEvent(JFrame.java:267)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.Window.processEvent(Window.java:1171)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.Component.dispatchEventImpl(Component.java:4068)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.Container.dispatchEventImpl(Container.java:2068)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.Window.dispatchEventImpl(Window.java:1801)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.Component.dispatchEvent(Component.java:3903)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
    3/10/08 10:04:43 AM [0x0-0xc30c3].au.ish.com.oncourse.client[1667] -- java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
    



    This archive was generated by hypermail 2.0.0 : Thu Oct 09 2008 - 19:32:41 EDT