Skip to content

bug: Server instances are immortal - #9424

Merged
crusaderky merged 10 commits into
dask:mainfrom
crusaderky:gc
Dec 2, 2026
Merged

crusaderky merged 10 commits into
dask:mainfrom
crusaderky:gc

Conversation

@crusaderky

@crusaderky crusaderky commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Fix a bug, introduced in #8725, that caused all instances of Server that ever handled an RPC call to become immortal.

In production, this only impacts the uncommon use case where Scheduler and/or Workers are created and destroyed multiple times within the same process.
When running the tests suite, this causes garbage collection runtime to grow into the tens of seconds and RAM to leak for several gigabytes.

@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Results

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

    48 files  ±  0      48 suites  ±0   15h 27m 40s ⏱️ - 49m 9s
 4 203 tests + 12   4 021 ✅ + 10    178 💤 ±0  3 ❌ +1  1 🔥 +1 
98 381 runs  +284  93 272 ✅ +286  5 105 💤  - 4  3 ❌ +1  1 🔥 +1 

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

Results for commit 1506ee8. ± Comparison against base commit ddc7515.

This pull request removes 1 and adds 13 tests. Note that renamed tests count towards both.
distributed.tests.test_core ‑ test_expects_comm
distributed.tests.test_utils ‑ test_has_keyword[bound method]
distributed.tests.test_utils ‑ test_has_keyword[callable instance]
distributed.tests.test_utils ‑ test_has_keyword[class]
distributed.tests.test_utils ‑ test_has_keyword[classmethod]
distributed.tests.test_utils ‑ test_has_keyword[function]
distributed.tests.test_utils ‑ test_has_keyword[lambda]
distributed.tests.test_utils ‑ test_has_keyword[partial]
distributed.tests.test_utils ‑ test_has_keyword[staticmethod]
distributed.tests.test_utils ‑ test_has_keyword[unhashable callable instance]
distributed.tests.test_utils ‑ test_has_keyword_does_not_cache_lambdas
…

♻️ This comment has been updated with latest results.

@crusaderky crusaderky closed this Dec 2, 2026
@crusaderky crusaderky reopened this Dec 2, 2026
@crusaderky
crusaderky merged commit ddb254f into dask:main Dec 2, 2026
56 of 61 checks passed
@crusaderky
crusaderky deleted the gc branch December 2, 2026 21:44
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.

1 participant