[JBoss JIRA] (WFLY-11999) Wildfly creates to many instances of all web service classes
by Stefan Frings (Jira)
[ https://issues.redhat.com/browse/WFLY-11999?page=com.atlassian.jira.plugi... ]
Stefan Frings commented on WFLY-11999:
--------------------------------------
Thanks for your answer.
This example code is an extract from a larger application. First we had a SOAP interface only but later decided to add a Java interface as well for performance reason. I thought that I have to add the @ApplicationScoped (or any other scope). But it works also without it. So thanks for that, it solves the issue partially.
The attaches test program is now reduced to:
{code}
package com.mvneco.test;
import javax.jws.WebMethod;
import javax.jws.WebService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@WebService
public class SoapService
{
private Log log = LogFactory.getLog(SoapService.class);
public SoapService()
{
log.debug("Init SoapService 1");
}
@WebMethod
public String test(String payload)
{
log.debug("Start test(). payload="+payload);
return "OK";
}
}
{code}
I still get multiple log messages about the initialization:
{code}
2020-06-02 07:55:24,908 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "Test-1.0-SNAPSHOT.war" (runtime-name: "Test-1.0-SNAPSHOT.war")
2020-06-02 07:55:24,913 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) WFLYDS0013: Started FileSystemDeploymentService for directory /home/sfrings/wildfly/standalone/deployments
2020-06-02 07:55:25,653 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
2020-06-02 07:55:25,797 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBossWS 5.2.4.Final (Apache CXF 3.2.7)
2020-06-02 07:55:26,274 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0005: Deploying non-JDBC-compliant driver class org.mariadb.jdbc.Driver (version 2.4)
2020-06-02 07:55:26,332 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0018: Started Driver service with driver-name = mariadb-java-client-2.4.1.jar
2020-06-02 07:55:26,493 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) WFLYJCA0098: Bound non-transactional data source: java:jboss/datasources/EcopayDS
2020-06-02 07:55:26,493 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0098: Bound non-transactional data source: java:jboss/datasources/EcocoreDS
2020-06-02 07:55:26,501 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0098: Bound non-transactional data source: java:jboss/datasources/EcobillDS
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jboss.invocation.proxy.AbstractProxyFactory$1 (jar:file:/home/sfrings/wildfly/modules/system/layers/base/org/jboss/invocation/main/jboss-invocation-1.5.2.Final.jar!/) to method java.lang.Object.clone()
WARNING: Please consider reporting this to the maintainers of org.jboss.invocation.proxy.AbstractProxyFactory$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2020-06-02 07:55:26,654 INFO [org.jboss.ws.cxf.metadata] (MSC service thread 1-5) JBWS024061: Adding service endpoint metadata: id=com.mvneco.test.SoapService
address=http://localhost:8080/Test-1.0-SNAPSHOT/SoapService
implementor=com.mvneco.test.SoapService
serviceName={http://test.mvneco.com/}SoapServiceService
portName={http://test.mvneco.com/}SoapServicePort
annotationWsdlLocation=null
wsdlLocationOverride=null
mtomEnabled=false
2020-06-02 07:55:26,766 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-1) ISPN000128: Infinispan version: Infinispan 'Infinity Minus ONE +2' 9.4.8.Final
2020-06-02 07:55:27,491 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 66) WFLYCLINF0002: Started client-mappings cache from ejb container
2020-06-02 07:55:27,523 DEBUG [com.mvneco.test.SoapService] (MSC service thread 1-5) Init SoapService 1 <<<<<<<<<<<<<<<<<
2020-06-02 07:55:27,592 INFO [org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-5) Creating Service {http://test.mvneco.com/}SoapServiceService from class com.mvneco.test.SoapService
2020-06-02 07:55:27,912 INFO [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-5) Setting the server's publish address to be http://localhost:8080/Test-1.0-SNAPSHOT/SoapService
2020-06-02 07:55:27,975 INFO [org.jboss.ws.cxf.deployment] (MSC service thread 1-5) JBWS024074: WSDL published to: file:/home/sfrings/wildfly/standalone/data/wsdl/Test-1.0-SNAPSHOT.war/SoapServiceService.wsdl
2020-06-02 07:55:28,037 INFO [org.jboss.as.webservices] (MSC service thread 1-2) WFLYWS0003: Starting service jboss.ws.endpoint."Test-1.0-SNAPSHOT.war"."com.mvneco.test.SoapService"
2020-06-02 07:55:28,213 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 66) WFLYUT0021: Registered web context: '/Test-1.0-SNAPSHOT' for server 'default-server'
2020-06-02 07:55:28,259 INFO [org.jboss.as.server] (ServerService Thread Pool -- 39) WFLYSRV0010: Deployed "Test-1.0-SNAPSHOT.war" (runtime-name : "Test-1.0-SNAPSHOT.war")
2020-06-02 07:55:28,259 INFO [org.jboss.as.server] (ServerService Thread Pool -- 39) WFLYSRV0010: Deployed "mariadb-java-client-2.4.1.jar" (runtime-name : "mariadb-java-client-2.4.1.jar")
2020-06-02 07:55:28,384 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
2020-06-02 07:55:28,387 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
2020-06-02 07:55:28,394 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
2020-06-02 07:55:28,394 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 16.0.0.Final (WildFly Core 8.0.0.Final) started in 8988ms - Started 456 of 647 services (334 services are lazy, passive or on-demand)
2020-06-02 07:56:42,513 DEBUG [com.mvneco.test.SoapService] (default task-1) Init SoapService 1 <<<<<<<<<<<<<<<<<<<<
2020-06-02 07:56:42,518 DEBUG [com.mvneco.test.SoapService] (default task-1) Init SoapService 1 <<<<<<<<<<<<<<<<<<<<
2020-06-02 07:56:42,518 DEBUG [com.mvneco.test.SoapService] (default task-1) Start test(). payload=?
{code}
The message "Init SoapService 1" occurs 3 times.
> Wildfly creates to many instances of all web service classes
> ------------------------------------------------------------
>
> Key: WFLY-11999
> URL: https://issues.redhat.com/browse/WFLY-11999
> Project: WildFly
> Issue Type: Bug
> Components: Web Services
> Affects Versions: 8.0.0.Final, 16.0.0.Final, 19.0.0.Final
> Environment: Ubuntu 18.10 64bit, Open JDK 8 or Open JDK 11
> Reporter: Stefan Frings
> Assignee: Parul Sharma
> Priority: Minor
> Attachments: Test-1.0-SNAPSHOT.war, Test.zip, standalone.xml
>
>
> 1) My @Webservice classes are all constructed multiple times (3x - 4x) but I expected only one instance.
> 2) Only the second instance receives a call to the observer method for initialization. I expect that this method is called in each instance.
> The issue can be reproduced with the attached minimum project on Wildfly 8 with JDK 8 as well as Wildfly 16 with JDK 11.
> Complete source code of the whole application:
> {code}
> package com.mvneco.test;
> import javax.enterprise.context.ApplicationScoped;
> import javax.enterprise.context.Initialized;
> import javax.enterprise.event.Observes;
> import javax.jws.WebMethod;
> import javax.jws.WebService;
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> @ApplicationScoped
> @WebService
> public class SoapService
> {
> private Log log = LogFactory.getLog(SoapService.class);
> public SoapService()
> {
> log.debug("Init SoapService 1");
> }
> @WebMethod(exclude = true)
> public void init(@Observes @Initialized(ApplicationScoped.class) Object init)
> {
> log.debug("Init SoapService 2");
> }
> @WebMethod
> public String test(String payload)
> {
> log.debug("Start test(). payload="+payload);
> return "OK";
> }
> }
> {code}
> Extract from Log messages that show the issue (the complete log is in the attached ZIP):
> {code}
> 2019-04-17 13:12:21,399 DEBUG [com.mvneco.test.SoapService] (MSC service thread 1-2) Init SoapService 1
> 2019-04-17 13:12:23,068 DEBUG [com.mvneco.test.SoapService] (ServerService Thread Pool -- 74) Init SoapService 1
> 2019-04-17 13:12:23,070 DEBUG [com.mvneco.test.SoapService] (ServerService Thread Pool -- 74) Init SoapService 2
> 2019-04-17 13:12:23,475 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 16.0.0.Final (WildFly Core 8.0.0.Final) started in 10514ms - Started 510 of 699 services (337 services are lazy, passive or on-demand)
> 2019-04-17 13:12:28,920 INFO [org.apache.cxf.services.SoapService.REQ_IN] (default task-1) REQ_IN
> Address: http://localhost:8080/Test-1.0-SNAPSHOT/SoapService
> ...
> 2019-04-17 13:12:28,932 DEBUG [com.mvneco.test.SoapService] (default task-1) Init SoapService 1
> 2019-04-17 13:12:28,937 DEBUG [com.mvneco.test.SoapService] (default task-1) Init SoapService 1
> 2019-04-17 13:12:28,937 DEBUG [com.mvneco.test.SoapService] (default task-1) Start test(). payload=?
> 2019-04-17 13:12:28,969 INFO [org.apache.cxf.services.SoapService.RESP_OUT] (default task-1) RESP_OUT
> Content-Type: text/xml
> ...
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months
[JBoss JIRA] (DROOLS-5321) Failing test org.kie.hacep.LocalStorageKieSessionTest.fireUntilHaltTest on timeout
by Marek Novotny (Jira)
[ https://issues.redhat.com/browse/DROOLS-5321?page=com.atlassian.jira.plug... ]
Marek Novotny edited comment on DROOLS-5321 at 6/2/20 1:19 AM:
---------------------------------------------------------------
it failed again https://rhba-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/KIE/job/master/j... with
{noformat}
java.util.NoSuchElementException
at java.util.ArrayList$Itr.next(ArrayList.java:862)
at org.kie.hacep.LocalStorageStreamingKieSessionTest.fireUntilHaltTest(LocalStorageStreamingKieSessionTest.java:91)
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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
{noformat}
was (Author: manarh):
it failed again with
{noformat}
java.util.NoSuchElementException
at java.util.ArrayList$Itr.next(ArrayList.java:862)
at org.kie.hacep.LocalStorageStreamingKieSessionTest.fireUntilHaltTest(LocalStorageStreamingKieSessionTest.java:91)
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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
{noformat}
> Failing test org.kie.hacep.LocalStorageKieSessionTest.fireUntilHaltTest on timeout
> ----------------------------------------------------------------------------------
>
> Key: DROOLS-5321
> URL: https://issues.redhat.com/browse/DROOLS-5321
> Project: Drools
> Issue Type: Task
> Reporter: Marek Novotny
> Assignee: Massimiliano Dessi
> Priority: Critical
>
> {noformat}
> Error Message
> test timed out after 10000 milliseconds
> Stacktrace
> org.junit.runners.model.TestTimedOutException: test timed out after 10000 milliseconds
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
> at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1693)
> at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3323)
> at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1729)
> at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
> at org.kie.hacep.LocalStorageKieSessionTest.fireUntilHaltTest(LocalStorageKieSessionTest.java:141)
> 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
> at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.lang.Thread.run(Thread.java:748)
> Standard Output
> 17:37:38.475 [main] WARN o.d.c.k.b.impl.ClasspathKieProject getPomPropertiesFromFileSystem - Unable to find pom.properties in /home/jenkins/workspace/KIE/master/upstream-downstream/droolsjbpm-build-bootstrap.downstream/kiegroup_droolsjbpm-integration/drools-ha/ha-core-infra/target/test-classes
> 17:37:39.088 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process Remote command on process:Fact count of 9d177e58-24e5-4b1f-800c-0d0516856f4a from entry-point DEFAULT state:LEADER
> 17:37:39.089 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process sideEffects:[]
> 17:37:39.089 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process new ControlMessage sent to control topic:ControlMessage{offset=0, sideEffects=[], id='9d177e58-24e5-4b1f-800c-0d0516856f4a', timestamp=0}
> 17:37:39.089 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - sideEffectOnLeader:[]
> 17:37:39.091 [Thread-10] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process Remote command on process:Fire until halt of 2a5a4fd4-991d-41ac-99b0-ed7030d8533d state:LEADER
> 17:37:39.091 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process Remote command on process:Insert of RemoteFactHandleImpl{id='0597e023-e5d6-4fdb-9396-04705d3b3353', object=StockTickEvent{company='RHT', price=9.0', timestamp=1589233059090}} into entry-point DEFAULT state:LEADER
> 17:37:39.091 [Thread-10] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process sideEffects:[]
> 17:37:39.091 [Thread-10] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process new ControlMessage sent to control topic:ControlMessage{offset=0, sideEffects=[], id='2a5a4fd4-991d-41ac-99b0-ed7030d8533d', timestamp=0}
> 17:37:39.091 [Thread-10] WARN org.kie.hacep.util.PrinterUtil process - sideEffectOnLeader:[]
> 17:37:39.091 [Thread-10] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process Remote command on process:GetObjectCommand{ remoteFactHandle=RemoteFactHandleImpl{id='0597e023-e5d6-4fdb-9396-04705d3b3353', object=StockTickEvent{company='RHT', price=9.0', timestamp=1589233059090}}} state:LEADER
> 17:37:39.098 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process sideEffects:[]
> 17:37:39.098 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process new ControlMessage sent to control topic:ControlMessage{offset=0, sideEffects=[], id='1a40df01-43a3-4c25-966f-69c5f4233453', timestamp=0}
> 17:37:39.098 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - sideEffectOnLeader:[]
> 17:37:42.600 [pool-12-thread-1] WARN o.k.h.c.i.e.LeaderElectionImpl lookupNewLeaderInfo - Pod[rhba-jenkins.rhev-ci-vms.eng.rdu2.redhat.com] Unable to retrieve the current ConfigMap default-leaders from Kubernetes
> 17:37:42.939 [pool-15-thread-1] WARN o.k.h.c.i.e.LeaderElectionImpl lookupNewLeaderInfo - Pod[rhba-jenkins.rhev-ci-vms.eng.rdu2.redhat.com] Unable to retrieve the current ConfigMap default-leaders from Kubernetes
> 17:37:48.299 [pool-15-thread-1] WARN o.k.h.c.i.e.LeaderElectionImpl lookupNewLeaderInfo - Pod[rhba-jenkins.rhev-ci-vms.eng.rdu2.redhat.com] Unable to retrieve the current ConfigMap default-leaders from Kubernetes
> 17:37:48.332 [pool-12-thread-1] WARN o.k.h.c.i.e.LeaderElectionImpl lookupNewLeaderInfo - Pod[rhba-jenkins.rhev-ci-vms.eng.rdu2.redhat.com] Unable to retrieve the current ConfigMap default-leaders from Kubernetes
> Standard Error
> Exception in thread "Thread-10" java.lang.IllegalStateException
> at org.kie.hacep.consumer.DroolsConsumerHandler.processCommand(DroolsConsumerHandler.java:182)
> at org.kie.hacep.consumer.DroolsConsumerHandler.process(DroolsConsumerHandler.java:130)
> at org.kie.hacep.core.infra.consumer.LocalConsumer.poll(LocalConsumer.java:50)
> at org.kie.hacep.core.infra.consumer.ConsumerThread.run(ConsumerThread.java:27)
> at java.lang.Thread.run(Thread.java:748)
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months
[JBoss JIRA] (DROOLS-5321) Failing test org.kie.hacep.LocalStorageKieSessionTest.fireUntilHaltTest on timeout
by Marek Novotny (Jira)
[ https://issues.redhat.com/browse/DROOLS-5321?page=com.atlassian.jira.plug... ]
Marek Novotny commented on DROOLS-5321:
---------------------------------------
it failed again with
{noformat}
java.util.NoSuchElementException
at java.util.ArrayList$Itr.next(ArrayList.java:862)
at org.kie.hacep.LocalStorageStreamingKieSessionTest.fireUntilHaltTest(LocalStorageStreamingKieSessionTest.java:91)
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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
{noformat}
> Failing test org.kie.hacep.LocalStorageKieSessionTest.fireUntilHaltTest on timeout
> ----------------------------------------------------------------------------------
>
> Key: DROOLS-5321
> URL: https://issues.redhat.com/browse/DROOLS-5321
> Project: Drools
> Issue Type: Task
> Reporter: Marek Novotny
> Assignee: Massimiliano Dessi
> Priority: Critical
>
> {noformat}
> Error Message
> test timed out after 10000 milliseconds
> Stacktrace
> org.junit.runners.model.TestTimedOutException: test timed out after 10000 milliseconds
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
> at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1693)
> at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3323)
> at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1729)
> at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
> at org.kie.hacep.LocalStorageKieSessionTest.fireUntilHaltTest(LocalStorageKieSessionTest.java:141)
> 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
> at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.lang.Thread.run(Thread.java:748)
> Standard Output
> 17:37:38.475 [main] WARN o.d.c.k.b.impl.ClasspathKieProject getPomPropertiesFromFileSystem - Unable to find pom.properties in /home/jenkins/workspace/KIE/master/upstream-downstream/droolsjbpm-build-bootstrap.downstream/kiegroup_droolsjbpm-integration/drools-ha/ha-core-infra/target/test-classes
> 17:37:39.088 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process Remote command on process:Fact count of 9d177e58-24e5-4b1f-800c-0d0516856f4a from entry-point DEFAULT state:LEADER
> 17:37:39.089 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process sideEffects:[]
> 17:37:39.089 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process new ControlMessage sent to control topic:ControlMessage{offset=0, sideEffects=[], id='9d177e58-24e5-4b1f-800c-0d0516856f4a', timestamp=0}
> 17:37:39.089 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - sideEffectOnLeader:[]
> 17:37:39.091 [Thread-10] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process Remote command on process:Fire until halt of 2a5a4fd4-991d-41ac-99b0-ed7030d8533d state:LEADER
> 17:37:39.091 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process Remote command on process:Insert of RemoteFactHandleImpl{id='0597e023-e5d6-4fdb-9396-04705d3b3353', object=StockTickEvent{company='RHT', price=9.0', timestamp=1589233059090}} into entry-point DEFAULT state:LEADER
> 17:37:39.091 [Thread-10] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process sideEffects:[]
> 17:37:39.091 [Thread-10] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process new ControlMessage sent to control topic:ControlMessage{offset=0, sideEffects=[], id='2a5a4fd4-991d-41ac-99b0-ed7030d8533d', timestamp=0}
> 17:37:39.091 [Thread-10] WARN org.kie.hacep.util.PrinterUtil process - sideEffectOnLeader:[]
> 17:37:39.091 [Thread-10] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process Remote command on process:GetObjectCommand{ remoteFactHandle=RemoteFactHandleImpl{id='0597e023-e5d6-4fdb-9396-04705d3b3353', object=StockTickEvent{company='RHT', price=9.0', timestamp=1589233059090}}} state:LEADER
> 17:37:39.098 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process sideEffects:[]
> 17:37:39.098 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - DroolsConsumerHandler.process new ControlMessage sent to control topic:ControlMessage{offset=0, sideEffects=[], id='1a40df01-43a3-4c25-966f-69c5f4233453', timestamp=0}
> 17:37:39.098 [Thread-9] WARN org.kie.hacep.util.PrinterUtil process - sideEffectOnLeader:[]
> 17:37:42.600 [pool-12-thread-1] WARN o.k.h.c.i.e.LeaderElectionImpl lookupNewLeaderInfo - Pod[rhba-jenkins.rhev-ci-vms.eng.rdu2.redhat.com] Unable to retrieve the current ConfigMap default-leaders from Kubernetes
> 17:37:42.939 [pool-15-thread-1] WARN o.k.h.c.i.e.LeaderElectionImpl lookupNewLeaderInfo - Pod[rhba-jenkins.rhev-ci-vms.eng.rdu2.redhat.com] Unable to retrieve the current ConfigMap default-leaders from Kubernetes
> 17:37:48.299 [pool-15-thread-1] WARN o.k.h.c.i.e.LeaderElectionImpl lookupNewLeaderInfo - Pod[rhba-jenkins.rhev-ci-vms.eng.rdu2.redhat.com] Unable to retrieve the current ConfigMap default-leaders from Kubernetes
> 17:37:48.332 [pool-12-thread-1] WARN o.k.h.c.i.e.LeaderElectionImpl lookupNewLeaderInfo - Pod[rhba-jenkins.rhev-ci-vms.eng.rdu2.redhat.com] Unable to retrieve the current ConfigMap default-leaders from Kubernetes
> Standard Error
> Exception in thread "Thread-10" java.lang.IllegalStateException
> at org.kie.hacep.consumer.DroolsConsumerHandler.processCommand(DroolsConsumerHandler.java:182)
> at org.kie.hacep.consumer.DroolsConsumerHandler.process(DroolsConsumerHandler.java:130)
> at org.kie.hacep.core.infra.consumer.LocalConsumer.poll(LocalConsumer.java:50)
> at org.kie.hacep.core.infra.consumer.ConsumerThread.run(ConsumerThread.java:27)
> at java.lang.Thread.run(Thread.java:748)
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months
[JBoss JIRA] (WFLY-13444) Observing High CPU in EPollArrayWrapper.epollCtl default I/O thread
by Brian Stansberry (Jira)
[ https://issues.redhat.com/browse/WFLY-13444?page=com.atlassian.jira.plugi... ]
Brian Stansberry resolved WFLY-13444.
-------------------------------------
Resolution: Out of Date
[~ev.srinivas] I'm resolving this is we aren't going to be fixing anything for WF 10.1 and there have been too many changes since then to try and analyze whether they apply to your situation. If you can reproduce this with WildFly 19.1 or 20.0.0.Beta1 please feel free to re-open.
> Observing High CPU in EPollArrayWrapper.epollCtl default I/O thread
> -------------------------------------------------------------------
>
> Key: WFLY-13444
> URL: https://issues.redhat.com/browse/WFLY-13444
> Project: WildFly
> Issue Type: Bug
> Components: Remoting
> Affects Versions: 10.1.0.Final
> Reporter: Srinivas ev
> Assignee: Flavia Rainone
> Priority: Critical
> Attachments: IO thread memory.PNG, IO thread.PNG, Thread consuming high CPU.PNG, ThreadDump1set.zip, ThreadDump2set.zip, default IO thread 73.PNG, default io consuming snapshot.PNG, default io consuming.PNG, stack trace from snapshot.PNG, stack trace in thread dump.PNG, threaddump-1589514505334.tdump, top command output.PNG
>
>
> Facing high CPU by one of the default I/O thread In Wildfly 10.1.0 Final. Looks none of our application component thread is consuming.
> Can somebody check what is triggering this issue? I attached the thread stack to this Jira. This is blocking our releases. When the CPU cores are high in number, multiple default I/O threads will kick in consuming the CPU in 90~100% range continuously.
> Wildfly 10.1.0 Final
> Java -
> openjdk version "1.8.0_232"
> OpenJDK Runtime Environment (build 1.8.0_232-b09)
> OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode
> ---------------------------------------------------------------------------------------------------
> at java.lang.Throwable.fillInStackTrace(Native Method)
> at java.lang.Throwable.fillInStackTrace(Throwable.java:784)
> at java.lang.Throwable.<init>(Throwable.java:251)
> at java.lang.Exception.<init>(Exception.java:54)
> at java.io.IOException.<init>(IOException.java:47)
> at java.nio.channels.ClosedChannelException.<init>(ClosedChannelException.java:52)
> at org.xnio.ssl.JsseStreamConduit.write(JsseStreamConduit.java:1022)
> at org.xnio.conduits.ConduitStreamSinkChannel.write(ConduitStreamSinkChannel.java:150)
> at org.xnio.http.HttpUpgrade$HttpUpgradeState$StringWriteListener.handleEvent(HttpUpgrade.java:385)
> at org.xnio.http.HttpUpgrade$HttpUpgradeState$StringWriteListener.handleEvent(HttpUpgrade.java:372)
> at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
> at org.xnio.conduits.WriteReadyHandler$ChannelListenerHandler.writeReady(WriteReadyHandler.java:65)
> at org.xnio.ssl.JsseStreamConduit.run(JsseStreamConduit.java:393)
> at org.xnio.ssl.JsseStreamConduit.readReady(JsseStreamConduit.java:547)
> at org.xnio.ssl.JsseStreamConduit$2.readReady(JsseStreamConduit.java:319)
> at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
> at org.xnio.nio.WorkerThread.run(WorkerThread.java:567)
> -------------------------------------------------------------------------------------------
> at sun.nio.ch.EPollArrayWrapper.epollCtl(Native Method)
> at sun.nio.ch.EPollArrayWrapper.updateRegistrations(EPollArrayWrapper.java:299)
> at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:268)
> at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
> at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
> at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
> at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:101)
> at org.xnio.nio.WorkerThread.run(WorkerThread.java:515)
> -----------------------------------------------------------------------------------
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months
[JBoss JIRA] (WFLY-13051) provide setRemoveOnCancelPolicy on ManagedScheduledExecutorService
by nimo stephan (Jira)
[ https://issues.redhat.com/browse/WFLY-13051?page=com.atlassian.jira.plugi... ]
nimo stephan commented on WFLY-13051:
-------------------------------------
Would it be possible to provide _setRemoveOnCancelPolicy()_ by the interface _ScheduledExecutorService_ so it becomes available in _ManagedScheduledExecutorService_? Actually, I cannot change_setRemoveOnCancelPolicy()_ in *JEE Concurrency Utilities*, or?
> provide setRemoveOnCancelPolicy on ManagedScheduledExecutorService
> ------------------------------------------------------------------
>
> Key: WFLY-13051
> URL: https://issues.redhat.com/browse/WFLY-13051
> Project: WildFly
> Issue Type: Enhancement
> Components: Concurrency Utilities
> Affects Versions: 19.0.0.Beta1
> Reporter: nimo stephan
> Assignee: Eduardo Martins
> Priority: Major
>
> Using
> {code:java}
> @Resource
> private ManagedScheduledExecutorService executor;
> {code}
> provides no possiblity to setRemoveOnCancelPolicy to true.
> A casting within a method:
> {code:java}
> ((ScheduledThreadPoolExecutor) executor).setRemoveOnCancelPolicy(true);
> {code}
> throws the error:
> {code:java}
> Caused by: javax.ejb.EJBException: java.lang.ClassCastException: class org.glassfish.enterprise.concurrent.ManagedScheduledExecutorServiceAdapter cannot be cast to class java.util.concurrent.ScheduledThreadPoolExecutor (org.glassfish.enterprise.concurrent.ManagedScheduledExecutorServiceAdapter is in unnamed module of loader 'org.glassfish.javax.enterprise.concurrent' @a93b7af; java.util.concurrent.ScheduledThreadPoolExecutor is in module java.base of loader 'bootstrap')
> at org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:246)
> at org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:388)
> at org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:68)
> {code}
> Please provide option to cast or if not possible to add the property
> {code:java}
> setRemoveOnCancelPolicy()
> {code}
> within the object ManagedScheduledExecutorService. Because without it, we cannot remove a task from the queue with "future.cancel(false)".
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months
[JBoss JIRA] (WFLY-13259) Memory leak in Hibernate pending-puts cache when L2 cache is enabled
by Scott Marlow (Jira)
[ https://issues.redhat.com/browse/WFLY-13259?page=com.atlassian.jira.plugi... ]
Scott Marlow resolved WFLY-13259.
---------------------------------
Resolution: Duplicate Issue
Duplicate of [https://hibernate.atlassian.net/browse/HHH-13916]
> Memory leak in Hibernate pending-puts cache when L2 cache is enabled
> --------------------------------------------------------------------
>
> Key: WFLY-13259
> URL: https://issues.redhat.com/browse/WFLY-13259
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: 18.0.1.Final, 19.0.0.Final
> Reporter: Sorin Potra
> Assignee: Scott Marlow
> Priority: Optional
> Attachments: PathToGCRoots_strong_refs.PNG, afterOOM.hprof.zip, beforeOOM.hprof.zip, pending-puts-leak.PNG, simple-hibernate-war-client.zip, simple-hibernate-war-client.zip.2020-03-25, simple-hibernate-war.war, simple-hibernate-war.war.2020-03-25, simple-hibernate-war.zip, simple-hibernate-war.zip.2020-03-25
>
>
> Under certain conditions, described below, WildFly / Hibernate can leak memory into the pending-puts cache eventually causing an OutOfMemoryError. Attached you can find a web application and a standalone client that can be used to reproduce the problem. The web app defines two entities: a Parent and a Child. There is a bidirectional one-to-many relationship between the Parent and the Child. JPA L2 cache is enabled (Infinispan is the cache provider).
> Repeatedly executing a transaction that creates a new Child and adds it to the list of children in the Parent will cause the memory usage to increase steadily until OOM is encountered. If the execution of these transactions is stopped before reaching OOM, the memory will be reclaimed after a few minutes of inactivity.
> Attached you can find the following:
> - simple-hibernate-war.war - the web app that can be deployed in WildFly to reproduce the issue.
> - simple-hibernate-war.zip - the source code for the above web app. The servlet that is invoked by the client to create and persist a new Child is com.microfocus.sa.web.AddChildServlet
> - simple-hibernate-war-client.zip - the standalone client that can be used to invoke the AddChildServlet. After unzipping the archive, the client can be run with the following command from the client folder:
>
> java -cp bin com.microfocus.sa.client.AddChildClient
>
> If you need to run the client multiple times, you have to restart WildFly in between the runs, to start from a fresh state (the web app uses the h2 in memory databasewhich is reset at each restart).
> - pending-puts-leak.PNG - a screeshot from Memory Analyzer showing a leaked SessionImpl instance
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months
[JBoss JIRA] (WFLY-13259) Memory leak in Hibernate pending-puts cache when L2 cache is enabled
by Scott Marlow (Jira)
[ https://issues.redhat.com/browse/WFLY-13259?page=com.atlassian.jira.plugi... ]
Scott Marlow commented on WFLY-13259:
-------------------------------------
[~spotra] in theory, you could explore understanding why the cache.evict(cls,pk) is no longer working for you. Please do communicate that as a possible solution via issue [https://hibernate.atlassian.net/browse/HHH-13916], so that others could possibly use the same solution if you can help resolve that.
I'll close [WFLY-13259], as there aren't any WildFly code changes to make for this issue.
> Memory leak in Hibernate pending-puts cache when L2 cache is enabled
> --------------------------------------------------------------------
>
> Key: WFLY-13259
> URL: https://issues.redhat.com/browse/WFLY-13259
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: 18.0.1.Final, 19.0.0.Final
> Reporter: Sorin Potra
> Assignee: Scott Marlow
> Priority: Optional
> Attachments: PathToGCRoots_strong_refs.PNG, afterOOM.hprof.zip, beforeOOM.hprof.zip, pending-puts-leak.PNG, simple-hibernate-war-client.zip, simple-hibernate-war-client.zip.2020-03-25, simple-hibernate-war.war, simple-hibernate-war.war.2020-03-25, simple-hibernate-war.zip, simple-hibernate-war.zip.2020-03-25
>
>
> Under certain conditions, described below, WildFly / Hibernate can leak memory into the pending-puts cache eventually causing an OutOfMemoryError. Attached you can find a web application and a standalone client that can be used to reproduce the problem. The web app defines two entities: a Parent and a Child. There is a bidirectional one-to-many relationship between the Parent and the Child. JPA L2 cache is enabled (Infinispan is the cache provider).
> Repeatedly executing a transaction that creates a new Child and adds it to the list of children in the Parent will cause the memory usage to increase steadily until OOM is encountered. If the execution of these transactions is stopped before reaching OOM, the memory will be reclaimed after a few minutes of inactivity.
> Attached you can find the following:
> - simple-hibernate-war.war - the web app that can be deployed in WildFly to reproduce the issue.
> - simple-hibernate-war.zip - the source code for the above web app. The servlet that is invoked by the client to create and persist a new Child is com.microfocus.sa.web.AddChildServlet
> - simple-hibernate-war-client.zip - the standalone client that can be used to invoke the AddChildServlet. After unzipping the archive, the client can be run with the following command from the client folder:
>
> java -cp bin com.microfocus.sa.client.AddChildClient
>
> If you need to run the client multiple times, you have to restart WildFly in between the runs, to start from a fresh state (the web app uses the h2 in memory databasewhich is reset at each restart).
> - pending-puts-leak.PNG - a screeshot from Memory Analyzer showing a leaked SessionImpl instance
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 7 months