-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Possible undefined behavior with bots connected #761
Comments
I'm currently working on this branch which replaces unsafe code with safe code to try to find which unsafe block is causing issues: https://github.com/TestingPlant/hyperion/tree/reduce-unsafe |
btw we have https://github.com/hyperion-mc/hyperion/tree/main/tools/antithesis-bot all machines have 48 cores so they should be able to run hundreds of bots. https://youtu.be/m3HwXlQPCEU?si=ZULB7Be7BVF58sK3 |
I've been testing more in this branch: https://github.com/TestingPlant/hyperion/tree/reduce-unsafe-2 This crash still occurs with all the play c2s packet handling removed. I've looked through most of the unsafe blocks in this branch and most either:
The server also aborts with a stack trace when using ctrl+c to exit it. I'm not sure if that's related. I've also only tested this on aarch64 but not on x86_64. I haven't heard reports of this issue from anyone else so this crash might be specific to aarch64, although the bug is likely caused by UB which should be fixed anyways. This could also possibly be an issue in flecs (either the C library or the Rust bindings) or with how we use flecs, since there are ways to use flecs in an unsound manner without unsafe. |
.> I've been testing more in this branch: TestingPlant/hyperion@
btw a lot of the work I do is on a macbook which is aarch64 but not still is slightly different than on linux... but I haven’t done a lot of stuff recently with this project. |
The tag program aborts on debug mode and panics on release mode after using
rust-mc-bot
and testing with 500 bots.Debug:
Release:
Since there's a different behavior on release mode, I suspect some UB is occurring and that the panic/abort is just a symptom. In addition, on commit d358e2, release mode sometimes caused a segfault and sometimes caused a panic, although on the latest main (ef00b8) I only seem to get a panic on release mode.
A git bisect shows that the abort started in commit 22d628. However, that commit doesn't seem to have any obviously unsound code, so I believe the UB was introduced earlier than that, and 22d628 is the first commit to show a symptom of UB.
The text was updated successfully, but these errors were encountered: