[JBoss JIRA] (WFLY-3837) Add tests for @RolesAllowed use if bean class has superclasses
by Chao Wang (JIRA)
Chao Wang created WFLY-3837:
-------------------------------
Summary: Add tests for @RolesAllowed use if bean class has superclasses
Key: WFLY-3837
URL: https://issues.jboss.org/browse/WFLY-3837
Project: WildFly
Issue Type: Task
Components: EJB, Test Suite
Affects Versions: 8.1.0.Final
Reporter: Chao Wang
Assignee: Chao Wang
The scenario in https://issues.jboss.org/browse/WFLY-2988 (https://bugzilla.redhat.com/show_bug.cgi?id=1072638) is rejected by engineer as it's considered current behaviour is correct.
Adding tests to cover @RolesAllowed use if the bean class has superclasses.
Example in EJB 3.1 spec 17.3.2.1:
{noformat}
Example:
@RolesAllowed(“admin”)
public class SomeClass {
public void aMethod () {...}
public void bMethod () {...}
...
}
@Stateless public class MyBean extends SomeClass implements A {
@RolesAllowed(“HR”)
public void aMethod () {...}
}
public void cMethod () {...}
...
Assuming aMethod, bMethod, cMethod are methods of business interface A, the method permis-
sions values of methods aMethod and bMethod are RolesAllowed(“HR”) and RolesAl-
lowed(“admin”) respectively
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3836) Unable to undeploy an application when it is running long time EJB calls.
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-3836?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated WFLY-3836:
------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1056013
> Unable to undeploy an application when it is running long time EJB calls.
> -------------------------------------------------------------------------
>
> Key: WFLY-3836
> URL: https://issues.jboss.org/browse/WFLY-3836
> Project: WildFly
> Issue Type: Bug
> Components: Server
> Affects Versions: 8.1.0.Final
> Reporter: Dominik Pospisil
> Assignee: Jason Greene
>
> To update an application that is running, replace command from the management console is used. Therefore, first, the application needs to undeploy.
> After org.jboss.as.web.deployment.WebDeploymentService.doStop, ServerService Threads keep in WAITING state waiting all active ejb invocation to finish:
> "ServerService Thread Pool -- 116" prio=10 tid=0x00002b5cdce97000 nid=0x6d68 in Object.wait() [0x00002b5d10d0b000]
> java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x00000005c5447f68> (a java.lang.Object)
> at java.lang.Object.wait(Object.java:503)
> at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory.shutdown(ShutDownInterceptorFactory.java:111)
> - locked <0x00000005c5447f68> (a java.lang.Object)
> at org.jboss.as.ejb3.component.stateless.StatelessSessionComponent.stop(StatelessSessionComponent.java:135)
> at org.jboss.as.ee.component.ComponentStartService$2.run(ComponentStartService.java:72)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:724)
> at org.jboss.threads.JBossThread.run(JBossThread.java:122)
> Locked ownable synchronizers:
> - <0x00000005ba6adf98> (a java.util.concurrent.ThreadPoolExecutor$Worker)
> However, the application has some managed beans that do long time calls to a EJB method using remote invocation. DC and HC "hang" before the EJB call finish.
> JBoss could have a time out to the undeploy.
> Version-Release number of selected component (if applicable):
> JBoss EAP 6.1.1
> Actual results:
> The application does not undeploy intermittently.
> DC and HC "hang" (they disconnect to each other) and it is necessary to restart all Hosts.
> Expected results:
> After some time waiting, the undeploy is forced to finish.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3836) Unable to undeploy an application when it is running long time EJB calls.
by Dominik Pospisil (JIRA)
Dominik Pospisil created WFLY-3836:
--------------------------------------
Summary: Unable to undeploy an application when it is running long time EJB calls.
Key: WFLY-3836
URL: https://issues.jboss.org/browse/WFLY-3836
Project: WildFly
Issue Type: Bug
Components: Server
Affects Versions: 8.1.0.Final
Reporter: Dominik Pospisil
Assignee: Jason Greene
To update an application that is running, replace command from the management console is used. Therefore, first, the application needs to undeploy.
After org.jboss.as.web.deployment.WebDeploymentService.doStop, ServerService Threads keep in WAITING state waiting all active ejb invocation to finish:
"ServerService Thread Pool -- 116" prio=10 tid=0x00002b5cdce97000 nid=0x6d68 in Object.wait() [0x00002b5d10d0b000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000005c5447f68> (a java.lang.Object)
at java.lang.Object.wait(Object.java:503)
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory.shutdown(ShutDownInterceptorFactory.java:111)
- locked <0x00000005c5447f68> (a java.lang.Object)
at org.jboss.as.ejb3.component.stateless.StatelessSessionComponent.stop(StatelessSessionComponent.java:135)
at org.jboss.as.ee.component.ComponentStartService$2.run(ComponentStartService.java:72)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Locked ownable synchronizers:
- <0x00000005ba6adf98> (a java.util.concurrent.ThreadPoolExecutor$Worker)
However, the application has some managed beans that do long time calls to a EJB method using remote invocation. DC and HC "hang" before the EJB call finish.
JBoss could have a time out to the undeploy.
Version-Release number of selected component (if applicable):
JBoss EAP 6.1.1
Actual results:
The application does not undeploy intermittently.
DC and HC "hang" (they disconnect to each other) and it is necessary to restart all Hosts.
Expected results:
After some time waiting, the undeploy is forced to finish.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-2988) Class-level @RolesAllowed does not affect inherited methods
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-2988?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated WFLY-2988:
------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1072638
> Class-level @RolesAllowed does not affect inherited methods
> -----------------------------------------------------------
>
> Key: WFLY-2988
> URL: https://issues.jboss.org/browse/WFLY-2988
> Project: WildFly
> Issue Type: Bug
> Components: Security
> Affects Versions: 8.0.0.Final
> Environment: Wildfly 8.0.0.Final running on OpenJDK 1.7.0_45
> Reporter: Daniel Lechner
> Assignee: Darran Lofthouse
> Fix For: 8.1.0.CR2, 8.1.0.Final
>
>
> Excerpt from the forum reference:
> Basically I have an EJB which derives from a base class. At the EJB itself there is an class-level {{@RolesAllowed}} annotation. With this annotation all methods which are implemented directly in the class can be accessed when the caller has the appropriate role. But when he tries to call a method which has been implemented in the base class, access is denied.
> Reading the EJB 3.2 Spec which says
> {quote}
> Specifying the RolesAllowed or PermitAll or DenyAll annotation on the bean class means that it applies to all applicable business methods of the class.
> {quote}
> I would suggest that this should work. Although this worked with JBoss AS 5.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3834) Memory leak in org.xnio.ByteBufferSlicePool
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/WFLY-3834?page=com.atlassian.jira.plugin.... ]
Stuart Douglas reassigned WFLY-3834:
------------------------------------
Assignee: David Lloyd
This appears to be a remoting issue.
> Memory leak in org.xnio.ByteBufferSlicePool
> -------------------------------------------
>
> Key: WFLY-3834
> URL: https://issues.jboss.org/browse/WFLY-3834
> Project: WildFly
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 8.1.0.Final
> Reporter: Sergey Lisovoy
> Assignee: David Lloyd
> Labels: memory_leak, memoryleak
>
> I have a simple thread that monitor remote wildfly process status. After some time it fail with OutOfMemory exception.
> I wrote simple exsample how to reproduce its error:
> {code:java}
> package ru.kamis.tests.xniomemoryleaks;
> import org.jboss.as.controller.client.ModelControllerClient;
> import org.jboss.as.controller.client.helpers.Operations;
> import org.jboss.dmr.ModelNode;
> public class OutOfMemoryDemo {
> public static void main(String[] args) throws Exception {
>
> for(int i=0; i<1000000; i++) {
> ModelControllerClient client = null;
> client = ModelControllerClient.Factory.create("localhost", 9990);
>
> ModelNode operation = Operations.createReadAttributeOperation(new ModelNode().setEmptyList(), "server-state");
> client.execute(operation);
>
> client.close();
>
> if(i % 1000 == 0) {
> System.out.println("Processed: " + i);
> }
> }
> }
> }
> {code}
> Program produces folowing output:
> {noformat}
> сен 09, 2014 2:33:20 PM org.xnio.Xnio <clinit>
> INFO: XNIO version 3.2.2.Final
> сен 09, 2014 2:33:20 PM org.xnio.nio.NioXnio <clinit>
> INFO: XNIO NIO Implementation Version 3.2.2.Final
> сен 09, 2014 2:33:20 PM org.jboss.remoting3.EndpointImpl <clinit>
> INFO: JBoss Remoting version 4.0.3.Final
> Processed: 0
> Processed: 1000
> Processed: 2000
> Processed: 3000
> Processed: 4000
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
> at java.lang.String.toCharArray(String.java:2746)
> at sun.net.www.ParseUtil.encodePath(ParseUtil.java:107)
> at sun.misc.URLClassPath$JarLoader.checkResource(URLClassPath.java:757)
> at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:842)
> at sun.misc.URLClassPath.getResource(URLClassPath.java:199)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:358)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:119)
> at org.jboss.as.protocol.ProtocolConnectionManager$EstablishingConnection.connect(ProtocolConnectionManager.java:256)
> at org.jboss.as.protocol.ProtocolConnectionManager.connect(ProtocolConnectionManager.java:70)
> at org.jboss.as.protocol.mgmt.FutureManagementChannel$Establishing.getChannel(FutureManagementChannel.java:204)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:148)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:67)
> at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:117)
> at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:92)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:236)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:141)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71)
> at ru.kamis.tests.xniomemoryleaks.OutOfMemoryDemo.main(OutOfMemoryDemo.java:15)
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> сен 09, 2014 2:35:20 PM org.jboss.as.controller.client.impl.RemotingModelControllerClient finalize
> WARN: JBAS010600: Closing leaked controller client
> JBAS010649: Allocation stack trace:
> at java.lang.Thread.getStackTrace(Thread.java:1589)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient.<init>(RemotingModelControllerClient.java:76)
> at org.jboss.as.controller.client.ModelControllerClient$Factory.create(ModelControllerClient.java:353)
> at org.jboss.as.controller.client.ModelControllerClient$Factory.create(ModelControllerClient.java:200)
> at ru.kamis.tests.xniomemoryleaks.OutOfMemoryDemo.main(OutOfMemoryDemo.java:12)
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> {noformat}
> Used libraries:
> {code:xml}
> <dependency>
> <groupId>org.wildfly</groupId>
> <artifactId>wildfly-controller-client</artifactId>
> <version>8.1.0.Final</version>
> </dependency>
> {code}
> The same bug is reproduced on other xnio versions: 3.2.3.Final, 3.3.0.Beta2
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3834) Memory leak in org.xnio.ByteBufferSlicePool
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/WFLY-3834?page=com.atlassian.jira.plugin.... ]
Stuart Douglas edited comment on WFLY-3834 at 9/10/14 2:58 AM:
---------------------------------------------------------------
I added some tracing into XNIO, and this is the stack trace that results in the leak:
{code}
6:54:30,281 INFO [stdout] (Finalizer) BUFFER LEAK
16:54:30,533 ERROR [stderr] (Finalizer) java.lang.Throwable
16:54:30,533 ERROR [stderr] (Finalizer) at org.xnio.ByteBufferSlicePool$PooledByteBuffer.<init>(ByteBufferSlicePool.java:184)
16:54:30,533 ERROR [stderr] (Finalizer) at org.xnio.ByteBufferSlicePool.allocate(ByteBufferSlicePool.java:135)
16:54:30,533 ERROR [stderr] (Finalizer) at org.jboss.remoting3.remote.RemoteConnection.allocate(RemoteConnection.java:75)
16:54:30,533 ERROR [stderr] (Finalizer) at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:70)
16:54:30,533 ERROR [stderr] (Finalizer) at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:45)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:199)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:113)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.ChannelListeners$DelegatingChannelListener.handleEvent(ChannelListeners.java:1092)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:87)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.nio.WorkerThread.run(WorkerThread.java:539)
{code}
was (Author: swd847):
I added some tracing into XNIO, and this is the stack trace that results in the leak:
6:54:30,281 INFO [stdout] (Finalizer) BUFFER LEAK
16:54:30,533 ERROR [stderr] (Finalizer) java.lang.Throwable
16:54:30,533 ERROR [stderr] (Finalizer) at org.xnio.ByteBufferSlicePool$PooledByteBuffer.<init>(ByteBufferSlicePool.java:184)
16:54:30,533 ERROR [stderr] (Finalizer) at org.xnio.ByteBufferSlicePool.allocate(ByteBufferSlicePool.java:135)
16:54:30,533 ERROR [stderr] (Finalizer) at org.jboss.remoting3.remote.RemoteConnection.allocate(RemoteConnection.java:75)
16:54:30,533 ERROR [stderr] (Finalizer) at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:70)
16:54:30,533 ERROR [stderr] (Finalizer) at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:45)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:199)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:113)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.ChannelListeners$DelegatingChannelListener.handleEvent(ChannelListeners.java:1092)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:87)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.nio.WorkerThread.run(WorkerThread.java:539)
> Memory leak in org.xnio.ByteBufferSlicePool
> -------------------------------------------
>
> Key: WFLY-3834
> URL: https://issues.jboss.org/browse/WFLY-3834
> Project: WildFly
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 8.1.0.Final
> Reporter: Sergey Lisovoy
> Labels: memory_leak, memoryleak
>
> I have a simple thread that monitor remote wildfly process status. After some time it fail with OutOfMemory exception.
> I wrote simple exsample how to reproduce its error:
> {code:java}
> package ru.kamis.tests.xniomemoryleaks;
> import org.jboss.as.controller.client.ModelControllerClient;
> import org.jboss.as.controller.client.helpers.Operations;
> import org.jboss.dmr.ModelNode;
> public class OutOfMemoryDemo {
> public static void main(String[] args) throws Exception {
>
> for(int i=0; i<1000000; i++) {
> ModelControllerClient client = null;
> client = ModelControllerClient.Factory.create("localhost", 9990);
>
> ModelNode operation = Operations.createReadAttributeOperation(new ModelNode().setEmptyList(), "server-state");
> client.execute(operation);
>
> client.close();
>
> if(i % 1000 == 0) {
> System.out.println("Processed: " + i);
> }
> }
> }
> }
> {code}
> Program produces folowing output:
> {noformat}
> сен 09, 2014 2:33:20 PM org.xnio.Xnio <clinit>
> INFO: XNIO version 3.2.2.Final
> сен 09, 2014 2:33:20 PM org.xnio.nio.NioXnio <clinit>
> INFO: XNIO NIO Implementation Version 3.2.2.Final
> сен 09, 2014 2:33:20 PM org.jboss.remoting3.EndpointImpl <clinit>
> INFO: JBoss Remoting version 4.0.3.Final
> Processed: 0
> Processed: 1000
> Processed: 2000
> Processed: 3000
> Processed: 4000
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
> at java.lang.String.toCharArray(String.java:2746)
> at sun.net.www.ParseUtil.encodePath(ParseUtil.java:107)
> at sun.misc.URLClassPath$JarLoader.checkResource(URLClassPath.java:757)
> at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:842)
> at sun.misc.URLClassPath.getResource(URLClassPath.java:199)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:358)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:119)
> at org.jboss.as.protocol.ProtocolConnectionManager$EstablishingConnection.connect(ProtocolConnectionManager.java:256)
> at org.jboss.as.protocol.ProtocolConnectionManager.connect(ProtocolConnectionManager.java:70)
> at org.jboss.as.protocol.mgmt.FutureManagementChannel$Establishing.getChannel(FutureManagementChannel.java:204)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:148)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:67)
> at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:117)
> at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:92)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:236)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:141)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71)
> at ru.kamis.tests.xniomemoryleaks.OutOfMemoryDemo.main(OutOfMemoryDemo.java:15)
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> сен 09, 2014 2:35:20 PM org.jboss.as.controller.client.impl.RemotingModelControllerClient finalize
> WARN: JBAS010600: Closing leaked controller client
> JBAS010649: Allocation stack trace:
> at java.lang.Thread.getStackTrace(Thread.java:1589)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient.<init>(RemotingModelControllerClient.java:76)
> at org.jboss.as.controller.client.ModelControllerClient$Factory.create(ModelControllerClient.java:353)
> at org.jboss.as.controller.client.ModelControllerClient$Factory.create(ModelControllerClient.java:200)
> at ru.kamis.tests.xniomemoryleaks.OutOfMemoryDemo.main(OutOfMemoryDemo.java:12)
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> {noformat}
> Used libraries:
> {code:xml}
> <dependency>
> <groupId>org.wildfly</groupId>
> <artifactId>wildfly-controller-client</artifactId>
> <version>8.1.0.Final</version>
> </dependency>
> {code}
> The same bug is reproduced on other xnio versions: 3.2.3.Final, 3.3.0.Beta2
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years
[JBoss JIRA] (WFLY-3834) Memory leak in org.xnio.ByteBufferSlicePool
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/WFLY-3834?page=com.atlassian.jira.plugin.... ]
Stuart Douglas commented on WFLY-3834:
--------------------------------------
I added some tracing into XNIO, and this is the stack trace that results in the leak:
6:54:30,281 INFO [stdout] (Finalizer) BUFFER LEAK
16:54:30,533 ERROR [stderr] (Finalizer) java.lang.Throwable
16:54:30,533 ERROR [stderr] (Finalizer) at org.xnio.ByteBufferSlicePool$PooledByteBuffer.<init>(ByteBufferSlicePool.java:184)
16:54:30,533 ERROR [stderr] (Finalizer) at org.xnio.ByteBufferSlicePool.allocate(ByteBufferSlicePool.java:135)
16:54:30,533 ERROR [stderr] (Finalizer) at org.jboss.remoting3.remote.RemoteConnection.allocate(RemoteConnection.java:75)
16:54:30,533 ERROR [stderr] (Finalizer) at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:70)
16:54:30,533 ERROR [stderr] (Finalizer) at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:45)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:199)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:113)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.ChannelListeners$DelegatingChannelListener.handleEvent(ChannelListeners.java:1092)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:87)
16:54:30,534 ERROR [stderr] (Finalizer) at org.xnio.nio.WorkerThread.run(WorkerThread.java:539)
> Memory leak in org.xnio.ByteBufferSlicePool
> -------------------------------------------
>
> Key: WFLY-3834
> URL: https://issues.jboss.org/browse/WFLY-3834
> Project: WildFly
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 8.1.0.Final
> Reporter: Sergey Lisovoy
> Labels: memory_leak, memoryleak
>
> I have a simple thread that monitor remote wildfly process status. After some time it fail with OutOfMemory exception.
> I wrote simple exsample how to reproduce its error:
> {code:java}
> package ru.kamis.tests.xniomemoryleaks;
> import org.jboss.as.controller.client.ModelControllerClient;
> import org.jboss.as.controller.client.helpers.Operations;
> import org.jboss.dmr.ModelNode;
> public class OutOfMemoryDemo {
> public static void main(String[] args) throws Exception {
>
> for(int i=0; i<1000000; i++) {
> ModelControllerClient client = null;
> client = ModelControllerClient.Factory.create("localhost", 9990);
>
> ModelNode operation = Operations.createReadAttributeOperation(new ModelNode().setEmptyList(), "server-state");
> client.execute(operation);
>
> client.close();
>
> if(i % 1000 == 0) {
> System.out.println("Processed: " + i);
> }
> }
> }
> }
> {code}
> Program produces folowing output:
> {noformat}
> сен 09, 2014 2:33:20 PM org.xnio.Xnio <clinit>
> INFO: XNIO version 3.2.2.Final
> сен 09, 2014 2:33:20 PM org.xnio.nio.NioXnio <clinit>
> INFO: XNIO NIO Implementation Version 3.2.2.Final
> сен 09, 2014 2:33:20 PM org.jboss.remoting3.EndpointImpl <clinit>
> INFO: JBoss Remoting version 4.0.3.Final
> Processed: 0
> Processed: 1000
> Processed: 2000
> Processed: 3000
> Processed: 4000
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
> at java.lang.String.toCharArray(String.java:2746)
> at sun.net.www.ParseUtil.encodePath(ParseUtil.java:107)
> at sun.misc.URLClassPath$JarLoader.checkResource(URLClassPath.java:757)
> at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:842)
> at sun.misc.URLClassPath.getResource(URLClassPath.java:199)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:358)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:119)
> at org.jboss.as.protocol.ProtocolConnectionManager$EstablishingConnection.connect(ProtocolConnectionManager.java:256)
> at org.jboss.as.protocol.ProtocolConnectionManager.connect(ProtocolConnectionManager.java:70)
> at org.jboss.as.protocol.mgmt.FutureManagementChannel$Establishing.getChannel(FutureManagementChannel.java:204)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:148)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:67)
> at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:117)
> at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:92)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:236)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:141)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71)
> at ru.kamis.tests.xniomemoryleaks.OutOfMemoryDemo.main(OutOfMemoryDemo.java:15)
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> сен 09, 2014 2:35:20 PM org.jboss.as.controller.client.impl.RemotingModelControllerClient finalize
> WARN: JBAS010600: Closing leaked controller client
> JBAS010649: Allocation stack trace:
> at java.lang.Thread.getStackTrace(Thread.java:1589)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient.<init>(RemotingModelControllerClient.java:76)
> at org.jboss.as.controller.client.ModelControllerClient$Factory.create(ModelControllerClient.java:353)
> at org.jboss.as.controller.client.ModelControllerClient$Factory.create(ModelControllerClient.java:200)
> at ru.kamis.tests.xniomemoryleaks.OutOfMemoryDemo.main(OutOfMemoryDemo.java:12)
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space
> {noformat}
> Used libraries:
> {code:xml}
> <dependency>
> <groupId>org.wildfly</groupId>
> <artifactId>wildfly-controller-client</artifactId>
> <version>8.1.0.Final</version>
> </dependency>
> {code}
> The same bug is reproduced on other xnio versions: 3.2.3.Final, 3.3.0.Beta2
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years