[JBoss JIRA] (WFLY-13162) ConcurrentModificationException in WildFlyJobXmlResolver
by Cheng Fang (Jira)
[ https://issues.redhat.com/browse/WFLY-13162?page=com.atlassian.jira.plugi... ]
Cheng Fang commented on WFLY-13162:
-----------------------------------
[~mletenay] thanks for the update. I Will look into this.
> ConcurrentModificationException in WildFlyJobXmlResolver
> --------------------------------------------------------
>
> Key: WFLY-13162
> URL: https://issues.redhat.com/browse/WFLY-13162
> Project: WildFly
> Issue Type: Bug
> Components: Batch
> Affects Versions: 18.0.1.Final, 19.0.0.Beta3, 20.0.0.Beta1
> Reporter: Hielke Hoeve
> Assignee: Cheng Fang
> Priority: Major
>
> Because of a thread unsafe construction in WildFlyJobXmlResolver I am experiencing ConcurrentModificationExceptions while starting my EAR every so often. This is because every EJB of the EAR is processed by WildFlyJobXmlResolver in paralel threads. Even if it has no jbatch dependency or dependency to a EJB which does.
> This is not reproducable for every startup as it depends on the performance of the host machine, number of ejbs in ear, number of threads and thread timing.
> I have created an example project representing our project setup with which I am able to reproduce the issue using a default wildfly build. This test project contains 1 EJB with jbatch, a number of plain EJBs, a WAR which uses the jbatch EJB and an EAR.
> See below for the exception stacktrace.
> I have made a small fix for this issue @ https://github.com/hielkehoeve/wildfly/commit/82047233621c3e5bdbd45333ca4.... The example test project can also be found there.
> {code:java}
> 08:32:30,164 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.subunit."project.ear"."project-d.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."project.ear"."project-d.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment "project-d.jar" of deployment "project.ear"
> at org.jboss.as.server@10.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
> at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
> at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
> at org.jboss.msc@1.4.11.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
> at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
> at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
> at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
> at java.base/java.lang.Thread.run(Thread.java:834)
> Caused by: java.util.ConcurrentModificationException
> at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719)
> at java.base/java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:741)
> at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:351)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.WildFlyJobXmlResolver.merge(WildFlyJobXmlResolver.java:261)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.WildFlyJobXmlResolver.forDeployment(WildFlyJobXmlResolver.java:127)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.WildFlyJobXmlResolver.forDeployment(WildFlyJobXmlResolver.java:130)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.WildFlyJobXmlResolver.forDeployment(WildFlyJobXmlResolver.java:130)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.WildFlyJobXmlResolver.forDeployment(WildFlyJobXmlResolver.java:130)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.WildFlyJobXmlResolver.forDeployment(WildFlyJobXmlResolver.java:130)
> at org.wildfly.extension.batch.jberet@18.0.0.Final//org.wildfly.extension.batch.jberet.deployment.BatchEnvironmentProcessor.deploy(BatchEnvironmentProcessor.java:78)
> at org.jboss.as.server@10.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
> ... 8 more
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (WFLY-13185) Rest-client can't be used without opentracing subsystem present in config
by Jean Francois Denise (Jira)
Jean Francois Denise created WFLY-13185:
-------------------------------------------
Summary: Rest-client can't be used without opentracing subsystem present in config
Key: WFLY-13185
URL: https://issues.redhat.com/browse/WFLY-13185
Project: WildFly
Issue Type: Bug
Components: MP REST Client
Reporter: Jean Francois Denise
Assignee: Alessio Soldano
Trying to provision the following set of galleon layers:
jaxrs ==> for jaxrs and rest-client
microprofile-config
I am getting an NPE. If open-tracing is provisioned along with jaxrs, no NPE and client injection works fine.
java.lang.NullPointerException
at org.jboss.resteasy.microprofile.client.RestClientExtension.extractBaseUri(RestClientExtension.java:40)
at org.jboss.resteasy.microprofile.client.RestClientExtension.registerRestClient(RestClientExtension.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:95)
at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:85)
at org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:168)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:330)
at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:123)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:308)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:286)
at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessAnnotatedType(ContainerLifecycleEvents.java:207)
at org.jboss.weld.bootstrap.events.ContainerLifecycleEvents.fireProcessAnnotatedType(ContainerLifecycleEvents.java:176)
at org.jboss.weld.bootstrap.BeanDeployer.processAnnotatedTypes(BeanDeployer.java:166)
at org.jboss.weld.bootstrap.BeanDeployment.createTypes(BeanDeployment.java:219)
at org.jboss.weld.bootstrap.WeldStartup.startInitialization(WeldStartup.java:421)
at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:79)
at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:96)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (WFWIP-309) MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
by Ladislav Thon (Jira)
[ https://issues.redhat.com/browse/WFWIP-309?page=com.atlassian.jira.plugin... ]
Ladislav Thon commented on WFWIP-309:
-------------------------------------
Just FYI, during the work on the other issues in SmallRye Fault Tolerance, I hit this issue several times, too. It was always caused by some thread hanging around even after \[CDI\] container shutdown.
> MP Fault Tolerance - WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
> --------------------------------------------------------------------------------------------------------------
>
> Key: WFWIP-309
> URL: https://issues.redhat.com/browse/WFWIP-309
> Project: WildFly WIP
> Issue Type: Bug
> Components: MP Fault Tolerance
> Reporter: Miroslav Novak
> Assignee: Radoslav Husar
> Priority: Blocker
>
> There is unexpected error log in following test scenario:
> - Deploy MP FT service with:
> {noformat}
> @Asynchronous
> @Bulkhead(value = 15, waitingTaskQueue = 15)
> @Timeout(value = 1000)
> @Fallback(fallbackMethod = "processFallback")
> public CompletionStage<MyConnection> bulkheadTimeout(boolean fail) throws InterruptedException {
> if (fail) {
> Thread.sleep(2000);
> }
> return CompletableFuture.completedFuture(new MyConnection() {
> @Override
> public String getData() {
> return "Hello from @Bulkhead @Timeout method";
> }
> });
> }
> private CompletionStage<MyConnection> processFallback(boolean fail) {
> return CompletableFuture.completedFuture(new MyConnection() {
> @Override
> public String getData() {
> return "Fallback Hello";
> }
> });
> }
> {noformat}
> - Send 10+ parallel requests with fail == true
> Expected result:
> All requests should go to fallback.
> Actual Result:
> This test is currently hitting issue WFWIP-308 however additionally there is error in server log:
> {noformat}
> 10:49:45,752 ERROR [stderr] (pool-22-thread-5) Exception in thread "pool-22-thread-5" Exception in thread "pool-22-thread-1" org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
> 10:49:45,752 ERROR [stderr] (pool-22-thread-5) at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:647)
> 10:49:45,753 ERROR [stderr] (pool-22-thread-5) at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
> 10:49:45,753 ERROR [stderr] (pool-22-thread-5) at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:123)
> 10:49:45,753 ERROR [stderr] (pool-22-thread-5) at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
> 10:49:45,753 ERROR [stderr] (pool-22-thread-5) at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87)
> 10:49:45,753 ERROR [stderr] (pool-22-thread-5) at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131)
> 10:49:45,753 ERROR [stderr] (pool-22-thread-5) at org.eclipse.microprofile.metrics.MetricRegistry$Proxy$_$$_WeldClientProxy.getHistograms(Unknown Source)
> 10:49:45,754 ERROR [stderr] (pool-22-thread-5) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramOf(MetricsCollectorFactory.java:105)
> 10:49:45,754 ERROR [stderr] (pool-22-thread-5) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramUpdate(MetricsCollectorFactory.java:86)
> 10:49:45,754 ERROR [stderr] (pool-22-thread-5) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.bulkheadQueueLeft(MetricsCollectorFactory.java:125)
> 10:49:45,754 ERROR [stderr] (pool-22-thread-5) at io.smallrye.faulttolerance.core.bulkhead.CompletionStageBulkhead$CompletionStageBulkheadTask.run(CompletionStageBulkhead.java:78)
> 10:49:45,754 ERROR [stderr] (pool-22-thread-5) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 10:49:45,754 ERROR [stderr] (pool-22-thread-5) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 10:49:45,754 ERROR [stderr] (pool-22-thread-5) at java.lang.Thread.run(Thread.java:748)
> 10:49:45,755 ERROR [stderr] (pool-22-thread-1) org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
> 10:49:45,755 ERROR [stderr] (pool-22-thread-1) at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:647)
> 10:49:45,755 ERROR [stderr] (pool-22-thread-1) at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
> 10:49:45,755 ERROR [stderr] (pool-22-thread-1) at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:123)
> 10:49:45,755 ERROR [stderr] (pool-22-thread-1) at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
> 10:49:45,755 ERROR [stderr] (pool-22-thread-1) at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87)
> 10:49:45,756 ERROR [stderr] (pool-22-thread-1) at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131)
> 10:49:45,756 ERROR [stderr] (pool-22-thread-1) at org.eclipse.microprofile.metrics.MetricRegistry$Proxy$_$$_WeldClientProxy.getHistograms(Unknown Source)
> 10:49:45,756 ERROR [stderr] (pool-22-thread-1) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramOf(MetricsCollectorFactory.java:105)
> 10:49:45,756 ERROR [stderr] (pool-22-thread-1) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.histogramUpdate(MetricsCollectorFactory.java:86)
> 10:49:45,756 ERROR [stderr] (pool-22-thread-1) at io.smallrye.faulttolerance.metrics.MetricsCollectorFactory$MetricsCollectorImpl.bulkheadQueueLeft(MetricsCollectorFactory.java:125)
> 10:49:45,756 ERROR [stderr] (pool-22-thread-1) at io.smallrye.faulttolerance.core.bulkhead.CompletionStageBulkhead$CompletionStageBulkheadTask.run(CompletionStageBulkhead.java:78)
> 10:49:45,757 ERROR [stderr] (pool-22-thread-1) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 10:49:45,757 ERROR [stderr] (pool-22-thread-1) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 10:49:45,757 ERROR [stderr] (pool-22-thread-1) at java.lang.Thread.run(Thread.java:748)
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months