Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339826

Summary: goalFile Keeps Growing with Open Source BIRT 2.3.2 Provided with Maximo 7.1.1.5
Product: z_Archived Reporter: David Borland <dborland129065mi>
Component: BIRTAssignee: Mingxia Wu <mwu>
Status: NEW --- QA Contact: weiming tang <weiming.tang>
Severity: critical    
Priority: P3 CC: bluesoldier, jouyang, mccafferty, mwu, weiming.tang
Version: 2.3.2   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Whiteboard:

Description David Borland CLA 2011-03-13 09:58:08 EDT
Build Identifier: BIRT 2.3.2

The last couple of weeks we have had issues with BIRT creating a file (or files) called goalFile in the /tmp directory on our Maximo application server(SLES 9.0, WAS 6.1).  The file(s) keep growing until all the space is gone and the application crashes.  Please note that the goalFile(s) are always about 3 deep in the directory structure.  Our temporary workaround has been to zero out the files (>goalFile).
What could be causing BIRT to do this?  Is there anyway to track it back to one report?  We are using the opensource version of BIRT (2.3.2) that is supported by IBM Maximo 7.1.1.5.

We did have a vendor add some reports and I'm wondering if perhaps they had a new version of BIRT (then what is supported by Maximo) and perhaps ported over reports created in a newer (open source) version of BIRT to the server.  Could that cause the goalFile(s)?  This is happening in our production environment.

Reproducible: Always

Steps to Reproduce:
1.User runs reports
2.goalFile is written to
3.
Comment 1 Jun Ouyang CLA 2011-03-14 03:52:59 EDT
David, please try to port to latest birt first.

What is the name of the temp file, "goalFile"? Could you please confirm if this happens when exporting any format document?
Comment 2 David Borland CLA 2011-03-14 17:45:56 EDT
(In reply to comment #1)
> David, please try to port to latest birt first.
> What is the name of the temp file, "goalFile"? Could you please confirm if this
> happens when exporting any format document?

We can not update to the latest BIRT since IBM would walk away from supporting us if we are not at the version bundled with Maximo.

Looking into the /tmp directory I see three directories created by BIRT 
DataEngine_151521544_1                                                  
DataEngine_383784672_5                                                  
DataEngine_649733818_2                                                  
They all have a subdirectory called something like                      
BirtDataTemp12997659559291                                              
And then all have a subdirectory called something like                  
session_12997659559301                                                  
Inside that directory is a growing file called goalFile.  This file is  
binary.  

I exported a format document and it did not cause the file to be created.  

We pulled the vendor reports from our environment and the goalFile (and subdirectories) is not being created today.
Comment 3 Jun Ouyang CLA 2011-03-14 22:21:15 EDT
Mingxia, please take a look.
Comment 4 David Borland CLA 2011-03-15 15:56:35 EDT
(In reply to comment #3)
> Mingxia, please take a look.

The goalFile was recreated today just before noon.  It appears when someone is running a BIRT report that has lots of data that the the data is written out to the goalFile.  I'm seeing data from multiple plants.
Comment 5 David Borland CLA 2011-03-16 12:17:20 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > Mingxia, please take a look.
> The goalFile was recreated today just before noon.  It appears when someone is
> running a BIRT report that has lots of data that the the data is written out to
> the goalFile.  I'm seeing data from multiple plants.

What can we do to diagnosis what is causing this?  We currently have two growing goalFile(s).  Please advise.
Comment 6 David Borland CLA 2011-03-16 18:56:11 EDT
I'm able to reproduce the issue now in my QA environment. I ran the Word Order Summary Report against the whole workorder table starting at 17:37 PM.  At 17:46 PM a DataEngine, associated subdirectories and goalFile were created.  I'm wondering if this may end up being users running a report against too many records and when BIRT doesn't have space in memory to hold the data it starts writing it out to the /tmp directory.

What is BIRT designed to do when a report is run against every record in the database?  Does it create a goalFile in the /tmp directory as a spot to hold the records that can't be held in memory?  How many records trigger the creation of the goalFile?  I'm in a 32 bit environment.  Would that trigger a goalfile quicker?
Comment 7 David Borland CLA 2011-03-22 17:30:43 EDT
Mingxia, How can we stop BIRT from writing these large files?
Comment 8 Mingxia Wu CLA 2011-03-23 02:31:03 EDT
This is a bug in birt 2.3.2. But we have fixed it in 2.6.2. 

How did you integrate BIRT with Maximo? Did you write code to call BIRT's API or directly deploy BIRT under your web application server? I need to know this, then maybe I can give you some solution to avoid generating those temp file.
Comment 9 Missing name CLA 2011-03-25 00:53:13 EDT
The Maximo integration uses both the sample viewer and the API, for converting directly to PDF. Would it be possible to provide information for both scenarios?
Comment 10 Mingxia Wu CLA 2011-03-25 01:18:33 EDT
For API layer, you can configure your memory usage in EngineConfig, such as:

EngineConfig ec = new EngineConfig( );
ec.getAppContext( ).put( DataEngine.MEMORY_BUFFER_SIZE, 0 );
This will load all rows in memory, which will not trigger the disk IO.

For the birt viewer, this setting is not configurable.
Comment 11 Missing name CLA 2011-04-07 12:49:06 EDT
Thank you for the information.  After making this change, is the report execution terminated if there is not enough memory to support the report contents?  Or will this cause an out of memory failure?

Is the answer to that question the same for the fix in 2.6.2?  Would you provide information about how the fix is implemented in that version?
Comment 12 David Borland CLA 2011-04-21 16:09:53 EDT
(In reply to comment #11)
> Thank you for the information.  After making this change, is the report
> execution terminated if there is not enough memory to support the report
> contents?  Or will this cause an out of memory failure?
> Is the answer to that question the same for the fix in 2.6.2?  Would you
> provide information about how the fix is implemented in that version?

Mingxia, Can you answer ajleonhard's question?  Seems like the fix might cause even more issues if the server doesn't have enough memory to load the data.
Comment 13 Xiaoying Gu CLA 2011-08-24 03:12:30 EDT
I tried run a big report in 3.7.0 release and it can not reproduce.
you can configure your memory usage in EngineConfig, such as:
EngineConfig ec = new EngineConfig( );
ec.getAppContext( ).put( DataEngine.MEMORY_BUFFER_SIZE, 0 );
This will load all rows in memory, which will not trigger the disk IO.

If the question still happens, you can use the 3.7.0.
Since 2.6.2 the default setting is load all rows in memory.