This is an archive of the discontinued LLVM Phabricator instance.

tsan: fix another false positive related to open/close
ClosedPublic

Authored by dvyukov on Mar 10 2022, 2:20 AM.

Details

Summary

The false positive fixed by commit f831d6fc80
("tsan: fix false positive during fd close") still happens episodically
on the added more stressful test which does just open/close.

I don't have a coherent explanation as to what exactly happens
but the fix fixes the false positive on this test as well.
The issue may be related to lost writes during asynchronous MADV_DONTNEED.
I've debugged similar unexplainable false positive related to freed and
reused memory and at the time the only possible explanation I found is that
an asynchronous MADV_DONTNEED may lead to lost writes. That's why commit
302ec7b9bc ("tsan: add memory_limit_mb flag") added StopTheWorld around
the memory flush, but unfortunately the commit does not capture these findings.

Diff Detail

Event Timeline

dvyukov created this revision.Mar 10 2022, 2:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2022, 2:20 AM
dvyukov requested review of this revision.Mar 10 2022, 2:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2022, 2:20 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
melver accepted this revision.Mar 10 2022, 2:59 AM
This revision is now accepted and ready to land.Mar 10 2022, 2:59 AM
This revision was landed with ongoing or failed builds.Mar 10 2022, 8:02 AM
This revision was automatically updated to reflect the committed changes.