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

Node crashes when rolling back #106

Open
1 task done
abailly opened this issue Feb 7, 2025 · 0 comments
Open
1 task done

Node crashes when rolling back #106

abailly opened this issue Feb 7, 2025 · 0 comments
Assignees
Labels
bug A bug consensus Consensus related issue

Comments

@abailly
Copy link
Contributor

abailly commented Feb 7, 2025

What revision are you using?

b7d9fce

What operating system are you using?

Linux

What architecture are you using?

x86_64/amd64

What problem are you having? What should be the expected behaviour?

Amaru crashes when a rollback occurs

If possible, provide reproductions steps.

  1. Run Amaru on preprod network
  2. Wait for a rollback
  3. Observe the node stalls and then crashes

If any, provide logs / error outputs from the system when the problem occurs.

{"timestamp":"2025-02-07T16:44:10.442129Z","level":"INFO","fields":{"message":"exit"},"target":"amaru_consensus::consensus","span":{"fork.length":2383,"peer":"preprod-node.world.dev.cardano.org:30000","rollback_point.slot":83199062,"name":"switch_to_fork"},"spans":[{"peer":"Peer { name: \"127.0.0.1:3001\" }","rollback":"(83263424, d1f71fcf3203a6addd9e87b
fdf65983f7e139fc63ac7972830409a68e73e9931)","name":"handle_roll_back"}]}                                                                                                          2025-02-07T16:44:10.442151Z  INFO switch_to_fork: amaru_consensus::consensus: exit peer="preprod-node.world.dev.cardano.org:30000" rollback_point.slot=83199062 fork.length=2383
{"timestamp":"2025-02-07T16:44:10.442162Z","level":"TRACE","fields":{"message":"exit"},"target":"amaru_consensus::consensus","span":{"peer":"Peer { name: \"127.0.0.1:3001\" }","r
ollback":"(83263424, d1f71fcf3203a6addd9e87bfdf65983f7e139fc63ac7972830409a68e73e9931)","name":"handle_roll_back"},"spans":[]}                                                    {"timestamp":"2025-02-07T16:44:10.442861Z","level":"TRACE","fields":{"message":"enter"},"target":"amaru::ledger","span":{"name":"forward"},"spans":[{"peer":"127.0.0.1:3001","name
":"pull.roll_back"},{"name":"forward"}]}
{"timestamp":"2025-02-07T16:44:10.442908Z","level":"TRACE","fields":{"message":"enter"},"target":"amaru_ledger","span":{"block.size":2471,"name":"parse_block"},"spans":[{"peer":"
127.0.0.1:3001","name":"pull.roll_back"},{"name":"forward"},{"block.size":2471,"name":"parse_block"}]}
{"timestamp":"2025-02-07T16:44:10.443060Z","level":"TRACE","fields":{"message":"exit"},"target":"amaru_ledger","span":{"block.size":2471,"name":"parse_block"},"spans":[{"peer":"1
27.0.0.1:3001","name":"pull.roll_back"},{"name":"forward"}]}
{"timestamp":"2025-02-07T16:44:10.443126Z","level":"TRACE","fields":{"message":"enter"},"target":"amaru::ledger::state","span":{"block.transactions.failed":0,"block.transactions.
success":1,"block.transactions.total":1,"name":"block.body.validate"},"spans":[{"peer":"127.0.0.1:3001","name":"pull.roll_back"},{"header.hash":"8e96380ec131c78540e05acc3d08707b9
24f07d1bafa22cb915da7b1887a0f4e","header.height":3164863,"header.slot":83199077,"name":"forward"},{"block.transactions.failed":0,"block.transactions.success":1,"block.transaction
s.total":1,"name":"block.body.validate"}]}

   amaru::fatal::error
   Whoops! The Amaru process panicked, rather than handling the error it encountered gracefully.

   This is almost certainly a bug, and we'd appreciate a report so we can improve Amaru.

   Please report this error at https://github.com/pragma-org/amaru/issues/new.

   In your bug report please provide the information below and if possible the code
   that produced it.

   Operating System: linux
   Architecture:     x86_64
   Version:          v0.1.0+dfe149a

   /home/curry/amaru/crates/ledger/src/state.rs:294:29

       unknown UTxO expected to be known: TransactionInput { transaction_id: Hash<32>("1022da6c73ef35976319889e64a707c3be6d8bff62a35f16c59d5a0fb7f29f35"), index: 2 }!

The salient entry is:

2025-02-07T16:44:10.442151Z  INFO switch_to_fork: amaru_consensus::consensus: exit peer="preprod-node.world.dev.cardano.org:30000" rollback_point.slot=83199062 fork.length=2383

which is a good hint about the origin of the bug. In the ChainSelector code we never reset the initial anchor which is used to compute where to rollback and then how many blocks to forward.

Please confirm that you've already searched issues, CHANGELOG and available documentation.

  • I searched, but no luck.
@abailly abailly added consensus Consensus related issue bug A bug labels Feb 7, 2025
@abailly abailly self-assigned this Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug consensus Consensus related issue
Projects
None yet
Development

No branches or pull requests

1 participant