-
Notifications
You must be signed in to change notification settings - Fork 633
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
Panic does not exit #226
Comments
Librespot has a few threads, and a panic on one does not always cause others to stop. You should be able to make all panics into process aborts by adding to [profile.release]
panic = "abort" Let me know if that works. This seems like a reasonable thing to do, so I could add it here. |
Doesn't that also mean that the stack is not unwound and we won't get any stack traces if it panics? I actually added [profile.release]
debug = true just to get nice stack traces. (Debug build is not performant enough to smoothly play music) |
Ok, I tried it. Strangely, now when librespot crashes, it seems to hang with 100% CPU utilization. Also, I don't get a stack trace. |
This behaviour is known to me e.g. when the player thread panics. @JasonLG1979 is putting quite a lot of effort in error handling in #823, let's see how that goes. |
Can you test and report back now that #823 has been merged? |
I find that with v0.3.1 librespot will exit after a crash.
|
That would be happening here: https://github.com/librespot-org/librespot/blob/dev/connect/src/spirc.rs#L1155 |
So that means we can close this issue? |
No. That means we need to make sure this isn't zero: https://github.com/librespot-org/librespot/blob/dev/connect/src/spirc.rs#L1141 |
We're trying to grab the 1st thing (index 0) from a thing with a length of 0. |
I'm not exactly sure of the context or what exactly the thing is but the return type is an option. Provided whatever is asking for it actually checks it and doesn't just unwrap we can just return None if the len is 0. |
Yes, in my opinion this issue has been solved (not exiting on panic).
I'd suggest that be opened as a separate issue. |
I agree. Thanks to @JasonLG1979 so that we can now close this issue, and @uSpike for reporting back on it. Do file that new issue with steps how to reproduce that. |
I noticed that when ever a panic is thrown, librespot stops working completely but does not exit.
This is unfortunate, as it would be restarted by systemd in my setup if it exits.
The text was updated successfully, but these errors were encountered: