Skip to content

Commit

Permalink
Bug 1896767 [wpt PR 46266] - Check thread id is in current frames, a=…
Browse files Browse the repository at this point in the history
…testonly

Automatic update from web-platform-tests
Check thread id is in current frames (#46266)

On Chromium Windows bot, we are seeing KeyError below. Check the thread
id is in sys._current_frames() before format_stack, otherwise do not
include the stack in the error message.

Error message:
00:02:16.943 WARNING: Exception in TestExecutor.run:
  File "C:\b\s\w\ir\third_party\wpt_tools\wpt\tools\wptrunner\wptrunner\executors\base.py", line 219, in run
    message += "".join(traceback.format_stack(sys._current_frames()[executor.ident]))
KeyError: 8372
--

wpt-commits: c55cca3cabaa78d029191694e7efaff229f9c0a7
wpt-pr: 46266
  • Loading branch information
WeizhongX authored and moz-wptsync-bot committed May 23, 2024
1 parent c1e441e commit 7698622
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ def run(self):
else:
if self.protocol.is_alive():
message = "Executor hit external timeout (this may indicate a hang)\n"
# get a traceback for the current stack of the executor thread
message += "".join(traceback.format_stack(sys._current_frames()[executor.ident]))
if executor.ident in sys._current_frames():
# get a traceback for the current stack of the executor thread
message += "".join(traceback.format_stack(
sys._current_frames()[executor.ident]))
self.result = False, ("EXTERNAL-TIMEOUT", message)
else:
self.logger.info("Browser not responding, setting status to CRASH")
Expand Down

0 comments on commit 7698622

Please sign in to comment.