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

[Bug] Sometimes "Management" kills process #20

Closed
MichaIng opened this issue Nov 6, 2021 · 4 comments
Closed

[Bug] Sometimes "Management" kills process #20

MichaIng opened this issue Nov 6, 2021 · 4 comments

Comments

@MichaIng
Copy link
Collaborator

MichaIng commented Nov 6, 2021

Nov 06 19:40:40 VM-Bullseye strace[52175]: thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: SendError(Some(Request { page: "/management", cmd: "", args: [] }))', src/sockets.rs:309:53
Nov 06 19:40:40 VM-Bullseye strace[52175]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

https://github.com/ravenclaw900/DietPi-Dashboard/blob/921913d/src/backend/src/sockets.rs#L309

Got this two times when switching from "Terminal" to "Management", but I cannot reliably replicate it, currently it works well 🤔. But probably it can be enhanced to detect and handle errors gracefully to avoid the panic. I set the RUST_BACKTRACE=1 variable for further testing, probably it helps.

@ravenclaw900
Copy link
Owner

I can't replicate it, but I'll add some more error handling there.

@MichaIng
Copy link
Collaborator Author

MichaIng commented Nov 6, 2021

Thanks, yeah I also wasn't able to replicate it after running into it two times. If it happens again, the page will now be empty, right? Good to still have a sign when the underlying issue applies, so that we can debug at a later time, and an empty page without crashing the process is a good sign 🙂.

@ravenclaw900
Copy link
Owner

If it happens (along with any other errors), It will disconnect the websocket, which will then try to reconnect, where it will (hopefully) work.

@MichaIng
Copy link
Collaborator Author

MichaIng commented Nov 6, 2021

Okay, sounds best for end users. Probably fine to leave it like that. If we really want to debug, we could add some debug code/output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants