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

panic: Int64() out of bound for Rebus #20

Closed
hivefive-space opened this issue Aug 14, 2022 · 2 comments · Fixed by #31
Closed

panic: Int64() out of bound for Rebus #20

hivefive-space opened this issue Aug 14, 2022 · 2 comments · Fixed by #31

Comments

@hivefive-space
Copy link

Hello

I have compiled the package from main with last commit (PR #18) and I receive the following error (please see below).
The daemon successfully starts and works until prometheus makes the request.

Please fix it if possible.

I could not find how to see the version of current cosmos-exporter (not seen in --help, -V or -v or version)
Here is the md5 hash
9dc766fa92cb370fbbc39932b1b10298 /usr/local/bin/cosmos-exporter

11:30PM INF Started with following parameters --bech-account-prefix=rebus --bech-account-pubkey-prefix=rebuspub --bech-consensus-node-prefix=rebusvalcons --bech-consensus-node-pubkey-prefix=rebusvalconspub --bech-validator-prefix=rebusvaloper --bech-validator-pubkey-prefix=rebusvaloperpub --denom=rebus --denom-cofficient=1000000000000000000.000000 --denom-exponent=0 --listen-address=0.0.0.0:17300 --log-level=info --node=localhost:17090
11:30PM INF Got network status from Tendermint network=reb_3333-1
11:30PM INF Using provided denom and coefficient. coefficient=1000000000000000000 denom=rebus
11:30PM INF Listening address=0.0.0.0:17300
panic: Int64() out of bound
goroutine 81 [running]:
github.com/cosmos/cosmos-sdk/types.Dec.RoundInt64({0xc000d0e335?})
	/home/rebus/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.42.4/types/decimal.go:554 +0x8b
main.ValidatorsHandler.func1.1(0xc001170150?, 0x47)
	/home/rebus/cosmos-exporter/validators.go:156 +0x71
sort.medianOfThree_func({0xc001003fb8?, 0xc001170150?}, 0xc00055fb90?, 0x0?, 0xd8?)
	/usr/local/go/src/sort/zfuncversion.go:53 +0x4a
sort.doPivot_func({0xc001003fb8?, 0xc001170150?}, 0x0, 0x238)
	/usr/local/go/src/sort/zfuncversion.go:76 +0x8a
sort.quickSort_func({0xc001003fb8?, 0xc001170150?}, 0xc00055fb90?, 0x0?, 0xc0b6783e9354476c?)
	/usr/local/go/src/sort/zfuncversion.go:143 +0x85
sort.Slice({0x10cb380, 0xc00055fb90}, 0x368?)
	/usr/local/go/src/sort/slice.go:20 +0x9f
main.ValidatorsHandler.func1()
	/home/rebus/cosmos-exporter/validators.go:155 +0x313
created by main.ValidatorsHandler
	/home/rebus/cosmos-exporter/validators.go:130 +0x15b3
cosmos-exporter-rebus.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
cosmos-exporter-rebus.service: Failed with result 'exit-code'.
cosmos-exporter-rebus.service: Scheduled restart job, restart counter is at 17375.
Stopped Cosmos Exporter.
Started Cosmos Exporter.
@AndreMiras
Copy link
Contributor

AndreMiras commented Feb 13, 2023

I'm also impacted by a similar issue with the canto chain.
I've built the latest version from master (5f4936f), the error is:

panic: Int64() out of bound
goroutine 216 [running]:
github.com/cosmos/cosmos-sdk/types.Dec.RoundInt64({0xc000d9fe78?})
        /go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.42.4/types/decimal.go:554 +0x8b
main.ValidatorsHandler.func1.1(0x0?, 0x0)
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:156 +0x45
sort.insertionSort_func({0xc000d9ffb8?, 0xc001109b90?}, 0x0, 0x3)
        /usr/local/go/src/sort/zsortfunc.go:12 +0xb1
sort.pdqsort_func({0xc000d9ffb8?, 0xc001109b90?}, 0x3e938d0765b8?, 0x18?, 0xc000066800?)
        /usr/local/go/src/sort/zsortfunc.go:73 +0x2dd
sort.Slice({0x10e6620?, 0xc001063098?}, 0x4?)
        /usr/local/go/src/sort/slice.go:26 +0xfa
main.ValidatorsHandler.func1()
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:155 +0x31c
created by main.ValidatorsHandler
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:130 +0x16b3

Start command was:

cosmos-exporter \
--bech-prefix canto \
--denom canto \
--denom-coefficient 1000000000000000000 \
--node canto-grpc.polkachu.com:15590 \
--tendermint-rpc https://canto-rpc.polkachu.com:443

AndreMiras added a commit to AndreMiras/cosmos-exporter that referenced this issue Feb 14, 2023
The `/metrics/validators` was crashing with:
```
panic: Int64() out of bound
goroutine 216 [running]:
github.com/cosmos/cosmos-sdk/types.Dec.RoundInt64({0xc000d9fe78?})
        /go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.42.4/types/decimal.go:554 +0x8b
main.ValidatorsHandler.func1.1(0x0?, 0x0)
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:156 +0x45
sort.insertionSort_func({0xc000d9ffb8?, 0xc001109b90?}, 0x0, 0x3)
        /usr/local/go/src/sort/zsortfunc.go:12 +0xb1
sort.pdqsort_func({0xc000d9ffb8?, 0xc001109b90?}, 0x3e938d0765b8?, 0x18?, 0xc000066800?)
        /usr/local/go/src/sort/zsortfunc.go:73 +0x2dd
sort.Slice({0x10e6620?, 0xc001063098?}, 0x4?)
        /usr/local/go/src/sort/slice.go:26 +0xfa
main.ValidatorsHandler.func1()
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:155 +0x31c
created by main.ValidatorsHandler
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:130 +0x16b3
```
Closes solarlabsteam#20
@AndreMiras
Copy link
Contributor

AndreMiras commented Feb 14, 2023

@hivefive-space, just pull requested a fix, can you try it?
#31

Edit: merged to master, can you let us know if that solves the issue for you too?

AndreMiras added a commit to AndreMiras/cosmos-exporter that referenced this issue Feb 14, 2023
The `/metrics/validators` was crashing with:
```
panic: Int64() out of bound
goroutine 216 [running]:
github.com/cosmos/cosmos-sdk/types.Dec.RoundInt64({0xc000d9fe78?})
        /go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.42.4/types/decimal.go:554 +0x8b
main.ValidatorsHandler.func1.1(0x0?, 0x0)
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:156 +0x45
sort.insertionSort_func({0xc000d9ffb8?, 0xc001109b90?}, 0x0, 0x3)
        /usr/local/go/src/sort/zsortfunc.go:12 +0xb1
sort.pdqsort_func({0xc000d9ffb8?, 0xc001109b90?}, 0x3e938d0765b8?, 0x18?, 0xc000066800?)
        /usr/local/go/src/sort/zsortfunc.go:73 +0x2dd
sort.Slice({0x10e6620?, 0xc001063098?}, 0x4?)
        /usr/local/go/src/sort/slice.go:26 +0xfa
main.ValidatorsHandler.func1()
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:155 +0x31c
created by main.ValidatorsHandler
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:130 +0x16b3
```
Closes solarlabsteam#20
freak12techno pushed a commit that referenced this issue Feb 21, 2023
The `/metrics/validators` was crashing with:
```
panic: Int64() out of bound
goroutine 216 [running]:
github.com/cosmos/cosmos-sdk/types.Dec.RoundInt64({0xc000d9fe78?})
        /go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.42.4/types/decimal.go:554 +0x8b
main.ValidatorsHandler.func1.1(0x0?, 0x0)
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:156 +0x45
sort.insertionSort_func({0xc000d9ffb8?, 0xc001109b90?}, 0x0, 0x3)
        /usr/local/go/src/sort/zsortfunc.go:12 +0xb1
sort.pdqsort_func({0xc000d9ffb8?, 0xc001109b90?}, 0x3e938d0765b8?, 0x18?, 0xc000066800?)
        /usr/local/go/src/sort/zsortfunc.go:73 +0x2dd
sort.Slice({0x10e6620?, 0xc001063098?}, 0x4?)
        /usr/local/go/src/sort/slice.go:26 +0xfa
main.ValidatorsHandler.func1()
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:155 +0x31c
created by main.ValidatorsHandler
        /app/cosmos-exporter-5f4936f0e725eff970995a34e67b85c7a1c65bda/validators.go:130 +0x16b3
```
Closes #20
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

Successfully merging a pull request may close this issue.

2 participants