Bug 901231 (JBPAPP6-1680)

Summary: Usage of finalize() needs extra guards on IBM JDK
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Carlo de Wolf <cdewolf>
Component: OtherAssignee: jboss-set
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.1CC: atangrin, bmaxwell, cdewolf, erich, fnasser, istudens, jason.greene, jawilson, jboss-set, jdoyle, jmartisk, joallen, kkhan, mkopecky, msvehla, myarboro, onagano, pslavice, sdouglas, sjadhav
Target Milestone: DR11   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-1680
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
JBoss Enterprise Application Platform 6 can experience intermittent failures when running on the IBM JDK 6 and 7. This is because the IBM garbage collector is much more aggressive than that of other JVMs. This can sometimes result in memory being reclaimed in situations that were unanticipated and did not manifest when testing on other JVMs. Until this issue is resolved Red Hat recommends using the OpenJDK or Oracle JDK to run JBoss Enterprise Application Platform 6 on Red Hat Enterprise Linux.
Story Points: ---
Clone Of: Environment:
IBM JDK 7 IBM JDK 6
Last Closed: Type: Enhancement
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 923836, 928223, 1090357, 1099440, 1194960    
Attachments:
Description Flags
Finalize methods in EAP 5.2
none
Finalize methods in EAP 6.0.1
none
Finalize methods in EAP 6.1.0.DR3 none

Description Carlo de Wolf 2012-12-03 19:13:51 UTC
Affects: Release Notes
project_key: JBPAPP6

IBM JDK is very eager to finalize an Object. It can even be finalized when a thread is still running a method within the instance.

Comment 1 Carlo de Wolf 2012-12-03 19:15:04 UTC
Link: Added: This issue relates to AS7-5967


Comment 2 Carlo de Wolf 2012-12-03 19:15:54 UTC
A simple test case which shows the problem can be found https://www.ibm.com/developerworks/forums/message.jspa?messageID=14915477#14915477

Comment 5 Fernando Nasser 2012-12-05 17:23:58 UTC
Needs release notes as known issue

Comment 6 Fernando Nasser 2012-12-05 17:23:58 UTC
Release Notes Docs Status: Added: Not Yet Documented
Affects: Added: Release Notes


Comment 8 Carlo de Wolf 2013-02-05 07:54:22 UTC
Created attachment 693223 [details]
Finalize methods in EAP 5.2

Comment 9 Carlo de Wolf 2013-02-05 07:54:58 UTC
Created attachment 693224 [details]
Finalize methods in EAP 6.0.1

Comment 10 Carlo de Wolf 2013-02-07 07:27:06 UTC
Created attachment 694281 [details]
Finalize methods in EAP 6.1.0.DR3

Comment 12 John Doyle 2013-02-25 21:45:47 UTC
That's a large number of occurrences, but no so large that we could not divide them out across a group and determine if they fall into the problematic pattern.  Can we target that for 5.3 and 6.1?

Comment 14 Ivo Studensky 2013-02-27 08:27:42 UTC
The relevant jiras are public so this BZ should be public as well.

Comment 18 Stuart Douglas 2013-06-06 21:37:23 UTC
Unfortunatly there is not really any way to tell if a given finalizer will cause problems. 

I think that the best we can do is have a system property (-Dbroken.ibm.garbage.collection=true), and in the finalisers check for the presense of this property and if it is present don't perform the finalization action.

Comment 19 Jimmy Wilson 2013-06-07 02:49:20 UTC
@Stuart: If this is the only way to address this, is a new property necessary?  There are standard JVM properties that we could use to identify an IBM JVM and then act accordingly?  Are there any IBM JVMs without this issue?  My understanding is that all of them have it.

Comment 20 Stuart Douglas 2013-06-07 03:25:48 UTC
It is possible that we have existing customers running the IBM JDK that are not experiencing this issue that will start to experience resource leaks if we disable these finalisers.

Comment 22 Carlo de Wolf 2013-06-07 07:15:59 UTC
Lets nail on a case by case. We know of https://issues.jboss.org/browse/WFLY-1149. Maybe that can be refactored and backported?

Comment 27 John Doyle 2013-10-22 17:36:02 UTC
We need a plan to close this BZ.

We have lists of the the occurrences of the finalize in methods in the EAP 6, can we make that list more accessible and enable people to work on the occurrences as time permits, and reduce the list that way?

Comment 33 JBoss JIRA Server 2014-11-25 15:27:18 UTC
Jason Greene <jason.greene> updated the status of jira WFLY-1470 to Resolved

Comment 34 Jason T. Greene 2014-11-25 15:29:22 UTC
We have analyzed and fixed the locations that were likely to be problematic for customers. Future issues can be reported separately if and when they occur.

Comment 35 Marek Kopecky 2014-12-11 14:03:05 UTC
Verified on EAP 6.4.0.DR11