Skip to content

Conversation

danielcweber
Copy link
Collaborator

No description provided.

_parent._group.Remove(_self);
if (_parent._isStopped && _parent._group.Count == 1)
_parent._group.Remove(this);
if (_parent._isStopped && _parent._group.Count == 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same possible problem as with SelectMany: _isStopped is plain and can be reordered after _group.Count.

Copy link
Collaborator Author

@danielcweber danielcweber Jun 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any current open issues that could be explained by this going wrong sometimes? Same for SelectMany.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want me to post an issue which demonstrates this race condition?

Copy link
Collaborator Author

@danielcweber danielcweber Jun 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we're fixing it, no I wouldn't suggest that. Let's ask @onovotny about whether we should put out another preview to have something to point people to, should someone encounter the issue.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not trigger this specific reordering on my machine but I found another issue via #660.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's already on the fix branch ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main branch. This PR did not change the algorithm so the test should fail as well. You could try it in this PR as the test is standalone.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I'll merge this, then make the failing test (and subsequent fix) a (failing) new WIP-PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried with your branch. #660 still fails.

@danielcweber danielcweber merged commit c417815 into dotnet:master Jun 26, 2018
@danielcweber danielcweber deleted the SaveAllocationsInMerge branch June 26, 2018 15:26
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.

2 participants