Skip to content

Fix SOE with select onSend/onReceive clauses on the same channel #1417

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
wants to merge 3 commits into from

Conversation

elizarov
Copy link
Contributor

@elizarov elizarov commented Aug 7, 2019

  • Instead of StackOverflowError we throw IllegalStateException and leave
    the channel in the original state.

Fixes #1411

@elizarov elizarov requested a review from qwwdfsad August 7, 2019 12:29
@elizarov elizarov force-pushed the select-send-receive branch 2 times, most recently from c47a800 to 082dbe7 Compare August 7, 2019 14:34
* Instead of StackOverflowError we throw IllegalStateException and leave
  the channel in the original state.

Fixes #1411
@elizarov elizarov force-pushed the select-send-receive branch from 082dbe7 to d994b66 Compare August 7, 2019 14:51
Get rid of private state-reading helper that does "is OpDescriptor"
instance check and rearrange the code so that we don't have to do this
check on the fast path.
@elizarov elizarov force-pushed the select-send-receive branch from 0c505f6 to 49cb2a1 Compare August 7, 2019 18:00
The fix is based on the sequential numbering of atomic select operation.
Deadlock is detected and the operation with the lower sequential
number is aborted and restarted (with a larger number).

Fixes #504
@elizarov elizarov force-pushed the select-send-receive branch from 49cb2a1 to 2130949 Compare August 7, 2019 18:44
@elizarov elizarov closed this Aug 8, 2019
@elizarov elizarov removed the request for review from qwwdfsad August 8, 2019 05:40
@elizarov
Copy link
Contributor Author

elizarov commented Aug 8, 2019

It does not current passes stress-tests on windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant