[SERVER-51172] resmoke sometimes throws TypeError when calculating elapsed time for test Created: 28/Sep/20  Updated: 29/Oct/23  Resolved: 09/Oct/20

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.9.0, 4.4.7

Type: Bug Priority: Major - P3
Reporter: Richard Samuels (Inactive) Assignee: Raiden Worley (Inactive)
Resolution: Fixed Votes: 0
Labels: tig-resmoke
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: STM 2020-10-19
Participants:
Story Points: 0

 Description   

From this task

Stack trace:

[2020/09/25 21:59:57.013]   File "/data/mci/bf378576eef557fd157a81fc32b8b34c/src/buildscripts/resmokelib/run/__init__.py", line 234, in _execute_suite
[2020/09/25 21:59:57.013]     executor.run()
[2020/09/25 21:59:57.013]   File "/data/mci/bf378576eef557fd157a81fc32b8b34c/src/buildscripts/resmokelib/testing/executor.py", line 120, in run
[2020/09/25 21:59:57.013]     (report, interrupted) = self._run_tests(test_queue, setup_flag, teardown_flag)
[2020/09/25 21:59:57.013]   File "/data/mci/bf378576eef557fd157a81fc32b8b34c/src/buildscripts/resmokelib/testing/executor.py", line 196, in _run_tests
[2020/09/25 21:59:57.015]     joined = test_queue.join(TestSuiteExecutor._TIMEOUT)
[2020/09/25 21:59:57.015]   File "/data/mci/bf378576eef557fd157a81fc32b8b34c/src/buildscripts/resmokelib/utils/queue.py", line 43, in join
[2020/09/25 21:59:57.025]     self.all_tasks_done.wait(remaining)
[2020/09/25 21:59:57.025]   File "/opt/mongodbtoolchain/stow/osx-python3-v3.kRB/lib/python3.7/threading.py", line 300, in wait
[2020/09/25 21:59:57.025]     gotit = waiter.acquire(True, timeout)
[2020/09/25 21:59:57.025]   File "/data/mci/bf378576eef557fd157a81fc32b8b34c/src/buildscripts/resmokelib/sighandler.py", line 37, in _handle_sigusr1
[2020/09/25 21:59:57.025]     _dump_and_log(header_msg)
[2020/09/25 21:59:57.025]   File "/data/mci/bf378576eef557fd157a81fc32b8b34c/src/buildscripts/resmokelib/sighandler.py", line 63, in _dump_and_log
[2020/09/25 21:59:57.026]     reportfile.write(suites)
[2020/09/25 21:59:57.026]   File "/data/mci/bf378576eef557fd157a81fc32b8b34c/src/buildscripts/resmokelib/reportfile.py", line 19, in write
[2020/09/25 21:59:57.026]     combined_report_dict = _report.TestReport.combine(*reports).as_dict()
[2020/09/25 21:59:57.026]   File "/data/mci/bf378576eef557fd157a81fc32b8b34c/src/buildscripts/resmokelib/testing/report.py", line 284, in as_dict
[2020/09/25 21:59:57.026]     "elapsed": test_info.end_time - test_info.start_time,
[2020/09/25 21:59:57.026] TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

Not sure why the start time is None.



 Comments   
Comment by Githook User [ 10/May/21 ]

Author:

{'name': 'Carl Raiden Worley', 'email': 'carl.worley@10gen.com', 'username': 'aggrand'}

Message: SERVER-51172 resmoke sometimes throws TypeError when calculating elapsed time for test

(cherry picked from commit 1d73420f40291c7ae5d798c091f5f1a16fc93b93)
Branch: v4.4
https://github.com/mongodb/mongo/commit/c023c02829746ddb3e019ba6fe8a7738211c17f0

Comment by Githook User [ 08/Oct/20 ]

Author:

{'name': 'Carl Raiden Worley', 'email': 'carl.worley@10gen.com', 'username': 'aggrand'}

Message: SERVER-51172 resmoke sometimes throws TypeError when calculating elapsed time for test
Branch: master
https://github.com/mongodb/mongo/commit/1d73420f40291c7ae5d798c091f5f1a16fc93b93

Comment by Raiden Worley (Inactive) [ 07/Oct/20 ]

Ran into this while looking into SERVER-47755. It seems that if resmoke receives a SIGUSR1 from the hang analyzer, but there's not actually a hang so resmoke is still making progress, then there's a race where it might start combining test info objects into a report after the test info object has been created but before the start time has been registered.

This could be resolved by setting it equal to the combining time if None, like we do with the end time here.

Comment by Brooke Miller [ 29/Sep/20 ]

Timeboxing the investigation to 1 day

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