I adopt definition of race condition as follows from everything2.com:
A race condition is a situation where running multiple concurrent processes (for these purposes, a thread is also modeled as a process, as are processes running on separate machines) will give differing results, depending on the (unspecified, and usually unspecifiable) details of the ordering of operations.
Now consider following sample from Chapter 3: Race Conditions and Mutual Exclusion:
The most dangerous race conditions, however, involve access to shared data structures. If two threads are updating the same data structure at the same time, the changes may be made partially by one thread and partially by the other. The contents of the data structure can then become garbled, which will confuse threads that access it later, thereby causing them to crash.
Obviously, this sample includes a harmful race condition.
There is a solution to avoid this harmful race condition:
The trick is to force the threads to access the data structure one at a time, so called mutual exclusion, so that each thread can complete its update and leave the structure in a consistent state for the next thread.
Now according to above definition, there is still a race condition in above solution:
If thread A makes change first, then final content of shared data structure is filled by thread B; if thread B makes change first, then final content of shared data structure is filled by thread A.
But now it is a harmless race condition.
From this sample, I get following conclusion:
A race condition is harmful if and only if it is avoidable.
I'm not sure whether both direction or just one direction of above conclusion are correct or incorrect. So is there any sample to disprove this conclusion?