[jboss-jira] [JBoss JIRA] (WFLY-11563) Race condition in PersistenceUnitServiceImpl when the service is being stopped
Scott Marlow (Jira)
issues at jboss.org
Sat Jan 5 10:09:00 EST 2019
[ https://issues.jboss.org/browse/WFLY-11563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13678570#comment-13678570 ]
Scott Marlow commented on WFLY-11563:
-------------------------------------
Thanks James!
> 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)
More information about the jboss-jira
mailing list