Bug 1080971

Summary: JON throws "java.lang.OutOfMemoryError" if drift file sets are big...
Product: [JBoss] JBoss Operations Network Reporter: Jeeva Kandasamy <jkandasa>
Component: DriftAssignee: Libor Zoubek <lzoubek>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: high    
Version: JON 3.2.1CC: lzoubek, myarboro, theute
Target Milestone: ER01   
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-11 14:02:20 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
files: server.log, agent.log, drift-initial-list.txt.txt, drift-change-list.txt none

Description Jeeva Kandasamy 2014-03-26 12:05:45 UTC
Created attachment 878967 [details]
files: server.log, agent.log, drift-initial-list.txt.txt, drift-change-list.txt

Description of problem:
In drift management, if there is big change in monitoring directory JON server throws "java.lang.OutOfMemoryError" exception.

Version-Release number of selected component (if applicable):
JBoss Operations Network	
Version : 3.2.0.GA
Build Number : d18651a:f535707
GWT Version : 2.5.0
SmartGWT Version : 3.0p

How reproducible:
Always

Steps to Reproduce:
1. Create a drift definition for file system
2. once initial snapshot done, add huge list of files to the monitoring directory.
3. Wait till next detect time or click "DetectNow" on drift definitions page
4. Once snapshot count increases, click to check the difference between last two snapshots.
5. on server.log throws lot of exceptions and finally "java.lang.OutOfMemoryError", JON server goes not accessible state for few moments.

Actual results:
Throws "java.lang.OutOfMemoryError"

Expected results:
Should be handled in some way, should not happened "java.lang.OutOfMemoryError"

Additional info:
error log and list of files that I used for drift management is attached.

Comment 2 Libor Zoubek 2014-04-16 14:46:13 UTC
in master 

commit a70b01c34b7f9496b3115787758b951ffcbf67f3
Author: Libor Zoubek <lzoubek>
Date:   Thu Apr 10 14:04:57 2014 +0200

    [BZ 1080971] JON throws "java.lang.OutOfMemoryError" if drift file sets are
    big

    JPADriftServerBean#getDriftFileBits fixed  to return String representation
    of bits directly from reading stream. Previous implementation first
    allocated byte array from stream and then transformed it into string - this
    caused content being twice in memory.

Comment 3 Simeon Pinder 2014-07-31 15:51:33 UTC
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993

Comment 4 Mike Foley 2014-08-05 19:47:40 UTC
drift is broken in jon 3.3.  so i need to reject this.

Comment 5 Libor Zoubek 2014-08-07 11:41:35 UTC
hopefully drift is not going to be broken in DR2

Comment 6 Simeon Pinder 2014-08-19 23:50:26 UTC
Moving to ON_QA as available to test in the following brew build:

https://brewweb.devel.redhat.com//buildinfo?buildID=379025