List Info

Thread: Commented: (XMLBEANS-328) Problems in multi-processor environment




Commented: (XMLBEANS-328) Problems in multi-processor environment
country flaguser name
United States
2007-06-14 08:54:26
    [ https://issues.apache.org/jira/brows
e/XMLBEANS-328?page=com.atlassian.jira.plugin.system.issueta
bpanels:comment-tabpanel#action_12504741 ] 

Matthieu Baechler commented on XMLBEANS-328:
--------------------------------------------

We have the same problem here, with a multithreaded software
running on a SMP computer.

I didn't managed to extract a short test case to reproduce
this problem at will, but my software is a good test case.

Anyway, I think I found the origin of this threading
problem, see the patch attached below.

Review welcome.

> Problems in multi-processor environment
> ---------------------------------------
>
>                 Key: XMLBEANS-328
>                 URL: ht
tps://issues.apache.org/jira/browse/XMLBEANS-328
>             Project: XMLBeans
>          Issue Type: Bug
>    Affects Versions: Version 2.2, Version 2.2.1
>         Environment: At least Win XP and Linux 2.6 with
Sun JRE. Intel multi-core processor.
>            Reporter: Pasi Lehtimaki
>            Priority: Critical
>
> Running a strongly threadded Eclipse application using
xmlbeans in multi-processor (/multi-core) computer causes
frequent crashes in xmlbeans code. 
> Most of the crases happen in Cur.java in form of a NPE:

> ***************************************************
> java.lang.NullPointerException
> 	at
org.apache.xmlbeans.impl.store.Cur.listRemove(Cur.java:2783)

> 	at
org.apache.xmlbeans.impl.store.Locale.getCur(Locale.java:277
5)
> 	at
org.apache.xmlbeans.impl.store.Locale.tempCur(Locale.java:27
36)
> 	at
org.apache.xmlbeans.impl.store.Locale.tempCur(Locale.java:27
31)
> 	at
org.apache.xmlbeans.impl.store.Xobj.tempCur(Xobj.java:348)
> 	at
org.apache.xmlbeans.impl.store.Xobj.new_cursor(Xobj.java:181
0)
> 	at
org.apache.xmlbeans.impl.values.XmlObjectBase.newCursor(XmlO
bjectBase.java:250)
> 	at
org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(Xml
ObjectBase.java:424)
> 	at
org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(Xml
ObjectBase.java:415)
> ***************************************************
> In some cases the crash happens in Locale.exit():
> ***************************************************
>  Exception occurred:
java.lang.ArrayIndexOutOfBoundsException: -1
>                      at
org.apache.xmlbeans.impl.store.Locale.exit(Locale.java:2840)

> ***************************************************
> This problem problem occurs in xmlbeans 2.2. and in the
latest version in SVN. The problem disappears when I turn
the multi-core support off from BIOS and reappears again
immediently when I turn it back on. So I believe that this
has something to do with threading. Only classes Locale.java
and Cur.java seem to be affected. I haven't encountered any
exceptions from other classes. 

-- 
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-unsubscribexmlbeans.apache.org
For additional commands, e-mail: dev-helpxmlbeans.apache.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )