[SERVER-48597] Fix stack trace unit tests with TSAN Created: 04/Jun/20  Updated: 29/Oct/23  Resolved: 11/Jun/20

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

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

Issue Links:
Related
related to SERVER-48696 signal/sigaction callbacks must have ... Closed
related to SERVER-48622 stacktrace_test segfaults with TSAN Open
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Dev Platform 2020-06-15
Participants:

 Description   

Stack trace tests are failing with TSAN, but they are not reporting any stack traces. This is likely because there are stack traces being produced by some failure that TSAN is intercepting, which means that the test harness is not parsing output that it's expecting. A similar thing happened with the death tests as well. We should find out why those tests are failing and add appropriate suppressions or otherwise fix the way the tests parse output to get them passing with TSAN.



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

Author:

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

Message: SERVER-48597 Fix stack trace unit tests with TSAN

Stack trace unit tests were failing with TSAN due to the mechanisms and
assumptions of the tests. In one case, we simulate a real failure and do
some thread necromancy to recover from it, which was causing TSAN to
segfault immediately. In another two, we rely on a feature that makes
some assumptions about which threads are running and what signals they
can receive, which TSAN's internal threads violate. These tests and
features are disabled with TSAN for now so we can run further tests with
TSAN.

Separately, one of the tests was failing with a complaint from TSAN that
errno was being stomped on. That is also addressed.
Branch: master
https://github.com/mongodb/mongo/commit/c7115a2c310b1645f6268007e3d458300dab6b54

Comment by Ryan Egesdahl (Inactive) [ 05/Jun/20 ]

Turns out the problem had absolutely nothing to do with parsing output. The problem is that we're making some assumptions about the threads that are alive and which signals they receive, which TSAN is upsetting because it runs some internal threads. We'll address those problems later, but for now we can just omit these tests.

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