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

HPC-GAP: crashes related to thread control #3749

Open
fingolfin opened this issue Nov 20, 2019 · 0 comments
Open

HPC-GAP: crashes related to thread control #3749

fingolfin opened this issue Nov 20, 2019 · 0 comments
Assignees
Labels
kind: bug: crash Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes) kind: bug Issues describing general bugs, and PRs fixing them topic: HPC-GAP Issues and PRs related to HPC-GAP

Comments

@fingolfin
Copy link
Member

While working on PR #3741, I discovered various ways to crash or lockup HPC-GAP. According to @rbehrends these seem to be due to thread control not being prepared for a thread being paused/killed/interrupted so quickly. While the concrete examples below are of course artificial, I believe similar things can happen in realistic code, and then would be difficult to track down.

Here are the problematics snippets; a crash or deadlock happens in WaitThread. And even if GAP manages to get past them, something in the internal state seems to get broken, leading to weird behaviour and lockups later on.

My tests were done on macOS 10.14, but Travis also had issues, so I don't think this is OS specific.

t := CreateThread(function() MicroSleep(100); end);;
PauseThread(t);
ResumeThread(t);
WaitThread(t); # FIXME: sometimes deadlocks
t := CreateThread(function() MicroSleep(100); end);;
InterruptThread(t, 17);
WaitThread(t); # FIXME: crashes in pthread_join
t := CreateThread(function() MicroSleep(100); end);;
KillThread(t);
WaitThread(t); # FIXME: crashes in pthread_join
@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them topic: HPC-GAP Issues and PRs related to HPC-GAP kind: bug: crash Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes) labels Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug: crash Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes) kind: bug Issues describing general bugs, and PRs fixing them topic: HPC-GAP Issues and PRs related to HPC-GAP
Projects
None yet
Development

No branches or pull requests

2 participants