Bug 901231 (JBPAPP6-1680) - Usage of finalize() needs extra guards on IBM JDK
Summary: Usage of finalize() needs extra guards on IBM JDK
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: JBPAPP6-1680
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Other
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: DR11
: EAP 6.4.0
Assignee: jboss-set
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBP...
Whiteboard:
Depends On:
Blocks: 923836 928223 1090357 1099440 1194960
TreeView+ depends on / blocked
 
Reported: 2012-12-03 19:13 UTC by Carlo de Wolf
Modified: 2019-08-19 12:41 UTC (History)
20 users (show)

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.
Clone Of:
Environment:
IBM JDK 7 IBM JDK 6
Last Closed:
Type: Enhancement


Attachments (Terms of Use)
Finalize methods in EAP 5.2 (6.04 KB, text/plain)
2013-02-05 07:54 UTC, Carlo de Wolf
no flags Details
Finalize methods in EAP 6.0.1 (5.00 KB, text/plain)
2013-02-05 07:54 UTC, Carlo de Wolf
no flags Details
Finalize methods in EAP 6.1.0.DR3 (4.91 KB, text/plain)
2013-02-07 07:27 UTC, Carlo de Wolf
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 661763 None None None Never
JBoss Issue Tracker JBPAPP6-1680 Major Closed Usage of finalize() needs extra guards on IBM JDK 2018-12-03 06:23:47 UTC
JBoss Issue Tracker WFLY-1470 Critical Closed Usage of finalize() needs extra guards due to a flaw in the language feature (mostly affects IBM) 2018-12-03 06:23:47 UTC

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@jboss.com> 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


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