Bug 1327944 - [GSS](6.4.z) Calling remote asynchronous void method causes OutOfMemoryError in direct buffer memory
Summary: [GSS](6.4.z) Calling remote asynchronous void method causes OutOfMemoryError ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB, Remoting
Version: 6.4.6
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: CR1
: EAP 6.4.10
Assignee: Enrique Gonzalez Martinez
QA Contact: Jan Martiska
URL:
Whiteboard:
Depends On:
Blocks: 1329530 eap6410-payload 1344514
TreeView+ depends on / blocked
 
Reported: 2016-04-18 06:07 UTC by Osamu Nagano
Modified: 2019-10-10 11:54 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
: 1329530 (view as bug list)
Environment:
Last Closed: 2017-01-17 13:02:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
remote-async-void-slsb-dbuffer-leak.zip (7.21 KB, application/zip)
2016-04-18 06:07 UTC, Osamu Nagano
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker EJBCLIENT-156 0 Major Resolved Calling remote asynchronous void method causes OutOfMemoryError in direct buffer memory 2018-06-14 05:16:59 UTC
Red Hat Issue Tracker JBEAP-4284 0 Major Closed Calling remote asynchronous void method causes OutOfMemoryError in direct buffer memory 2018-06-14 05:16:59 UTC

Description Osamu Nagano 2016-04-18 06:07:07 UTC
Created attachment 1148107 [details]
remote-async-void-slsb-dbuffer-leak.zip

Description of problem:
JBoss Remoting enabled direct buffer from 3.3.7.Final, which is included in EAP 6.4.6 (by BZ-1288664/REM3-208).  This causes an OOME in direct buffer when a remote client calls an asynchronous method which has return type void.

~~~
Apr 18, 2016 2:22:26 PM org.xnio.ChannelListeners invokeChannelListener
ERROR: A channel event listener threw an exception
java.lang.OutOfMemoryError: Direct buffer memory
        at java.nio.Bits.reserveMemory(Bits.java:693)
        at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)
        at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
        at org.xnio.BufferAllocator$2.allocate(BufferAllocator.java:60)
        at org.xnio.BufferAllocator$2.allocate(BufferAllocator.java:58)
        at org.xnio.ByteBufferSlicePool.allocate(ByteBufferSlicePool.java:86)
        at org.jboss.remoting3.remote.RemoteConnection.allocate(RemoteConnection.java:75)
        at org.jboss.remoting3.remote.RemoteConnectionChannel.allocate(RemoteConnectionChannel.java:581)
        at org.jboss.remoting3.remote.InboundMessage.allocate(InboundMessage.java:190)
        at org.jboss.remoting3.remote.InboundMessage.doSendCloseMessage(InboundMessage.java:104)
        at org.jboss.remoting3.remote.InboundMessage.handleIncoming(InboundMessage.java:243)
        at org.jboss.remoting3.remote.RemoteConnectionChannel.handleMessageData(RemoteConnectionChannel.java:474)
        at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:291)
        at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:46)
        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
        at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)
        at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)
        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
        at org.xnio.nio.NioHandle.run(NioHandle.java:90)
        at org.xnio.nio.WorkerThread.run(WorkerThread.java:198)
~~~


Version-Release number of selected component (if applicable):
EJB client (jboss-client.jar) of EAP 6.4.6


How reproducible:
Always.


Steps to Reproduce:
1. Unzip the reproducer and build an EJB and its client.
~~~
cd remote-async-void-slsb-dbuffer-leak
vi src/test/java/TestMainDBufferLeak.java #The default is against localhost without authentication.
mvn package
~~~
2. Deploy target/remote-async-void-slsb-dbuffer-leak-1.0.0.jar to a standalone server
3. Run the test client
~~~
java -cp $EAP646_HOME/bin/client/jboss-client.jar:target/test-classes:target/remote-async-void-slsb-dbuffer-leak-1.0.0.jar \
     -Xms100m -Xmx100m TestMainDBufferLeak
~~~


Actual results:
"java.lang.OutOfMemoryError: Direct buffer memory" as in the description.


Expected results:
No memory leaks.


Additional info:
Add command line option "-Djboss.remoting.pooled-buffers=false" for the client as a workaround.

Comment 3 Osamu Nagano 2016-04-20 03:31:11 UTC
Created attachment 1148835 [details]
jboss-ejb-client-1.0.32.Final-bz-1327944.jar

Comment 4 Osamu Nagano 2016-04-20 08:55:18 UTC
This is reproducible in WildFly 10.0.0.Final as well.  I created EJBCLIENT-156 and sent a pull request for an engineering review.

Comment 9 JBoss JIRA Server 2016-05-17 10:44:59 UTC
Enrique González Martínez <elguardian> updated the status of jira JBEAP-4284 to Resolved

Comment 10 Jiří Bílek 2016-08-09 12:47:21 UTC
Verified with EAP 6.4.10.CP.CR1

Comment 11 JBoss JIRA Server 2016-08-23 11:38:44 UTC
Jiri Pallich <jpallich> updated the status of jira JBEAP-4284 to Closed

Comment 12 Petr Penicka 2017-01-17 13:02:45 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.

Comment 13 Petr Penicka 2017-01-17 13:03:08 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.


Note You need to log in before you can comment on or make changes to this bug.