[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlbeans-dev
Subject: [jira] Created: (XMLBEANS-388) XmlBeans can Deadlock Threads
From: "Paul Hepworth (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date: 2008-11-04 17:38:44
Message-ID: 1544352379.1225820324241.JavaMail.jira () brutus
[Download RAW message or body]
XmlBeans can Deadlock Threads
-----------------------------
Key: XMLBEANS-388
URL: https://issues.apache.org/jira/browse/XMLBEANS-388
Project: XMLBeans
Issue Type: Bug
Components: XmlObject
Affects Versions: Version 2.3, Version 2.3.1, Version 2.4
Environment: Windows XP, Java 1.6
Reporter: Paul Hepworth
The situation can occur when calling a setter on an XmlObject which synchronizes on \
Locale A, to set an XmlObject which synchronizes on Locale B at the same time as \
calling a setter on an XmlObject which synchronizes on Locale B to set an XmlObject \
which synchronizes on Locale A.
The code within XmlObjectBase is fine, but the problem lies in the generated code \
compiled from a schema.
The code that is generated contains a synchronized block on the monitor (Locale A or \
B depending on the object), and then delegates to the XmlObjectBase set method, which \
detects that you need to lock more than 1 Locale and so acquires a GlobalLock and \
then synchronizes on both monitors.
As another thread can be doing the reverse, you can end up with 2 threads, one with \
Locale A locked, and one with Locale B locked. The first one then acquires a \
GlobalLock, but can never obtain a lock on the other Locale.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic