Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40592

Uncaught exception in resmoke.py job thread due to logkeeper unavailability when tearing down fixture

    • Fully Compatible
    • ALL
    • STM 2019-05-20
    • 5
    • 2

      The call to teardown_fixture() should happen in a try/except block.

      • If there's a buildscripts.resmokelib.errors.LoggerRuntimeConfigError exception, then we should record the message with self.logger.error("%s", err) to the task logs.
      • If there's some other kind of exception, then we should record the message and Python stacktrace with self.logger.exception("Encountered an error when tearing down %s: %s", self.fixture, err) to the task logs. We should additionally set the teardown_flag.
      [2019/04/08 21:07:45.443] Exception in thread Thread-1:
      [2019/04/08 21:07:45.443] Traceback (most recent call last):
      [2019/04/08 21:07:45.443]   File "/opt/mongodbtoolchain/revisions/94dac13bc8c0b50beff286acac77adeb2e81761e/stow/python3-v3.lJe/lib/python3.7/threading.py", line 917, in _bootstrap_inner
      [2019/04/08 21:07:45.443]     self.run()
      [2019/04/08 21:07:45.443]   File "/opt/mongodbtoolchain/revisions/94dac13bc8c0b50beff286acac77adeb2e81761e/stow/python3-v3.lJe/lib/python3.7/threading.py", line 865, in run
      [2019/04/08 21:07:45.443]     self._target(*self._args, **self._kwargs)
      [2019/04/08 21:07:45.443]   File "/data/mci/6e26eb78c635416bfda724f51d2fa812/src/buildscripts/resmokelib/testing/job.py", line 102, in __call__
      [2019/04/08 21:07:45.443]     if teardown_flag is not None and not self.teardown_fixture():
      [2019/04/08 21:07:45.443]   File "/data/mci/6e26eb78c635416bfda724f51d2fa812/src/buildscripts/resmokelib/testing/job.py", line 64, in teardown_fixture
      [2019/04/08 21:07:45.443]     test_case(self.report)
      [2019/04/08 21:07:45.443]   File "/opt/mongodbtoolchain/revisions/94dac13bc8c0b50beff286acac77adeb2e81761e/stow/python3-v3.lJe/lib/python3.7/unittest/case.py", line 663, in __call__
      [2019/04/08 21:07:45.443]     return self.run(*args, **kwds)
      [2019/04/08 21:07:45.443]   File "/opt/mongodbtoolchain/revisions/94dac13bc8c0b50beff286acac77adeb2e81761e/stow/python3-v3.lJe/lib/python3.7/unittest/case.py", line 588, in run
      [2019/04/08 21:07:45.443]     result.startTest(self)
      [2019/04/08 21:07:45.443]   File "/data/mci/6e26eb78c635416bfda724f51d2fa812/src/buildscripts/resmokelib/testing/report.py", line 112, in startTest
      [2019/04/08 21:07:45.443]     test.logger)
      [2019/04/08 21:07:45.443]   File "/data/mci/6e26eb78c635416bfda724f51d2fa812/src/buildscripts/resmokelib/logging/loggers.py", line 205, in new_test_logger
      [2019/04/08 21:07:45.443]     " test_id".format(test_basename))
      [2019/04/08 21:07:45.443] buildscripts.resmokelib.errors.LoggerRuntimeConfigError: Encountered an error configuring buildlogger for test job0_fixture_teardown: Failed to get a new test_id
      

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: