[jdk17u-dev] RFR: 8298061: vmTestbase/nsk/sysdict/vm/stress/btree/btree012/btree012.java failed with "fatal error: refcount has gone to zero"

Coleen Phillimore coleenp at openjdk.org
Wed Mar 19 19:47:24 UTC 2025


On Wed, 5 Mar 2025 19:05:34 GMT, Dmitry Chuyko <dchuyko at openjdk.org> wrote:

> Please review the backport of the fix for JDK-8298061 to jdk17u. The bug leads to rare crashes. For instance, they cause the Spring Boot build to fail under certain circumstances. In particular on AMD EPYC 7R13 and Ubuntu 24.04.1.
> 
> Original patch doesn't apply cleanly. First, technically clear_supername() was only added by JDK-8292286 in JDK 20 and Symbol::maybe_increment/decrement_refcount were added by JDK-8291457 also in JDK 20, all before the original patch. 
> Second, PlaceholderTable::find_and_remove() actually needs what clear_supername() call does in 20 to make the fix complete (and to match find_and_add()). That second part was later reworked in JDK 21 (JDK-8302108) and after.
> 
> PlaceholderEntry::set_supername() was modified to perform same work as before under the same condition as in the original patch.
> 
> The early version of the original change by @coleenp had an implementation of the second part which is suitable for 17u so it was made a part of this backport. See https://github.com/openjdk/jdk/pull/11726
> 
> Without that second part part we did observe assert failures.
> 
> Testing: jtreg tier 1-3 on linux-amd64, dedicated stress test of the Spring Boot build.

src/hotspot/share/classfile/placeholders.hpp line 145:

> 143:   Symbol*            supername()           const { return _supername; }
> 144:   void               set_supername(Symbol* supername) {
> 145:     if (supername != _supername) {

Why isn't there an if (_supername == NULL) _supername->decrement_refcount(); before assigning the new supername?

-------------

PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/3328#discussion_r2004167120


More information about the jdk-updates-dev mailing list