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

Simplify definition of "data race" #2259

Closed
wants to merge 2 commits into from

Conversation

geoffromer
Copy link
Contributor

... by moving details into the definitions of "conflict" and "potentially concurrent".

I believe this change is editorial (has no normative impact), but I'm going to solicit feedback from SG1 since it changes the meanings of "conflict" and "potentially concurrent" in a way that could affect usages outside the standard.

…tions of "conflict" and "potentially concurrent".
source/basic.tex Outdated
memory location, and at least one of them is not atomic.

\pnum
Two actions are \defn{potentially concurrent} if they are unsequenced, and
Copy link
Contributor

Choose a reason for hiding this comment

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

[intro.execution]/8:

If A is not sequenced before B and B is not sequenced before A, then A and B are unsequenced.

"happens before" and "unsequenced" are not mutually exclusive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know. Can you be more specific about what problem you see with the proposed wording?

Copy link
Contributor

Choose a reason for hiding this comment

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

If A inter-thread happens before B, then A and B are unsequenced, and therefore by this definition they are potentially concurrent. And since you removed "neither happens before the other" from the data race definition, it's now a race.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I see your point. Fixed.

@tkoeppe tkoeppe added the sg1 Issue must be reviewed by SG1. label Sep 12, 2018
@tkoeppe
Copy link
Contributor

tkoeppe commented Sep 12, 2018

Please update this issue when SG1 has spoken.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 19, 2021

Is this issue still current, and could you perhaps try to get it onto SG1's plate?

@geoffromer
Copy link
Contributor Author

Sorry, this was discussed in 2018, but I never circled back. To summarize for those who can't access the linked thread, the overall rationale for this proposal was to restructure the definition of "data race" so that we have one term ("conflict") that captures all the necessary conditions on the kinds of operations, a separate term ("potentially concurrent") that captures all the necessary conditions on the execution context, and the two together are sufficient conditions for a data race (other than the sig_atomic_t exception, which can't be split in this way).

However, some folks on SG1 felt that the definition of "conflict" should not be changed, because the existing definition matches longstanding usage outside the standard (in research papers, etc). There was some openness to using a different term such as "potentially racing" instead, so this idea still has a path forward, but I'm no longer planning to pursue it.

@geoffromer geoffromer closed this Jun 21, 2021
@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 21, 2021

Thanks for that summary!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sg1 Issue must be reviewed by SG1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants