Global IORuntime threadpools are not closed in tests, causing a resource leak
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- scala
- Domain
- build-system, testing
Research direction
Start by tracing how test suites obtain IORuntime.global and how sbt creates classloaders across test runs and submodules. Compare the resource lifetime of that global runtime with the cost of creating runtimes per suite. Done means repeated test runs no longer retain threadpools or eventually exhaust memory, without an unacceptable test-running slowdown.
Written by the indexing model from the issue text.
Description
This library uses IORuntime.global for tests, which causes it to never close the threadpools that are created by this global IORuntime. Combined with sbt creating a new classloader for every test run and every submodule, this results in a lot of IORuntimes and threadpools being created and never cleaned up. Eventually, it causes sbt to run of out memory after a number of test runs, especially in projects with many submodules.
I'm not sure what the best approach would be to avoid this issue, as creating a new IORuntime in every test suite will probably slow down running tests?
- Dominant language
- Scala
- Stars
- 194
- Forks
- 42
- Avg merge
- 5h 16m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from typelevel/cats-effect-testing
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
typelevel/cats-effect-testing#590 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
typelevel/cats-effect-testing#471 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
typelevel/cats-effect-testing#300 · 8 comments · 1 reaction ·
-
bug
typelevel/cats-effect-testing#247 · 2 reactions · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
typelevel/cats-effect-testing#190 · 1 comment ·
All issues in typelevel/cats-effect-testing
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ergoplatform/ergodocs#614 ·
-
area:ci enhancement requires-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/datafusion-comet#6078 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
[VL] madvise(WILLNEED) call fails in MmapFileStream because of wrong calculation of fetching length Openbug triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
chipsalliance/rocket-chip#3831 ·