[SERVER-48933] Fix fork-after-new-thread death test failures with TSAN Created: 17/Jun/20  Updated: 29/Oct/23  Resolved: 26/Jun/20

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 4.5 Required
Fix Version/s: 4.7.0

Type: Improvement Priority: Major - P3
Reporter: Ryan Egesdahl (Inactive) Assignee: Ryan Egesdahl (Inactive)
Resolution: Fixed Votes: 0
Labels: thread-sanitizer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-48773 All death tests show up as test failu... Closed
Backwards Compatibility: Fully Compatible
Sprint: Dev Platform 2020-06-29
Participants:
Linked BF Score: 0

 Description   

After SERVER-48773 was fixed, a few tests are still failing due to forking after creating new threads, which TSAN currently does not support and is resulting in the thread being killed. We can fix this by setting die_after_fork=0 in TSAN_OPTIONS, which disables the behavior.

Unfortunately, there is no way to limit the change to only the death tests. While disabling the behavior is unsupported, it appears we only ever do this as part of our death tests anyway (the test harness is multithreaded and forks a thread that then dies).



 Comments   
Comment by Githook User [ 26/Jun/20 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-48933 Fix fork-after-new-thread death test failures with TSAN

The death tests fork() a new thread in a multithreaded test harness so
we can test thread death behavior. Unfortunately TSAN does not support
fork() after spawning a thread and will kill the thread by default,
causing a test failure. This sets an unsupported TSAN flag that disables
the behavior, allowing the tests to proceed. There is currently no means
to limit the change to only the death tests, but the change only applies
to the death tests for now.
Branch: master
https://github.com/mongodb/mongo/commit/0bba5e4470d94759f323b3015c8b5689393356c9

Generated at Thu Feb 08 05:18:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.