[SERVER-42195] Stepdown suites fail with Python exception when run with --repeat >1 Created: 12/Jul/19  Updated: 29/Oct/23  Resolved: 12/Jul/19

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.0.11, 4.2.0-rc3, 4.3.1

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Fixed Votes: 0
Labels: tig-resmoke
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-41096 ContinuousStepdown thread and resmoke... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2, v4.0
Steps To Reproduce:

python buildscripts/resmoke.py --suite=replica_sets_kill_primary_jscore_passthrough  jstests/core/indexc.js --repeat=2

Sprint: STM 2019-07-29
Participants:
Linked BF Score: 18
Story Points: 1

 Description   

We're attempting to use the same FlagBasedStepdownLifecycle instance across executions of the test suite. This would mean FlagBasedStepdownLifecycle.__should_stop == True the moment the second execution of the test suite begins. We should instead construct a new FlagBasedStepdownLifecycle instance when constructing a new _StepdownThread instance.

[executor] 2019-07-12T00:12:46.427-0400 Summary: All 5 test(s) passed in 10.96 seconds.
[ContinuousStepdown:job0] Starting the stepdown thread.
[ContinuousStepdown:job0] The stepdown thread is not running.
[executor:js_test:job0] 2019-07-12T00:12:46.429-0400 JSTest jstests/core/indexc.js marked as a failure by a hook's before_test.
Traceback (most recent call last):
  File "/Users/maxh/debugging/mongo/buildscripts/resmokelib/testing/job.py", line 242, in _run_hooks_before_tests
    self._run_hook(hook, hook.before_test, test)
  File "/Users/maxh/debugging/mongo/buildscripts/resmokelib/testing/job.py", line 228, in _run_hook
    hook_function(test, self.report)
  File "/Users/maxh/debugging/mongo/buildscripts/resmokelib/testing/hooks/stepdown.py", line 97, in before_test
    self._check_thread()
  File "/Users/maxh/debugging/mongo/buildscripts/resmokelib/testing/hooks/stepdown.py", line 113, in _check_thread
    raise errors.ServerFailure(msg)
buildscripts.resmokelib.errors.ServerFailure: The stepdown thread is not running.



 Comments   
Comment by Githook User [ 13/Jul/19 ]

Author:

{'name': 'Max Hirschhorn', 'username': 'visemet', 'email': 'max.hirschhorn@mongodb.com'}

Message: SERVER-42195 Create new lifecycle instance for new stepdown thread.

(cherry picked from commit eaba1b8c34eb05697112364b764921e1128a79ce)
Branch: v4.0
https://github.com/mongodb/mongo/commit/90ac42dc55c3ad0c3b1275dffb25d8f64b685cc4

Comment by Githook User [ 12/Jul/19 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-42195 Create new lifecycle instance for new stepdown thread.

(cherry picked from commit eaba1b8c34eb05697112364b764921e1128a79ce)
Branch: v4.2
https://github.com/mongodb/mongo/commit/cc03dc7da13bd3a245ea62ea89445121c0994d53

Comment by Githook User [ 12/Jul/19 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-42195 Create new lifecycle instance for new stepdown thread.
Branch: master
https://github.com/mongodb/mongo/commit/eaba1b8c34eb05697112364b764921e1128a79ce

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