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] A division by zero exception is triggered when max_frame_size in the node configuration file node.yaml is changed to 0 #14958

Open
sdjasj opened this issue Oct 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sdjasj
Copy link

sdjasj commented Oct 14, 2024

🐛 Bug

I changed the value of validator_network.max_frame_size in the node configuration file node.yaml. Specifically, I set it to 0, and after starting the node, a division by zero panic occurred during runtime.

To reproduce

1.Change the value of validator_network.max_frame_size in the node configuration file node.yaml to 0.
2. Restart the node to update the config.
3. A division by zero exception occurred when the node used the value of max_frame_size, causing the node to crash.

Stack trace/error message
Here is the full log.
node.log

Below is part of the log.

details = """
panicked at network/framework/src/peer/mod.rs:161:29:
attempt to divide by zero"""
backtrace = """
   0:     0x56257a6a6d9b - backtrace::backtrace::libunwind::trace::h5328474097f1a34f
                               at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.69/src/backtrace/libunwind.rs:93:5
                           backtrace::backtrace::trace_unsynchronized::hee449ad1e679b8a6
                               at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.69/src/backtrace/mod.rs:66:5
   1:     0x56257a6a6d22 - backtrace::backtrace::trace::h06b6b76cc8d69cd8
                               at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.69/src/backtrace/mod.rs:53:14
   2:     0x56257a6c3033 - backtrace::capture::Backtrace::create::h83aedfa4fab1c34d
                               at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.69/src/capture.rs:176:9
   3:

Expected Behavior

Aptos is able to handle almost all misconfiguration issues and provides user-friendly relevant prompts. Therefore, I believe this division by zero exception should be handled to prevent the node from crashing unexpectedly.

System information

Please complete the following information:

  • Aptos Core Version 4.1.0
  • Rust Version rustc 1.81.0 (eeb90cda1 2024-09-04)
  • Computer OS Ubuntu 22.04.3 LTS
@sdjasj sdjasj added the bug Something isn't working label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant