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: sql: converting argument $10 type: uint64 values with high bit set are not supported #83

Closed
larry-shyft opened this issue Sep 13, 2018 · 4 comments
Labels
Closed Waiting for merge to staging This label means that a bug has been closed and is sitting in development.

Comments

@larry-shyft
Copy link

Hi Team,

A mining node on the testnet first reported below error on Aug 30, 2018. All active nodes of shyftgeth stopped shortly after.
panic: sql: converting argument $10 type: uint64 values with high bit set are not supported

The testnet was restarted a couple times since then, but gave the same error and stopped every time. It is likely that a transaction in block 93058 triggered the pg panic.

System information

Geth version: shyftgeth 1.8.3
OS & Version: Linux Ubuntu 16.04

Expected behaviour

Blockchain sync continues indefinitely

Actual behaviour

Each time when blockchain sync reaches block height 93058, pg database panics and stops shyftgeth

Steps to reproduce the behaviour

Run a bootnode and wait for blockchain synchronization to reach height 93058

Backtrace

INFO [08-30|18:34:26] :link: block reached canonical chain number=93052 hash=4ef0c8…14c58d
INFO [08-30|18:34:26] :hammer: mined potential block number=93057 hash=33d158…3838a9
INFO [08-30|18:34:26] Commit new mining work number=93058 txs=1 uncles=0 elapsed=432.772µs
INFO [08-30|18:34:42] Successfully sealed new block number=93058 hash=668138…700dba
panic: sql: converting argument $10 type: uint64 values with high bit set are not supported

goroutine 39 [running]:
github.com/ShyftNetwork/go-empyrean/core.InsertTx(0xc422060dc0, 0xc424c45e50, 0x42, 0xc4485624a0, 0x0, 0x0, 0xc425872c60, 0x2a, 0xc424c45ef0, 0x42, ...)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/shyft_database_util.go:426 +0x482
github.com/ShyftNetwork/go-empyrean/core.swriteTransactions(0xc422060dc0, 0xc428ef3a70, 0x5eca139e7c388166, 0x9dfd5d97b78da3c0, 0x100f2df332128173, 0xba0d70dfb868a8c5, 0xc43982f066, 0x5, 0xc42000f7f8, 0x1, ...)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/shyft_database_util.go:204 +0x5f0
github.com/ShyftNetwork/go-empyrean/core.SWriteBlock(0xc43aaa6bd0, 0xc42000f7f8, 0x1, 0x1, 0x0, 0x0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/shyft_database_util.go:134 +0x918
github.com/ShyftNetwork/go-empyrean/core.(*BlockChain).WriteBlockWithState(0xc420018000, 0xc43aaa6bd0, 0xc42000f7f8, 0x1, 0x1, 0xc42bf4e780, 0x1, 0x0, 0x0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/blockchain.go:1005 +0xe3d
github.com/ShyftNetwork/go-empyrean/miner.(*worker).wait(0xc42022e3c0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/miner/worker.go:313 +0x24f
created by github.com/ShyftNetwork/go-empyrean/miner.newWorker
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/miner/worker.go:155 +0x4d0

INFO [09-09|16:09:29] Imported new chain segment blocks=1005 txs=0 mgas=0.000 elapsed=5.284s mgasps=0.000 number=91456 hash=a37edf…b7c152 cache=84.42kB
INFO [09-09|16:09:37] Imported new chain segment blocks=1042 txs=0 mgas=0.000 elapsed=8.003s mgasps=0.000 number=92498 hash=5b70d5…599f17 cache=84.42kB
INFO [09-09|16:09:41] Imported new chain segment blocks=1006 txs=2 mgas=0.042 elapsed=4.600s mgasps=0.009 number=93504 hash=f16cea…7fa038 cache=88.59kB
panic: sql: converting argument $10 type: uint64 values with high bit set are not supported

goroutine 17366141 [running]:
github.com/ShyftNetwork/go-empyrean/core.InsertTx(0xc4246350e0, 0xc43a1b1680, 0x42, 0xc42945bd20, 0x0, 0x0, 0xc429e33b60, 0x2a, 0xc43a1b1720, 0x42, ...)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/shyft_database_util.go:426 +0x482
github.com/ShyftNetwork/go-empyrean/core.swriteTransactions(0xc4246350e0, 0xc42ae3fcb0, 0x8982c2f2c8a79df, 0xbf4adbf8489fb73c, 0x25061ea3a19a04ed, 0xc29872472444e119, 0xc44455c496, 0x5, 0xc43b42d580, 0x8, ...)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/shyft_database_util.go:204 +0x5f0
github.com/ShyftNetwork/go-empyrean/core.SWriteBlock(0xc42339d3b0, 0xc43b42d580, 0x8, 0x8, 0x0, 0x0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/shyft_database_util.go:134 +0x918
github.com/ShyftNetwork/go-empyrean/core.(*BlockChain).WriteBlockWithState(0xc4202a4000, 0xc42339d3b0, 0xc43b42d580, 0x8, 0x8, 0xc43b449680, 0x1, 0x0, 0x0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/blockchain.go:1005 +0xe3d
github.com/ShyftNetwork/go-empyrean/core.(*BlockChain).insertChain(0xc4202a4000, 0xc42a7da000, 0x3d0, 0x3d0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/blockchain.go:1174 +0x16fa
github.com/ShyftNetwork/go-empyrean/core.(*BlockChain).InsertChain(0xc4202a4000, 0xc42a7da000, 0x3d0, 0x3d0, 0x1b66998, 0x0, 0x0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/blockchain.go:1019 +0x67
github.com/ShyftNetwork/go-empyrean/eth/downloader.(*Downloader).importBlockResults(0xc420130c00, 0xc42794c000, 0x3d0, 0x3d0, 0x3d0, 0x0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/eth/downloader/downloader.go:1354 +0x431
github.com/ShyftNetwork/go-empyrean/eth/downloader.(*Downloader).processFullSyncContent(0xc420130c00, 0xc4204f8688, 0xc4204f8798)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/eth/downloader/downloader.go:1328 +0x79
github.com/ShyftNetwork/go-empyrean/eth/downloader.(*Downloader).(github.com/ShyftNetwork/go-empyrean/eth/downloader.processFullSyncContent)-fm(0x8, 0xfd23a0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/eth/downloader/downloader.go:471 +0x2a
github.com/ShyftNetwork/go-empyrean/eth/downloader.(*Downloader).spawnSync.func1(0xc429755350, 0xc4298020c0, 0xc42c1917f0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/eth/downloader/downloader.go:484 +0x51
created by github.com/ShyftNetwork/go-empyrean/eth/downloader.(*Downloader).spawnSync
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/eth/downloader/downloader.go:484 +0xc3

INFO [09-12|18:40:47] Imported new chain segment blocks=1172 txs=0 mgas=0.000 elapsed=8.002s mgasps=0.000 number=92436 hash=f554e7…b78494 cache=84.42kB
INFO [09-12|18:40:51] Imported new chain segment blocks=876 txs=2 mgas=0.042 elapsed=3.594s mgasps=0.012 number=93312 hash=62a387…236d36 cache=88.59kB
panic: sql: converting argument $10 type: uint64 values with high bit set are not supported

goroutine 700718 [running]:
github.com/ShyftNetwork/go-empyrean/core.InsertTx(0xc4243bb220, 0xc43e15b270, 0x42, 0xc4286f99e0, 0x0, 0x0, 0xc4295ce210, 0x2a, 0xc43e15b310, 0x42, ...)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/shyft_database_util.go:426 +0x482
github.com/ShyftNetwork/go-empyrean/core.swriteTransactions(0xc4243bb220, 0xc428fd5a70, 0x8982c2f2c8a79df, 0xbf4adbf8489fb73c, 0x25061ea3a19a04ed, 0xc29872472444e119, 0xc42bc01db6, 0x5, 0xc420727800, 0x8, ...)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/shyft_database_util.go:204 +0x5f0
github.com/ShyftNetwork/go-empyrean/core.SWriteBlock(0xc42a580360, 0xc420727800, 0x8, 0x8, 0x0, 0x0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/shyft_database_util.go:134 +0x918
github.com/ShyftNetwork/go-empyrean/core.(*BlockChain).WriteBlockWithState(0xc420316000, 0xc42a580360, 0xc420727800, 0x8, 0x8, 0xc43b776000, 0x1, 0x0, 0x0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/blockchain.go:1005 +0xe3d
github.com/ShyftNetwork/go-empyrean/core.(*BlockChain).insertChain(0xc420316000, 0xc4202bcf00, 0x490, 0x490, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/blockchain.go:1174 +0x16fa
github.com/ShyftNetwork/go-empyrean/core.(*BlockChain).InsertChain(0xc420316000, 0xc4202bcf00, 0x490, 0x490, 0x1b66998, 0x0, 0x0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/core/blockchain.go:1019 +0x67
github.com/ShyftNetwork/go-empyrean/eth/downloader.(*Downloader).importBlockResults(0xc4201eef00, 0xc4202baa00, 0x490, 0x490, 0x490, 0x0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/eth/downloader/downloader.go:1354 +0x431
github.com/ShyftNetwork/go-empyrean/eth/downloader.(*Downloader).processFullSyncContent(0xc4201eef00, 0x90ab4d00bcc2a0f7, 0xc4203c0798)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/eth/downloader/downloader.go:1328 +0x79
github.com/ShyftNetwork/go-empyrean/eth/downloader.(*Downloader).(github.com/ShyftNetwork/go-empyrean/eth/downloader.processFullSyncContent)-fm(0x91a51f7000000008, 0xfd23a0)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/eth/downloader/downloader.go:471 +0x2a
github.com/ShyftNetwork/go-empyrean/eth/downloader.(*Downloader).spawnSync.func1(0xc425f6a160, 0xc4282cfaa0, 0xc426899d10)
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/eth/downloader/downloader.go:484 +0x51
created by github.com/ShyftNetwork/go-empyrean/eth/downloader.(*Downloader).spawnSync
/go/src/github.com/ShyftEthereum/go-empyrean/build/_workspace/src/github.com/ShyftNetwork/go-empyrean/eth/downloader/downloader.go:484 +0xc3

@dbkbali
Copy link

dbkbali commented Sep 13, 2018

Larry - as part of the ring node rollback sprint we have refactored some of the database code, so it is possible that this issue may resolve. Once we have finished the code sprint - hopefully by early next we will try and reproduce this issue and find out what is causing the panic. In the interim if this occurs again could you export the pg container that this is occurring on and provide a copy for us. This will allow us to access the containers db and logs to further investigate this issue.

@dutterbutter
Copy link

Larry and I went over this issue yesterday, it seems that postgres has difficulty in converting certain high bit set uints into numerics. I provided a quick solution of converting the txFee (argument $10) into a string to be stored so that he may continue his work. However, David and I have already discussed a utility function to ensure we are not mishandling uints as it relates to PG.

@larry-shyft
Copy link
Author

larry-shyft commented Oct 3, 2018

Development branch node sync got past Block 93058 without errors. Tested on AWS node.
INFO [10-03|16:21:39] Imported new block receipts count=12 elapsed=207.151µs number=94476 hash=50cf62…280b2a size=48.00B ignored=0
INFO [10-03|16:21:39] Imported new state entries count=6 elapsed=53.991µs processed=14 pending=0 retry=0 duplicate=0 unexpected=0
INFO [10-03|16:21:39] Imported new block receipts count=1 elapsed=77.009µs number=94477 hash=f3fd0f…d28fb2 size=4.00B ignored=0
INFO [10-03|16:21:39] Committed new head block number=94477 hash=f3fd0f…d28fb2

@GregTheGreek
Copy link

Was this with postgres running?

@dbkbali dbkbali closed this as completed Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Waiting for merge to staging This label means that a bug has been closed and is sitting in development.
Projects
None yet
Development

No branches or pull requests

4 participants