You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TaskHandler seems to panic at some point when calling kill.
I obviously assumed that stuff would work just fine and added an unwrap or except at some branch of the code I thought to be safe.
Originally, at the time @gotbletu posted the comment, a panic in the TaskHandler wouldn't actually result in a panic of the program, since it wasn't in the main thread.
This again would result in the mutex being poisoned, since the thread died while the mutex was taken.
Commit de796c7 fixes this problem.
If this comes up again, pueued will properly shut down and crash as expected.
This can then be combined with a simple RUST_BACKTRACE-1 to get a better idea on what's actually wrong.
I'm pretty confident, that I managed to fix this bug in fdf6346.
The cause for this problem was a preemtive status change of tasks on kill, which turned out to be unnecessary.
However, this status change (to Done) made it possible to remove the task from the daemon, even though the process hasn't been handled yet.
The daemon would then go ahead, handle the child process, expect the respective task to still exist and crash hard.
I still couldn't reproduce the problem myself, but the code definitely allowed this to happen and it matches your problem and example perfectly.
Thanks a lot for the detailed bug report!
If you have the time, it would be awesome if you could try to reproduce the bug on the latest master version and confirm that the bug has been fixed :)
The TaskHandler seems to panic at some point when calling
kill
.I obviously assumed that stuff would work just fine and added an
unwrap
orexcept
at some branch of the code I thought to be safe.Originally, at the time @gotbletu posted the comment, a
panic
in the TaskHandler wouldn't actually result in a panic of the program, since it wasn't in the main thread.This again would result in the mutex being poisoned, since the thread died while the mutex was taken.
Commit de796c7 fixes this problem.
If this comes up again,
pueued
will properly shut down and crash as expected.This can then be combined with a simple
RUST_BACKTRACE-1
to get a better idea on what's actually wrong.E.g.:
Here's an excerpt of the original post:
Originally posted by @gotbletu in https://github.com/Nukesor/pueue/issue_comments/708027176
Steps To Reproduce
$ pueue status
if i use sleep command then is working fine as normal
The text was updated successfully, but these errors were encountered: