[SERVER-46217] Unit tests consistently segfault after SERVER-45793 Created: 18/Feb/20  Updated: 02/Mar/20  Resolved: 02/Mar/20

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Bernard Gorman Assignee: Benjamin Caimano (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-46041 DiagnosticListeners are destructed be... Closed
Duplicate
duplicates SERVER-46461 Make static in mutex getDiagnosticLis... Closed
Problem/Incident
is caused by SERVER-45793 Improve mongo::Mutex contract Closed
Operating System: ALL
Sprint: Service Arch 2020-03-09
Participants:

 Description   

From commit f363c7a5f2 onwards, many (most?) unit tests have been consistently producing segfaults after the tests themselves have finished running, regardless of whether they fail or succeed. This has been observed both by myself on my Ubuntu 19.04 workstation, and by another member of my team on his Ubuntu 19.10 workstation. We are both building with --link-model=dynamic --opt=off.

Some examples below:

(mongo-python3) bernard@SEELE:~/mongo$ build/ninja/mongo/s/client/mongos_client_local_test
2020-02-18T11:26:24.250+0000 I  -        [main] going to run suite: ShardLocalTest
2020-02-18T11:26:24.251+0000 I  -        [main] 	 going to run test: RunCommand
...
2020-02-18T11:26:24.307+0000 I  -        [main] SUCCESS - All tests in all suites passed
Segmentation fault (core dumped)

(mongo-python3) bernard@SEELE:~/mongo$ ninja -f build-mongo.ninja +document_source_change_stream_test
[1/1 (100%) 5.025s] build/ninja/mongo/db/pipeline/db_pipeline_test -fileNameFilter document_source_change_stream_test
FAILED: +document_source_change_stream_test
build/ninja/mongo/db/pipeline/db_pipeline_test -fileNameFilter document_source_change_stream_test
2020-02-18T11:27:41.675+0000 I  -        [main] going to run suite: AccumulatorMergeObjects
2020-02-18T11:27:41.675+0000 I  -        [main] 	 DONE running tests
...
2020-02-18T11:27:43.228+0000 I  -        [main] SUCCESS - All tests in all suites passed
Segmentation fault (core dumped)
ninja: build stopped: subcommand failed.

(mongo-python3) bernard@SEELE:~/mongo$ build/ninja/mongo/s/catalog/s_catalog_test
...
2020-02-18T11:30:23.887+0000 I  -        [main] DistLockCatalogTest                      | tests:   78 | fails:    0 | assert calls:          0 | time secs:  0.706
2020-02-18T11:30:23.887+0000 I  -        [main] InsertRetryTest                          | tests:    6 | fails:    0 | assert calls:          0 | time secs:  0.058
2020-02-18T11:30:23.887+0000 I  -        [main] RSDistLockMgrWithMockTickSource          | tests:    4 | fails:    0 | assert calls:          0 | time secs:  0.104
2020-02-18T11:30:23.887+0000 I  -        [main] ReplSetDistLockManagerFixture            | tests:   28 | fails:    0 | assert calls:          0 | time secs:  0.259
2020-02-18T11:30:23.887+0000 I  -        [main] ShardingCatalogClientTest                | tests:   36 | fails:    0 | assert calls:          0 | time secs:  0.196
2020-02-18T11:30:23.887+0000 I  -        [main] UpdateRetryTest                          | tests:    6 | fails:    0 | assert calls:          0 | time secs:  0.031
2020-02-18T11:30:23.887+0000 I  -        [main] TOTALS                                   | tests:  158 | fails:    0 | assert calls:          0 | time secs:  1.354
2020-02-18T11:30:23.887+0000 I  -        [main] SUCCESS - All tests in all suites passed
Segmentation fault (core dumped)


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