Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Nov 10, 2017 · 3 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: declined A suggestion or change that we don't feel we should currently apply

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Nov 10, 2017

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:

@spring-projects-issues
Copy link
Collaborator Author

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.

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Nov 10, 2017

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+).

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Nov 20, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

2 participants