It seems the data race in epoll_ctl could be false positive, and be caused by clang tsan instrumentation code (e.g., https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20131007/190642.html). But not for sure, of course.
This is a backport of core#20218 and core#20745
Note: I wasn't able to reproduce it today in a loop of 10 ninja check-functional, but I have seen this race in the past. I have a log file locally with a ThreadSanitizer data race involving epoll_ctl.