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

Panic does not exit #226

Open
maufl opened this issue May 18, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@maufl
Copy link

commented May 18, 2018

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.

@plietar

This comment has been minimized.

Copy link
Contributor

commented May 18, 2018

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 Cargo.toml (assuming you're building with --release):

[profile.release]
panic = "abort"

Let me know if that works. This seems like a reasonable thing to do, so I could add it here.

@maufl

This comment has been minimized.

Copy link
Author

commented May 18, 2018

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)

@maufl

This comment has been minimized.

Copy link
Author

commented May 29, 2018

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.

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.