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

geth crash with [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x23e04] #19590

Closed
aboutlo opened this issue May 16, 2019 · 3 comments · Fixed by #19591
Closed

Comments

@aboutlo
Copy link

aboutlo commented May 16, 2019

System information

Geth version:

pi@raspberrypi:~/go-ethereum $ geth version
INFO [05-16|22:40:21.792] Bumping default cache on mainnet         provided=1024 updated=4096
WARN [05-16|22:40:21.793] Sanitizing cache to Go's GC limits       provided=4096 updated=309
Geth
Version: 1.9.0-unstable
Git Commit: f5d89cdb72c1e82e9deb54754bef8dd20bf12591
Git Commit Date: 20190516
Architecture: arm
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.12.4
Operating System: linux
GOPATH=/home/pi/go
GOROOT=/home/pi/.go

OS & Version: Raspberry Pi

Expected behaviour

The client start to sync

Actual behaviour

the client crash as for below logs

Steps to reproduce the behaviour

The client run as systemd service with this options:

[Unit]
Description=Geth Node
After=network.target auditd.service
Wants=network.target
[Service]
WorkingDirectory=/home/pi
ExecStart=/home/pi/go-ethereum/build/bin/geth --cache=512 --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcapi "eth,personal,net,admin"
User=pi
Group=pi
Restart=always
RestartSec=5s
#StandardOutput=syslog
#StandardError=syslog
#SyslogIdentifier=geth
#Type=simple

[Install]
WantedBy=multi-user.target
Alias=geth.service

before I was able to sync using this version 1.9.0-unstable-504f88b6

Backtrace

May 16 22:38:09 raspberrypi systemd[1]: Started Geth Node.
May 16 22:38:10 raspberrypi geth[20271]: WARN [05-16|22:38:10.140] Sanitizing cache to Go's GC limits       provided=512 updated=309
May 16 22:38:10 raspberrypi geth[20271]: INFO [05-16|22:38:10.147] Maximum peer count                       ETH=50 LES=0 total=50
May 16 22:38:10 raspberrypi geth[20271]: WARN [05-16|22:38:10.149] Failed to start smart card hub, disabling: dial unix /run/pcscd/pcscd.comm: connect: no such file or directory
May 16 22:38:10 raspberrypi geth[20271]: INFO [05-16|22:38:10.152] Starting peer-to-peer node               instance=Geth/v1.9.0-unstable-f5d89cdb-20190516/linux-arm/go1.12.4
May 16 22:38:10 raspberrypi geth[20271]: INFO [05-16|22:38:10.152] Allocated trie memory caches             clean=77.00MiB dirty=77.00MiB
May 16 22:38:10 raspberrypi geth[20271]: INFO [05-16|22:38:10.152] Allocated cache and file handles         database=/home/pi/.ethereum/geth/chaindata cache=154.00MiB handles=2048
May 16 22:38:13 raspberrypi geth[20271]: panic: runtime error: invalid memory address or nil pointer dereference
May 16 22:38:13 raspberrypi geth[20271]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x23e04]
May 16 22:38:13 raspberrypi geth[20271]: goroutine 1 [running]:
May 16 22:38:13 raspberrypi geth[20271]: runtime/internal/atomic.goLoad64(0x39a26bc, 0x465d7c0, 0x3ccaf94)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/.go/src/runtime/internal/atomic/atomic_arm.go:127 +0x1c
May 16 22:38:13 raspberrypi geth[20271]: github.com/ethereum/go-ethereum/core/rawdb.(*freezer).repair(0x465d7e0, 0x465d7c0, 0xadc0b1)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/core/rawdb/freezer.go:370 +0x90
May 16 22:38:13 raspberrypi geth[20271]: github.com/ethereum/go-ethereum/core/rawdb.newFreezer(0x3b88a50, 0x29, 0xae95ba, 0x11, 0x39c6060, 0x39f4120, 0x4664000)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/core/rawdb/freezer.go:111 +0x3d8
May 16 22:38:13 raspberrypi geth[20271]: github.com/ethereum/go-ethereum/core/rawdb.NewDatabaseWithFreezer(0xd6c7f0, 0x39c6060, 0x3b88a50, 0x29, 0xae95ba, 0x11, 0x39c6060, 0x0, 0x0, 0x29)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/core/rawdb/database.go:109 +0x38
May 16 22:38:13 raspberrypi geth[20271]: github.com/ethereum/go-ethereum/core/rawdb.NewLevelDBDatabaseWithFreezer(0x3b88a20, 0x21, 0x9a, 0x800, 0x3b88a50, 0x29, 0xae95ba, 0x11, 0x4, 0x6fe2d8, ...)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/core/rawdb/database.go:214 +0x8c
May 16 22:38:13 raspberrypi geth[20271]: github.com/ethereum/go-ethereum/node.(*ServiceContext).OpenDatabaseWithFreezer(0x3abb4f0, 0xae10e0, 0x9, 0x9a, 0x800, 0x0, 0x0, 0xae95ba, 0x11, 0x0, ...)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/node/service.go:68 +0x15c
May 16 22:38:13 raspberrypi geth[20271]: github.com/ethereum/go-ethereum/eth.New(0x3abb4f0, 0x3938600, 0x20, 0xa8e050, 0x690958)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/backend.go:123 +0x210
May 16 22:38:13 raspberrypi geth[20271]: github.com/ethereum/go-ethereum/cmd/utils.RegisterEthService.func2(0x3abb4f0, 0x3ad20c0, 0x3ccfd60, 0x3abb4d0, 0x2)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/cmd/utils/flags.go:1482 +0x28
May 16 22:38:13 raspberrypi geth[20271]: github.com/ethereum/go-ethereum/node.(*Node).Start(0x38a7040, 0x0, 0x0)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/node/node.go:206 +0x328
May 16 22:38:13 raspberrypi geth[20271]: github.com/ethereum/go-ethereum/cmd/utils.StartNode(0x38a7040)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/cmd/utils/cmd.go:67 +0x1c
May 16 22:38:13 raspberrypi geth[20271]: main.startNode(0x39a44d0, 0x38a7040)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/cmd/geth/main.go:314 +0x48
May 16 22:38:13 raspberrypi geth[20271]: main.geth(0x39a44d0, 0x0, 0x0)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/cmd/geth/main.go:302 +0x14c
May 16 22:38:13 raspberrypi geth[20271]: github.com/ethereum/go-ethereum/vendor/gopkg.in/urfave/cli%2ev1.HandleAction(0x9c1af0, 0xb9aa68, 0x39a44d0, 0x39a44d0, 0x3ccffac)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/vendor/gopkg.in/urfave/cli.v1/app.go:490 +0xac
May 16 22:38:13 raspberrypi geth[20271]: github.com/ethereum/go-ethereum/vendor/gopkg.in/urfave/cli%2ev1.(*App).Run(0x394fce0, 0x3826050, 0x9, 0xa, 0x0, 0x0)
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/vendor/gopkg.in/urfave/cli.v1/app.go:264 +0x410
May 16 22:38:13 raspberrypi geth[20271]: main.main()
May 16 22:38:13 raspberrypi geth[20271]: #011/home/pi/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/cmd/geth/main.go:287 +0x44
May 16 22:38:13 raspberrypi systemd[1]: geth.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
May 16 22:38:13 raspberrypi systemd[1]: geth.service: Unit entered failed state.
May 16 22:38:13 raspberrypi systemd[1]: geth.service: Failed with result 'exit-code'.
@karalabe
Copy link
Member

This seems to be a Go quirk golang/go#9959. The compiler requires the programmer to manually align atomic fields to 64bit boundaries. Lame. Should be solvable by rearranging the fields a bit in the freezer table.

@aboutlo
Copy link
Author

aboutlo commented May 17, 2019

I tested the new version from master and I can confirm that it works 🙌

@liuhuanhui
Copy link

mee to

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.

3 participants