Re:How to trigger races reliably in the Linux kernel
by isaachier on Tuesday May 05, 2020 @11:42AM
(#23081235)
What you are describing sounds like non-deterministic behavior of a thread-safe primitive, e.g. non-deterministic ordering in a synchronized queue. On the other hand, a true race condition in the queue could mean messages overwriting each other.
Re:How to trigger races reliably in the Linux kernel
by chrisseaton on Tuesday May 05, 2020 @12:57PM
(#23082121)
> What you are describing sounds like non-deterministic behavior of a thread-safe primitive, e.g. non-deterministic ordering in a synchronized queue.
That's what a race condition is - non-deterministic behavior of a thread-safe primitive.
> On the other hand, a true race condition in the queue could mean messages overwriting each other.
That's a data race, not a race condition.
For example two consumers pushing results to a single result queue is a race condition, because the order in which they arrive depends on timing and is non-deterministic. That's a pretty normal thing to have.
Many languages people think of as being safe and high level are extremely racey - Erlang is my go-to example - two processes sending messages to a third is a race. Which message do you get first? It's non-deterministic. But it doesn't have to be a problem.