Skip to content

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

@spring-projects-issues

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:

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently apply

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions