[
https://issues.jboss.org/browse/WFLY-11563?page=com.atlassian.jira.plugin...
]
James Perkins commented on WFLY-11563:
--------------------------------------
Correct yes. This was just something I noticed while looking at the security manager
failure. It's an easy way to see if the issue is gone FWIW as I consistently saw it
when the test failed.
Race condition in PersistenceUnitServiceImpl when the service is
being stopped
------------------------------------------------------------------------------
Key: WFLY-11563
URL:
https://issues.jboss.org/browse/WFLY-11563
Project: WildFly
Issue Type: Bug
Components: JPA / Hibernate
Reporter: James Perkins
Assignee: Scott Marlow
Priority: Major
There's a race in the {{PersistenceUnitServiceImpl.stop()}} as the service is stopped
in a thread. The {{entityManagerFactory}} is a volatile variable not read into a local
variable and may be set to {{null}} if stop is invoked twice. The {{proxyBeanManager}}
should be looked as well.
{code}
16:38:59,190 ERROR [org.jboss.as.jpa] (ServerService Thread Pool -- 26) WFLYJPA0007:
Failed to stop persistence unit service
jpa_classTransformerTestWithMockProvider.ear/ejbjar.jar#mypc:
java.lang.NullPointerException
at com.sun.proxy.$Proxy101.isOpen(Unknown Source)
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl$2$1.run(PersistenceUnitServiceImpl.java:255)
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl$2$1.run(PersistenceUnitServiceImpl.java:236)
at
org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:649)
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl$2.run(PersistenceUnitServiceImpl.java:281)
at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)