[ http://issues.apache.org/jira/browse/TUSCANY-1006?page=comments#action_12460009 ] Ron Gavlin commented on TUSCANY-1006: -------------------------------------
FYI, our application test suite was unable to reproduce this problem on a single-CPU system. Rather, we had to use one of our dual-CPU test machines to reproduce it. So, developing a unit test to reliably reproduce this problem on a single-CPU machine will likely be difficult. Nevertheless, I'll do a little more research and see what I can do. In the meantime, would you consider applying my one-line patch? Without synchronized access to cachedSDOObjectChanges, it is reasonable to expect map corruption when multiple threads "put" to it at the same time. > ChangeSummaryImpl.cachedSDOObjectChanges appears to not be thread safe > ---------------------------------------------------------------------- > > Key: TUSCANY-1006 > URL: http://issues.apache.org/jira/browse/TUSCANY-1006 > Project: Tuscany > Issue Type: Bug > Components: Java SDO Implementation > Affects Versions: Java-M2 > Environment: Sun JDK 1.4.2_11, 2-CPU server > Reporter: Ron Gavlin > Priority: Critical > > I have an application in which multiple threads access a shared > ChangeSummaryImpl. Each thread invokes ChangeSummaryImpl.getOldValues() > repeatedly. This causes one or more of the threads to enter an infinite > "while (true) -" loop in HashMap.get(Object) with the following stack trace: > HashMap.get(Object) line: 323 > ChangeSummaryImpl.getOldValues(DataObject) line: 481 > ... > I suspect this occurs because the access to HashMap cachedSDOObjectChanges is > not synchronized. > I have been unable as of yet to create a simple test case that demonstrates > the problem. In the meantime, I will try to implement a short-term fix by > changing line 93 of ChangeSummaryImpl > from > protected HashMap cachedSDOObjectChanges = new HashMap(); > to > protected Map cachedSDOObjectChanges = Collections.synchronizedMap(new > HashMap()); > I will let you know if that fixes the problem. Any insight or assistance you > can offer concerning this problem is appreciated. This is a show-stopper > problem for us. > Regards, > - Ron -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
