openjdk team mailing list archive
-
openjdk team
-
Mailing list archive
-
Message #10021
[Bug 1295987] Re: openjdk6 regression causes finalizers never to be called
This bug was fixed in the package openjdk-6 -
6b30-1.13.1-1ubuntu2~0.12.04.3
---------------
openjdk-6 (6b30-1.13.1-1ubuntu2~0.12.04.3) precise-security; urgency=medium
* Update to properly zero version info (LP: #1295987)
- 6989972.diff: JDK fails to zero jdk_version_info. Apply in
DISTRIBUTION_PATCHES
- debian/openjdk/8035893.diff: JVM_GetVersionInfo fails to zero structure.
Apply in DISTRIBUTION_PATCHES
-- Jamie Strandboge <jamie@xxxxxxxxxx> Wed, 26 Mar 2014 08:43:13 -0500
--
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in Ubuntu.
https://bugs.launchpad.net/bugs/1295987
Title:
openjdk6 regression causes finalizers never to be called
Status in “openjdk-6” package in Ubuntu:
Fix Released
Status in “openjdk-6” source package in Lucid:
Fix Released
Status in “openjdk-6” source package in Precise:
Fix Released
Status in “openjdk-6” source package in Quantal:
Fix Released
Status in “openjdk-6” source package in Saucy:
Fix Released
Status in “openjdk-6” source package in Trusty:
Fix Released
Bug description:
Upgrading openjdk6 from 6b27-1.12.6-1ubuntu0.12.04.4 to
6b30-1.13.1-1ubuntu2~0.12.04.1 (Precise update in Jan / Feb 2014)
causes finalizers not to run reliably. Whilst it is good practice to
avoid use of finalizers, JDBC uses them to close connections, sockets
use them to close sockets etc., and after this upgrade both of them
leak apparently randomly under moderate load.
This is difficult to replicate but we believe it is due to:
https://java.net/jira/browse/OPENJDK6-29 which was introduced in b28.
The critical sentences here are: "This can cause mayhem in the JVM
because the flag fields at the end of the struct end up taking values
determined by the contents of the stack frame where info is allocated.
In particular, it can cause the post-jdk6-b28 GC to enqueue discovered
References using the wrong link field which means that no reference
processing (including finalization) occurs."
This is fixed in b31, and the fix is a one line obviously correct change:
http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/04e4c3ec6516
which correctly memset's a structure to zero, as opposed to only
setting the first 8 bytes (64 bit) or 4 bytes (32 bit) to zero.
As this is a clear regression caused by an update with a substantial
impact (unresolvable memory leaks of objects with finalizers, other
resource leaks including FD leaks), I think this is an SRU candidate
for Precise (which is where we are seeing it).
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/1295987/+subscriptions
References