Skip to content

SettableListenableFuture set has a race on Java6 (and old versions of Java7) [SPR-16183] #20731

Closed

Description

@spring-projects-issues

Ivan Sopov opened SPR-16183 and commented

There is a bug in JDK https://bugs.openjdk.java.net/browse/JDK-7132378 that was fixed before Java8 release, backported to Java7 but not backported to Java6 (As far as I can tell)

If running on affected java version - SettableListenableFuture class is affected. Here are the steps to reproduce:
1.Code - https://github.com/isopov/isopov-jcstress/blob/java6/src/main/java/com/sopovs/moradanen/jcstress/spring/ExplicitListenableSet.java (It is slightly modified test from Openjdk, so it is problably GPL-licensed)
2. Ubuntu 14.04 with openjdk6 installed.
3. Launch test in interpreter - java -Xint -jar target/springtest.jar

Since Spring 5 requires Java8 it is definitely not affected, but maybe it is feasible to add some synchronization workaround for this JDK-issue for 4.3.x branch.


Affects: 4.3.12

Reference URL: https://bugs.openjdk.java.net/browse/JDK-7132378

Issue Links:

Activity

  1. spring-projects-issues commented on Nov 10, 2017

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    At this point I'm inclined to simply consider this as a known issue on older JDKs. Addressing this with extra synchronization on our end is bound to degrade performance for users of more recent JDKs. Also, this might have been backported into a commercial JDK 6 maintenance branch by Oracle... or Oracle support simply asked affected customers to upgrade to JDK 7 there.

    FWIW, even Spring Framework 4.x users are expected to be on recent patch releases of JDK 7 or 8 these days. The end of of commercial JDK 6 support is coming up soon, with Oracle (http://www.oracle.com/technetwork/java/eol-135779.html) as well as IBM (https://developer.ibm.com/wasdev/docs/end-java-se-6-go/). We'll have to join with an end of first-class JDK 6 support on our end soon.

  2. spring-projects-issues commented on Nov 10, 2017

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    I've created #20733 for our end of first-class JDK 6 support. Specifically, Spring Framework 4.3.x users are expected to be on recent patch releases of JDK 7, 8 or even 9 these days (since we backported JDK 9 runtime compatibility to 4.3.10+).

  3. spring-projects-issues commented on Nov 20, 2017

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    As per #20733, we do not intend to work around JDK 6 bugs at this point. We expect everybody affected to upgrade to JDK 7+ which is generally a good idea for any applications with strong use of concurrent execution, picking up runtime performance improvements along the way.

  4. added
    type: bug
    status: declined
    in: core
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: corestatus: declined

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions