[SERVER-64151] resmoke.py fails when running with --repeat > 1 Created: 03/Mar/22  Updated: 29/Oct/23  Resolved: 07/Mar/22

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Bug Priority: Blocker - P1
Reporter: Max Hirschhorn Assignee: Robert Guo (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by SERVER-60458 Add a resmoke run flag to limit numbe... Closed
Related
related to SERVER-72860 Python exceptions in create_fixture_t... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

python buildscripts/resmoke.py run --suites=core --repeat=2 jstests/core/all.js

Sprint: DAG 2022-03-07, DAG 2022-03-21
Participants:

 Description   

The changes from ac364ad as part of SERVER-60458 causes resmoke.py to create new job threads for each repetition of the suite. This is problematic for a number of reasons:

  • Creating a new job thread can lead resmoke to exhaust its use of the ephemeral port range because the new fixtures instances won't be reusing the same ports as before.
  • The new job thread deletes the dbpath when creating its new fixture instance while the original fixture instance is still running, leading to a Python exception.

[executor] 14:30:39.775Z Waiting for threads to complete
[executor] 14:30:39.775Z Threads are completed!
[executor] 14:30:39.775Z Summary of latest execution: All 3 test(s) passed in 3.08 seconds.
[j0] Mongod not running when gathering standalone fixture pid.
[executor:js_test:job0] 14:30:39.777Z Encountered an error during test execution.
Traceback (most recent call last):
  File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/job.py", line 85, in __call__
    self._run(queue, interrupt_flag, teardown_flag, hook_failure_flag)
  File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/job.py", line 131, in _run
    self._execute_test(test, hook_failure_flag)
  File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/job.py", line 172, in _execute_test
    self.report.logging_prefix = create_fixture_table(self.fixture)
  File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/fixtures/interface.py", line 359, in create_fixture_table
    info: List[NodeInfo] = fixture.get_node_info()
  File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/fixtures/standalone.py", line 162, in get_node_info
    port=self.port, pid=self.mongod.pid)
AttributeError: 'NoneType' object has no attribute 'pid'
[executor] 14:30:39.777Z Waiting for threads to complete
[executor:js_test:job0] 14:30:39.777Z Encountered an error when tearing down the fixture.
Traceback (most recent call last):
  File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/job.py", line 97, in __call__
    teardown_succeeded = self.manager.teardown_fixture(self.logger)
  File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/job.py", line 386, in teardown_fixture
    self.report.logging_prefix = create_fixture_table(self.fixture)
  File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/fixtures/interface.py", line 359, in create_fixture_table
    info: List[NodeInfo] = fixture.get_node_info()
  File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/fixtures/standalone.py", line 162, in get_node_info
    port=self.port, pid=self.mongod.pid)
AttributeError: 'NoneType' object has no attribute 'pid'
[executor] 14:30:39.777Z Threads are completed!
[executor] 14:30:39.777Z Summary of latest execution: 0 test(s) ran in 0.00 seconds (0 succeeded, 1 were skipped, 0 failed, 0 errored)
[executor] 14:30:39.778Z Encountered an error when running js_tests of suite core.
Traceback (most recent call last):
  File "/home/ubuntu/mongo/buildscripts/resmokelib/run/__init__.py", line 315, in _execute_suite
    executor.run()
  File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/executor.py", line 160, in run
    raise errors.ResmokeError(
buildscripts.resmokelib.errors.ResmokeError: 0 reported tests is less than 1 expected tests



 Comments   
Comment by Githook User [ 07/Mar/22 ]

Author:

{'name': 'Robert Guo', 'email': 'robert.guo@10gen.com', 'username': 'guoyr'}

Message: SERVER-64151 resmoke.py generates jobs based on num of tests in suite
Branch: master
https://github.com/mongodb/mongo/commit/f3cc0e3a66102c0725ecd901ca9ca4a5df6c8571

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