Skip to content
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

SettableListenableFuture may be both set and canceled successfully [SPR-15202] #19766

Closed
spring-issuemaster opened this issue Jan 29, 2017 · 1 comment

Comments

@spring-issuemaster
Copy link
Collaborator

commented Jan 29, 2017

Ivan Sopov opened SPR-15202 and commented

Please see this jcstress-based test:

https://github.com/isopov/isopov-jcstress/blob/master/src/main/java/com/sopovs/moradanen/jcstress/spring/SettableListenableFutureTest.java

There is no such bug in guava:

https://github.com/isopov/isopov-jcstress/blob/master/src/main/java/com/sopovs/moradanen/jcstress/guava/SettableFutureTest.java

Or in CompletableFuture from JUC:

https://github.com/isopov/isopov-jcstress/blob/master/src/main/java/com/sopovs/moradanen/jcstress/CompletableFutureTest.java


Affects: 4.3.6

Issue Links:

  • #20731 SettableListenableFuture set has a race on Java6 (and old versions of Java7)
  • #19781 SettableListenableFuture may be successfully set with failureCallback executed and success callback ignored
  • #19972 SettableListenableFuture setException is inconsistent with callbacks under race

Referenced from: commits 9666fcc, dec1c93

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 31, 2017

Juergen Hoeller commented

We're consistently obtaining the done/cancelled state from our inner SettableTask now, so that it is guaranteed to be in sync with a value/exception set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.