Bug 978521

Summary: Unable to deploy a >60MB WAR using JBoss ON UI
Product: [JBoss] JBoss Operations Network Reporter: Amana <ajuricic>
Component: UIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED DUPLICATE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: JON 3.1.2   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-27 17:44:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
full_error.log none

Description Amana 2013-06-26 18:07:55 UTC
Created attachment 765725 [details]
full_error.log

Description of problem:

Deployment of a 60 MB WAR file using JBoss ON UI results in OOME:

2013-06-24 15:02:17,787 ERROR [org.rhq.enterprise.server.content.ContentSourceManagerBean] An error occurred while streaming package bits from the database.
java.lang.RuntimeException: Stream data cannot be copied
        at org.rhq.core.util.stream.StreamUtil.copy(StreamUtil.java:265)
        at org.rhq.core.util.stream.StreamUtil.copy(StreamUtil.java:212)
        at org.rhq.enterprise.server.content.ContentSourceManagerBean.outputPackageVersionBitsRangeHelper(ContentSourceManagerBean.java:2243)
        at org.rhq.enterprise.server.content.ContentSourceManagerBean.outputPackageVersionBitsRangeGivenResource(ContentSourceManagerBean.java:2017)
        at 
...
Caused by: java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2786)
        at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
        at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:61)
        at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
        ... 22 more

Version-Release number of selected component (if applicable):
4.4.0.JON312GA

How reproducible:
Always

Steps to Reproduce:
1.  Create a >60MB application as follows:
    a. Copy example varia/threaddump.war from JBoss EAP 5 to tmp:
       
        cp -a "${JBOSS_HOME}/docs/examples/varia/threaddump.war" /tmp

    b. Create a file with random contents to create WAR bloat to equal ~60MB:

        dd if=/dev/urandom of=/tmp/random-junk.file bs=1024K count=60

    c. Add random-junk.file to threaddump.war:

        cd /tmp
        zip threaddump.war random-junk.file

2.  Deploy it to JBoss EAP (I tested it against Eap6) using JBoss ON UI (Create Child -> DomainDeployment ... -> Finish).

Actual results:
Execution will fail with the error reported above.

Expected results:
Execution should not fail and app should be deployed/updated.

Additional info:
Customer experienced this issue when updating an application. But I can replicate by deploying for the first time. Also, I attached full_error.log.

Comment 1 Amana 2013-06-27 17:44:01 UTC
duplicate https://bugzilla.redhat.com/show_bug.cgi?id=887861

*** This bug has been marked as a duplicate of bug 887861 ***