RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1213280 - ForkJoinPool missing submission of Runnable
Summary: ForkJoinPool missing submission of Runnable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: java-1.8.0-openjdk
Version: 7.1
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Andrew John Hughes
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-20 08:54 UTC by Stanislav Baiduzhyi
Modified: 2016-05-05 04:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 03:51:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Icedtea Bugzilla 2431 0 None None None Never
Red Hat Bugzilla 1268912 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHBA-2015:2181 0 normal SHIPPED_LIVE java-1.8.0-openjdk enhancement update 2015-11-19 07:51:57 UTC

Internal Links: 1268912

Description Stanislav Baiduzhyi 2015-04-20 08:54:23 UTC
Refactoring of ForkJoin, introduced in 8u40, breaks the runnable submission to the thread pool.

Following code finishes immediately on 8u31 and earlier, but never stops on 8u40 and 8u45.

Reproducer code:

import java.util.concurrent.*;
import java.util.concurrent.atomic.*;

public class ForkJoinPoolThrottling {
    public static void main(String[] args) throws Throwable {
        final ForkJoinPool e = new ForkJoinPool(1);
        final AtomicBoolean b = new AtomicBoolean();
        final Runnable setFalse = new Runnable() { public void run() {
            b.set(false);
        }};
        for (int i = 0; i < 100000; i++) {
            b.set(true);
            e.execute(setFalse);
            do {} while (b.get()); // spins forever here
        }
    }
}

Comment 2 Andrew John Hughes 2015-04-20 16:04:58 UTC
Is this:

changeset:   10054:2188a4078a0a
user:        dl
date:        Fri Sep 05 10:54:28 2014 +0200
summary:     8056248: Improve ForkJoin thread throttling

It sounds like something that needs to be raised upstream.

Comment 3 Chris Phillips @ TO 2015-05-25 10:58:51 UTC
http://hg.openjdk.java.net/jdk9/dev/jdk/rev/97a1facbcaaa
I think (at least for jdk8).

Chris

Comment 4 Andrew John Hughes 2015-05-26 02:12:42 UTC
In 8u: http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/b51c6914f297

Comment 5 Andrew John Hughes 2015-06-12 16:00:26 UTC
"This resolution should not be used for Red Hat Enterprise Linux bugs."

https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_status

Comment 6 Andrew John Hughes 2015-07-07 13:10:35 UTC
Without patch:

$ /usr/lib/jvm/java-1.8.0-openjdk/bin/java -version
openjdk version "1.8.0_45"
OpenJDK Runtime Environment (build 1.8.0_45-b13)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)

$ /usr/lib/jvm/java-1.8.0-openjdk/bin/java RH1213280
(stalls)

With patch:

$ /usr/lib/jvm/java-1.8.0-openjdk/bin/java -version
openjdk version "1.8.0_51"
OpenJDK Runtime Environment (build 1.8.0_51-b16)
OpenJDK 64-Bit Server VM (build 25.51-b03, mixed mode)

$ /usr/lib/jvm/java-1.8.0-openjdk/bin/java RH1213280
$ 
(completes)

Comment 11 errata-xmlrpc 2015-11-19 03:51:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2181.html


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