Bug 1417964 - [GSS](6.4.z) RESTEASY-992 - Client gives out of memory error, if consuming a huge multipart form via POST
Summary: [GSS](6.4.z) RESTEASY-992 - Client gives out of memory error, if consuming a ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: RESTEasy
Version: 6.4.11
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR3
: EAP 6.4.15
Assignee: Radovan Netuka
QA Contact: Peter Mackay
URL:
Whiteboard:
Depends On:
Blocks: eap6415-payload 1425120
TreeView+ depends on / blocked
 
Reported: 2017-01-31 14:07 UTC by Carsten Lichy-Bittendorf
Modified: 2020-08-13 08:50 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-05-19 08:08:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Reproducer for RESTEASY-992 bug - it only happens on 2.3.x client - it is not possible to reproduce it with a 3.x client or using a browser (not a server side problem) - instructions on README.md (6.10 KB, application/zip)
2017-02-02 02:01 UTC, William Antônio
no flags Details
Reproducer (old and new approach tests) (7.54 KB, application/zip)
2017-05-03 06:31 UTC, Petr Jurak
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEAP-10486 0 Major Verified (7.1.0) Old RESTEasy client gives out of memory error, if consuming a huge data via POST 2017-10-12 21:11:10 UTC
Red Hat Issue Tracker JBEAP-10487 0 Major Verified (7.0.z) Old RESTEasy client gives out of memory error, if consuming a huge data via POST 2017-10-12 21:11:10 UTC
Red Hat Issue Tracker RESTEASY-992 0 Minor Closed Client gives out of memory error, if consuming a huge multipart form via POST 2017-10-12 21:11:10 UTC
Red Hat Issue Tracker WFLY-8663 0 Major Closed Old RESTEasy client gives out of memory error, if consuming a huge data via POST 2017-10-12 21:11:10 UTC
Red Hat Knowledge Base (Solution) 3021331 0 None None None 2017-05-02 16:25:44 UTC

Description Carsten Lichy-Bittendorf 2017-01-31 14:07:16 UTC
Customer faces the issue solved by https://issues.jboss.org/browse/RESTEASY-992, so they request a backport into EAP6.
As EAP6 is on resteasy 2.3 while it was resolved for 3.0, but sure if this is feasible.

Comment 3 William Antônio 2017-02-02 02:01:36 UTC
Created attachment 1246961 [details]
Reproducer for RESTEASY-992 bug - it only happens on 2.3.x client - it is not possible to reproduce it with a 3.x client or using a browser (not a server side problem) - instructions on README.md

Reproducer for RESTEASY-992 bug - it only happens on 2.3.x client - it is not possible to reproduce it with a 3.x client or using a browser (not a server side problem) - instructions on README.md.

Notice that on RESTEASY-992, Bill stated the following:

"""
Adam, if you are using the deprecated client API, then there's nothing you can do. If you switch to 3.0.6 and use the JAX-RS 2.0 client api, then SelfExpanding isn't used unless you set the buffer size to -1.
"""

Hence why customer would like to have it on 2.3.x/EAP 6.x. A woraround is package resteasy 3.x and make the classloading configuration on jboss-deployment-structure.xml.

Thanks!

Comment 4 William Antônio 2017-02-02 02:05:43 UTC
Just to add one more note, if you reproduce the problem, you will see the same (almost) stack trace from RESTEASY-992:

java.lang.OutOfMemoryError: Java heap space
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:233)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
	at org.jboss.resteasy.client.core.SelfExpandingBufferredInputStream.read(SelfExpandingBufferredInputStream.java:57)
	at java.io.FilterInputStream.read(FilterInputStream.java:107)
	at org.jboss.resteasy.client.core.SelfExpandingBufferredInputStream.read(SelfExpandingBufferredInputStream.java:67)
	at com.redhat.gss.reproducer.LargeObjectClientTest.test(LargeObjectClientTest.java:34)
	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:497)
	at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
	at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
	at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
	at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
	at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
	at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
	at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
	at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
	at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
	at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
	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:497)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)

Comment 10 Petr Jurak 2017-05-03 06:31:09 UTC
Created attachment 1275824 [details]
Reproducer (old and new approach tests)

Comment 11 Peter Mackay 2017-05-04 11:39:41 UTC
Verified with EAP 6.4.15.CP.CR3

Comment 12 Petr Penicka 2017-05-19 08:08:48 UTC
Released on May 18 as part of EAP 6.4.15.


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