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: runtime error: invalid memory address or nil pointer dereference #1818

Closed
0mkara opened this issue Sep 18, 2015 · 6 comments
Closed
Assignees
Labels
Milestone

Comments

@0mkara
Copy link

0mkara commented Sep 18, 2015

OS :

Fedora 20 || Linux mount-kailash 3.19.8-100.fc20.x86_64 #1 SMP Tue May 12 17:08:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Geth version : 1.1.3
Git commit : 4813a39

Go version :

GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

Error description :

I followed go-ethereum installation instruction and did the following things -

git clone go-ethereum.git
make
build/bin/geth

Then I am getting this error.

Error log : http://fpaste.org/269002/59583314/raw/
@tgerring
Copy link
Contributor

Looks like it might be a bug with Fedora: https://stackoverflow.com/questions/26575662/user-current-not-implemented-on-linux-amd64-with-fresh-golang-on-fedora

I don't see anywhere that the Go version is mentioned above? If you're on 1.4, you may want to try upgrading to 1.5 first and see if that resolves anything

@0mkara
Copy link
Author

0mkara commented Sep 18, 2015

I was on the IRC with this problem. I was suggested to change DefaultDataDir() to return my current dir where the files reside. That solved the problem. Just issued a bug report for things to resolve permanently. 👍

@fjl fjl added the type:bug label Sep 18, 2015
@fjl fjl added this to the 1.2.0 milestone Sep 18, 2015
@Gustav-Simonsson
Copy link

Looks like it should work with Go 1.5: https://bugzilla.redhat.com/show_bug.cgi?id=1135152#c12

Meanwhile if someone else runs into this on Fedora you can hack it by changing this function: https://github.com/ethereum/go-ethereum/blob/master/common/path.go#L102 to:

func DefaultDataDir() string {
    return "/home/user/.ethereum"
}

@fjl
Copy link
Contributor

fjl commented Sep 20, 2015

I added "show stopper" because it doesn't start at all if this error occurs. This is also an issue on android.
We should update the code to print a proper error if the home directory cannot be detected.

@obscuren
Copy link
Contributor

Understood, but it's not a show stopper. If all major target platforms would suffer from the same behavior it'd be classified as show stopper. At the moment there are no android users and hardly any fedora users (does not mean it shouldn't get fixed).

@0mkara
Copy link
Author

0mkara commented Sep 20, 2015

Just returning the current path is working for me. Hope it will be a easy fix. It is definitely the golang bug as this bug report says.

@obscuren obscuren modified the milestones: 1.2.0, 1.3.0 Oct 1, 2015
karalabe added a commit to karalabe/go-ethereum that referenced this issue Oct 1, 2015
obscuren added a commit that referenced this issue Oct 1, 2015
common: fix #1818, secondary datadir paths to fall back to
@obscuren obscuren modified the milestones: 1.3.0, 2.0.0 Oct 29, 2015
@karalabe karalabe closed this as completed Nov 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants