Race fixes
add cmake -DSANITIZE_THREAD=1
Merge remote-tracking branch 'upstream/master' into next

Conflicts:
	src/CMakeLists.txt