decred / dcrwallet

A secure Decred wallet daemon written in Go (golang).
https://decred.org
ISC License
216 stars 155 forks source link

Dcrwallet 1.0.1 doesn't start on linux 32bit ! #737

Closed Louis-Xavier closed 7 years ago

Louis-Xavier commented 7 years ago

dcdaemon@linode:~/sbin$ ./start-wallet.sh 18:08:48 2017-05-12 [WRN] DCRW: open /home/dcdaemon/.dcrwallet/dcrwallet.conf: no such file or directory 18:08:48 2017-05-12 [INF] DCRW: Version 1.0.1+release (Go version go1.7.5) panic: runtime error: makeslice: len out of range

goroutine 1 [running]: panic(0x8714320, 0x18f22d48) /home/jcv/code/golang/src/runtime/panic.go:500 +0x331 github.com/decred/dcrwallet/wallet/udb.deserializeSStxRecord(0xf2e4c3c1, 0x188, 0x188, 0x2, 0xf2e4c3c1, 0x0, 0x0) /home/jcv/code/go/src/github.com/decred/dcrwallet/wallet/udb/stakedb.go:124 +0x314 github.com/decred/dcrwallet/wallet/udb.fetchSStxRecord(0xf76f8370, 0x1936af40, 0x1936b120, 0x2, 0x1936af40, 0x0, 0x0) /home/jcv/code/go/src/github.com/decred/dcrwallet/wallet/udb/stakedb.go:562 +0x25c github.com/decred/dcrwallet/wallet/udb.votingPreferencesUpgrade(0x8bfac40, 0x18f23ce0, 0x192f4598, 0x6, 0x8, 0x0, 0x0) /home/jcv/code/go/src/github.com/decred/dcrwallet/wallet/udb/upgrades.go:246 +0x3c7 github.com/decred/dcrwallet/wallet/udb.Upgrade.func2(0x8bfac40, 0x18f23ce0, 0x0, 0x0) /home/jcv/code/go/src/github.com/decred/dcrwallet/wallet/udb/upgrades.go:302 +0xb9 github.com/decred/dcrwallet/walletdb.Update(0x8bf9440, 0x192985a0, 0x18f35b90, 0x0, 0x0) /home/jcv/code/go/src/github.com/decred/dcrwallet/walletdb/interface.go:219 +0x73 github.com/decred/dcrwallet/wallet/udb.Upgrade(0x8bf9440, 0x192985a0, 0x192f4598, 0x6, 0x8, 0x0, 0x0) /home/jcv/code/go/src/github.com/decred/dcrwallet/wallet/udb/upgrades.go:308 +0xed github.com/decred/dcrwallet/wallet.Open(0x8bf9440, 0x192985a0, 0x192f4598, 0x6, 0x8, 0x8000001, 0x0, 0x0, 0x0, 0x0, ...) /home/jcv/code/go/src/github.com/decred/dcrwallet/wallet/wallet.go:3720 +0x16a github.com/decred/dcrwallet/loader.(*Loader).OpenExistingWallet(0x18f14f60, 0x192f4598, 0x6, 0x8, 0x1, 0x0, 0x0, 0x0) /home/jcv/code/go/src/github.com/decred/dcrwallet/loader/loader.go:219 +0x46b main.walletMain(0x0, 0x0) /home/jcv/code/go/src/github.com/decred/dcrwallet/dcrwallet.go:126 +0xabe main.main() /home/jcv/code/go/src/github.com/decred/dcrwallet/dcrwallet.go:38 +0x28

jrick commented 7 years ago

Already fixed. See #695.

Louis-Xavier commented 7 years ago

where are the new binaries ? i tried today with 1.0.1 and still crash !

jrick commented 7 years ago

Fix will be in next release. Or you can build latest from source.

Louis-Xavier commented 7 years ago

using a fresh downloaded go1.7.5.linux-amd64.tar.gz and deployed into ~/go

I tried to build from src on ubuntu, i've got an issue

cdaemon@xxx:~/go/src/github.com/decred/dcrwallet$ go install import cycle not allowed package github.com/decred/dcrwallet imports bufio imports bytes imports errors imports runtime imports runtime/internal/atomic imports unsafe imports runtime import cycle not allowed package github.com/decred/dcrwallet imports crypto/tls imports crypto/x509 imports net imports runtime/cgo imports runtime/cgo

jrick commented 7 years ago

paste the output of go env

Louis-Xavier commented 7 years ago

cdaemon@xxx:~/go/src/github.com/decred/dcrwallet$ go env GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/dcdaemon/go" GORACE="" GOROOT="/home/dcdaemon/go/bin" GOTOOLDIR="/home/dcdaemon/go/bin/pkg/tool/linux_amd64" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build634916305=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1"

jrick commented 7 years ago

Either move your GOROOT or your GOPATH (changing GOPATH would probably be easier). One can not contain the other.

Louis-Xavier commented 7 years ago

if i don't do that i've got : ... vendor/golang.org/x/crypto/ssh/terminal/util.go:21:2: cannot find package "unsafe" in any of: /home/dcdaemon/gopath/src/github.com/decred/dcrwallet/vendor/unsafe (vendor tree) /home/dcdaemon/go/bin/src/unsafe (from $GOROOT) /home/dcdaemon/gopath/src/unsafe (from $GOPATH)

my cmd are (exactly like in the github readme for dcrwallet) :

505 tar xf go1.7.5.linux-amd64.tar.gz 506 mv go ../. 507 cd 508 git clone https://github.com/decred/dcrwallet $GOPATH/src/github.com/decred/dcrwallet 509 cd $GOPATH/src/github.com/decred/dcrwallet 510 glide install 511 go build

jrick commented 7 years ago

the old GOROOT is embedded in the go binary because that is where you built it. It is failing to find the standard library in that location because you moved it. Rebuild go or set the GOROOT environment variable to override it.

Louis-Xavier commented 7 years ago

Hi, my env is :

export GOROOT=/home/dcdaemon/go/bin export GOPATH=/home/dcdaemon/gopath export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

my steps are : tar xf go1.7.5.linux-amd64.tar.gz mv go ~/. git clone https://github.com/decred/dcrwallet $GOPATH/src/github.com/decred/dcrwallet cd $GOPATH/src/github.com/decred/dcrwallet glide install go build

jrick commented 7 years ago

your GOROOT should be ~/go not ~/go/bin

Louis-Xavier commented 7 years ago

it did it ! thank you so much for your help.