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

threadpool: tests/parallel/tconvexhull.nim segfaults intermittently on systems with more than 4 cores #11275

Closed
stefantalpalaru opened this issue May 18, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@stefantalpalaru
Copy link
Contributor

commented May 18, 2019

Welcome again to the land of worker threads being shut down prematurely!

This test runs setMaxPoolSize 2 and then goes on to span tasks in a parallel section. If the initial pool size was bigger than the minimum of 4, those extra worker threads are shut down. Sometimes, they are shut down after having received a task but before their associated flowvars can be read. Trying to read memory from a closed thread results in a segfault.

Replicating

PATH="./bin:$PATH" ./koch tests r tests/parallel/tconvexhull.nim

Repeat until it segfaults:

FAIL: tests/parallel/tconvexhull.nim C
Test "tests/parallel/tconvexhull.nim" in category "tests"
Failure: reExitcodesDiffer
Expected:
exitcode: 0

Gotten:
exitcode: 1

Output:
Traceback (most recent call last)
tconvexhull.nim(59)      tconvexhull
tconvexhull.nim(52)      convex_hull
threadpool.nim(256)      ^
assign.nim(147)          genericSeqAssign
assign.nim(111)          genericAssign
assign.nim(66)           genericAssignAux
SIGSEGV: Illegal storage access. (Attempt to read from nil?)

FAILURE! total: 1 passed: 0 skipped: 0 failed: 1
tests failed

stefantalpalaru added a commit to stefantalpalaru/Nim that referenced this issue May 18, 2019

@mratsim mratsim added the Threads label May 19, 2019

@Araq Araq closed this in 13b3e4a May 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.