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 when running watcher #22

Open
Its-Alex opened this issue Mar 11, 2018 · 1 comment
Open

Panic when running watcher #22

Its-Alex opened this issue Mar 11, 2018 · 1 comment

Comments

@Its-Alex
Copy link

Its-Alex commented Mar 11, 2018

Hi, I have a panic when I run go-watcher

go env

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/alex/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/alex/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build165720837=/tmp/go-build -gno-record-gcc-switches"

Command

$ watcher

Error

2018/03/11 19:40:05 Could not run the go binary: exec: "-.-785150": executable file not found in $PATH 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x46ef4e]

goroutine 7 [running]:
os.(*Process).signal(0x0, 0x502320, 0x56c0e8, 0x0, 0x0)
	/usr/lib/go/src/os/exec_unix.go:56 +0x2e
os.(*Process).Signal(0x0, 0x502320, 0x56c0e8, 0xc42008e100, 0xc420090120)
	/usr/lib/go/src/os/exec.go:129 +0x3f
os.(*Process).kill(0x0, 0xc4200900f0, 0x2)
	/usr/lib/go/src/os/exec_posix.go:54 +0x43
os.(*Process).Kill(0x0, 0x0, 0x54)
	/usr/lib/go/src/os/exec.go:114 +0x2b
github.com/canthefason/go-watcher.(*Runner).kill(0xc42000a160, 0xc4201122c0)
	/home/alex/go/src/github.com/canthefason/go-watcher/run.go:66 +0x41
github.com/canthefason/go-watcher.(*Runner).Run(0xc42000a160, 0xc42000a0c0)
	/home/alex/go/src/github.com/canthefason/go-watcher/run.go:39 +0x211
created by main.main
	/home/alex/go/src/github.com/canthefason/go-watcher/cmd/watcher/main.go:17 +0x110

If you want to reproduce I just listen on a tcp socket. You can ask for anything else.

@Its-Alex Its-Alex changed the title Segfault when running watcher Panic when running watcher Mar 11, 2018
@bfanger
Copy link

bfanger commented May 19, 2018

I've fixed an issue in PR #25
Until that is merged, running GOPATH=~/go watcher solved the issue in my case.

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

No branches or pull requests

2 participants