Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationException in jdbc connection pool #24131

Closed
dmatej opened this issue Oct 15, 2022 · 0 comments · Fixed by #24404
Closed

ConcurrentModificationException in jdbc connection pool #24131

dmatej opened this issue Oct 15, 2022 · 0 comments · Fixed by #24404
Labels
bug Something isn't working
Milestone

Comments

@dmatej
Copy link
Contributor

dmatej commented Oct 15, 2022

Seen in logs of ejb_group_2 tests when refactoring - eclipse changed for i loop to foreach, which made it visible. But even with for i cycle it had to do wrong things.

[2022-10-15T10:24:23.885268+02:00] [GlassFish 7.0] [SEVERE] [] [jakarta.enterprise.logging.stderr] [tid: _ThreadID=217 _ThreadName=p: thread-pool-1; w: 8] [levelValue: 1000] [[
java.util.ConcurrentModificationException
at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1043)
at java.base/java.util.ArrayList$Itr.next(ArrayList.java:997)
at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.getResource(RWLockDataStructure.java:97)
at com.sun.enterprise.resource.pool.ConnectionPool.getMatchedResourceFromPool(ConnectionPool.java:789)
at com.sun.enterprise.resource.pool.ConnectionPool.resizePoolAndGetNewResource(ConnectionPool.java:767)
at com.sun.enterprise.resource.pool.ConnectionPool.getResourceFromPool(ConnectionPool.java:729)
at com.sun.enterprise.resource.pool.ConnectionPool.getUnenlistedResource(ConnectionPool.java:596)
at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:481)
at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:344)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:222)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:151)
at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:330)
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:283)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:223)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:153)
at com.sun.messaging.jms.ra.DirectConnectionFactory._allocateTopicConnection(DirectConnectionFactory.java:539)
at com.sun.messaging.jms.ra.DirectConnectionFactory.createTopicConnection(DirectConnectionFactory.java:344)
at com.sun.messaging.jms.ra.DirectConnectionFactory.createTopicConnection(DirectConnectionFactory.java:326)
at com.sun.s1asdev.ejb.mdb.msgbean.MsgBean.doJmsStuff(MsgBean.java:204)
at com.sun.s1asdev.ejb.mdb.msgbean.MsgBean.doStuff(MsgBean.java:147)
at com.sun.s1asdev.ejb.mdb.msgbean.MsgBean.onMessage(MsgBean.java:120)
at jdk.internal.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.glassfish.exousia.AuthorizationService.lambda$invokeBeanMethod$6(AuthorizationService.java:501)
at org.glassfish.exousia.AuthorizationService.runInScope(AuthorizationService.java:577)
at org.glassfish.exousia.AuthorizationService.invokeBeanMethod(AuthorizationService.java:501)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:295)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:3662)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4177)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4159)
at org.glassfish.ejb.mdb.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1126)
at org.glassfish.ejb.mdb.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:63)
at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:147)
at com.sun.proxy.$Proxy252.onMessage(Unknown Source)
at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:242)
at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:82)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:476)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:519)
]]

Proposal: Replace RWLockDataStructure by something else, standard or covered by tests.

dmatej added a commit to dmatej/glassfish that referenced this issue Oct 15, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Oct 15, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Oct 15, 2022
@dmatej dmatej added this to the 7.0.5 milestone Jun 5, 2023
@dmatej dmatej added the bug Something isn't working label Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant