Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't obfuscate fine performance metrics failures #8568

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

crusaderky
Copy link
Collaborator

@crusaderky crusaderky commented Mar 11, 2024

It was reported offline that the line

with context_meter.meter("thread-noncpu", func=time) as m:

in worker.py::apply_function_simple failed.
While this should never be possible, it happened for some reason. The way our try...except blocks are written caused the actual stack trace to be swallowed; the user got instead a confusing

  File "distributed/worker.py", line 3015, in apply_function_simple
    msg["start"] = m.start + time_delay
      ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'm' where it is not associated with a value

This PR causes the actual stack trace detailing the failure of context_meter.meter to show up in the user's logs.

Copy link
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    27 files  ± 0      27 suites  ±0   10h 3m 20s ⏱️ + 9m 35s
 4 050 tests ± 0   3 934 ✅  -  4    110 💤 ±0   5 ❌ +3  1 🔥 +1 
50 855 runs  +19  48 506 ✅ +21  2 334 💤  - 6  14 ❌ +3  1 🔥 +1 

For more details on these failures and errors, see this check.

Results for commit ad3e016. ± Comparison against base commit 0438768.

@fjetter
Copy link
Member

fjetter commented Mar 11, 2024

While this should never be possible

IIUC this is interacting with the event loop behind the scenes so everything is possible.

@crusaderky crusaderky merged commit 137ff3e into dask:main Mar 11, 2024
21 of 34 checks passed
@crusaderky crusaderky deleted the fpm_fail branch March 11, 2024 15:27
milesgranger pushed a commit to milesgranger/distributed that referenced this pull request Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants