DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35377>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35377

           Summary: ConcurrentModificationException in
                    OptimisticMapWrapper.copyChangesToConcurrentTransactions
           Product: Commons
           Version: 1.0 Final
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: major
          Priority: P2
         Component: Transaction
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


I've found (another) thread safety problem in commons-transaction 1.1b2.
OptimisticMapWrapper.copyChangesToConcurrentTransactions() is iterating over
"activeTransactions" without synchronizing around the iterator use.

Here's the trace that I am seeing. Note this only happens rarely and under heavy
load. I am seeing this though slide when running with "sequential-mode=off" in
Domain.xml

14 Jun 2005 07:31:25 - org.apache.slide.transaction.SlideTransaction - WARNING -
Commit failure: Resource manager
[EMAIL PROTECTED] Error code
java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java(Compiled Code))
        at java.util.HashMap$KeyIterator.next(HashMap.java(Compiled Code))
        at
org.apache.commons.transaction.memory.OptimisticMapWrapper.copyChangesToConcurrentTransactions(OptimisticMapWrapper.java(Compiled
Code))
        at
org.apache.commons.transaction.memory.OptimisticMapWrapper.commitTransaction(OptimisticMapWrapper.java:155)
        at
org.apache.commons.transaction.memory.OptimisticMapWrapper.commitTransaction(OptimisticMapWrapper.java:127)
        at
org.apache.commons.transaction.memory.jca.MapXAResource$MapTransactionalResource.commit(MapXAResource.java:111)
        at
org.apache.commons.transaction.util.xa.AbstractXAResource.commit(AbstractXAResource.java(Compiled
Code))
        at
org.apache.slide.store.mem.AbstractTransientStore.commit(AbstractTransientStore.java:106)
        at
org.apache.slide.transaction.SlideTransaction.commit(SlideTransaction.java(Compiled
Code))
        at
org.apache.slide.transaction.SlideTransactionManager.commit(SlideTransactionManager.java(Compiled
Code))
        at
org.apache.slide.common.NamespaceAccessTokenImpl.commit(NamespaceAccessTokenImpl.java(Compiled
Code))
        at
org.apache.slide.webdav.method.AbstractWebdavMethod.run(AbstractWebdavMethod.java(Compiled
Code))
        at
org.apache.slide.webdav.WebdavServlet.service(WebdavServlet.java(Compiled Code))
        at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled 
Code))
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java(Compiled 
Code))
        at
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java(Compiled
Code))
        at
com.ris.manager.gateway.http.IPAddressRestriction.doFilter(IPAddressRestriction.java(Compiled
Code))
        at
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java(Compiled
Code))
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java(Compiled
Code))
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java(Compiled 
Code))
        at org.mortbay.http.HttpContext.handle(HttpContext.java(Compiled Code))
        at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java(Compiled
Code))
        at org.mortbay.http.HttpContext.handle(HttpContext.java(Compiled Code))
        at org.mortbay.http.HttpServer.service(HttpServer.java(Compiled Code))
        at org.mortbay.http.HttpConnection.service(HttpConnection.java(Compiled
Code))
        at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java(Compiled Code))
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java(Compiled
Code))
        at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java(Compiled 
Code))
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java(Compiled
Code))
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java(Compiled
Code))

Patch to follow.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to