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

Attempt to subtract with overflow #1382

Open
Alex6323 opened this issue Apr 19, 2024 · 1 comment
Open

Attempt to subtract with overflow #1382

Alex6323 opened this issue Apr 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Alex6323
Copy link
Collaborator

Alex6323 commented Apr 19, 2024

Bug description

I am running the iota-core docker-network (private tangle) and connect inx-chronicle to one of the validator nodes via INX. If I run without analytics, i.e. --disable-analytics, there's no issue, but if I turn on analytics then Chronicle crashes quickly and consistently.

Rust version

  • Rust version: rustc 1.77.1 (7cf61ebde 2024-03-27)

Chronicle version

  • 2.0 branch

Steps to reproduce the bug

  1. run a docker-network and expose the INX port of one of the nodes (e.g. validator node 1)
  2. build Chronicle on the 2.0 branch in debug mode (!!)
  3. make sure you have a working MongoDb and InfluxDb instance
  4. start Chronicle with correct mongodb conn string, influxdb url and inx url (don't disable analytics!)

Expected behaviour

Chronicle should not crash with analytics enabled.

Actual behaviour

It crashes every time.

Errors

2024-04-19T07:38:25.642056Z  INFO inx_chronicle: Connecting to database using hosts: `localhost:27017`.
2024-04-19T07:38:25.822234Z DEBUG inx_chronicle: Available databases: `["admin", "chronicle", "config", "local"]`
2024-04-19T07:38:25.826210Z  INFO inx_chronicle: Connected to database `chronicle` (57.5 MB)
2024-04-19T07:38:25.864129Z  INFO inx_chronicle: Connecting to influx at `http://localhost:8086`
2024-04-19T07:38:25.865251Z DEBUG reqwest::connect: starting new connection: http://localhost:8086/
2024-04-19T07:38:25.870354Z DEBUG reqwest::connect: starting new connection: http://localhost:8086/
2024-04-19T07:38:25.871494Z  INFO inx_chronicle: Connected to influx database `chronicle_analytics`
2024-04-19T07:38:25.871509Z  INFO inx_chronicle: Connected to influx database `chronicle_metrics`
2024-04-19T07:38:25.871623Z  INFO inx_chronicle::inx: Connecting to INX at bind address `http://localhost:9059`.
2024-04-19T07:38:25.873411Z  INFO inx_chronicle::inx: Connected to INX.
2024-04-19T07:38:25.876352Z DEBUG inx_chronicle::inx: The node has a pruning epoch index of `0` and a latest confirmed slot index of `3733`.
2024-04-19T07:38:25.877438Z DEBUG inx_chronicle::inx: Connected to network `docker-1713474996` with base token `Shimmer[SMR]`.
2024-04-19T07:38:25.886983Z DEBUG inx_chronicle::inx: Updating node configuration.
2024-04-19T07:38:25.893763Z DEBUG inx_chronicle::inx: Started listening to ledger updates via INX.
2024-04-19T07:38:25.944243Z ERROR handle_ledger_update{slot_index=3728 created=0 consumed=0}: inx_chronicle: panicked at /home/me/.cargo/git/checkouts/iota-sdk-43e451930a46536a/c104506/sdk/src/types/block/slot/index.rs:111:14:
attempt to subtract with overflow
2024-04-19T07:38:25.944565Z DEBUG handle_ledger_update{slot_index=3728 created=0 consumed=0}: inx_chronicle::inx: close time.busy=12.4ms time.idle=36.6ms
2024-04-19T07:38:26.030084Z  INFO inx_chronicle::api: Starting API server on port `8042`
2024-04-19T07:38:26.035241Z  INFO inx_chronicle: runtime stopped
@Alex6323 Alex6323 added the bug Something isn't working label Apr 19, 2024
@Alex6323 Alex6323 changed the title Attemtpt to subract with overflow Attempt to subract with overflow Apr 19, 2024
@DaughterOfMars
Copy link
Collaborator

Yeahh, this is only a problem in debug mode but I have not been able to track it down. It's very mysterious.

@DaughterOfMars DaughterOfMars changed the title Attempt to subract with overflow Attempt to subtract with overflow May 6, 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

2 participants