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

run error. #1

Open
bitcard opened this issue Dec 23, 2020 · 6 comments
Open

run error. #1

bitcard opened this issue Dec 23, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@bitcard
Copy link

bitcard commented Dec 23, 2020

1, run console:
chmod +x cave
./cave --mode=dev
-bash: ./cave: cannot execute binary file

2, debug in vscode

API server listening at: 127.0.0.1:31763
&{Mode:dev Cluster:{Port:2000 DiscoveryHost:10.0.0.134:2001 Host:10.0.0.134:2000 SyncPort:1999} KV:{Encryption:true DBPath:kv.db} API:{Enable:true Port:9000 Authentication:false EnableMetrics:true} UI:{Enable:true Port:80 Authentication:false} SSL:{Enable:false Certificate:ssl/bunker.crt Key:ssl/bunker.key} Perf:{EnableMetrics:true EnableHTTPLogs:true BufferSize:4096} Auth:{Provider:jwt} Plugin:{PluginPath:./plugins.d/ AllowUnsigned:true Blacklist:[] SocketPrefix:/tmp/}}
2020-12-23 23:14:21.098 CST [ DEBUG ] [ START ] Logger
Failed to continue - runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation]
Unable to propogate EXC_BAD_ACCESS signal to target process and panic (see go-delve/delve#852)
Last known immediate stacktrace (goroutine id 1):
/Users/kenny/Documents/tools/go/src/runtime/mbitmap.go:1173
runtime.heapBitsSetType
/Users/kenny/Documents/tools/go/src/runtime/malloc.go:1066
runtime.mallocgc
/Users/kenny/Documents/tools/go/src/runtime/malloc.go:1165
runtime.newobject
/Users/kenny/Documents/tools/go/src/os/stat_unix.go:30
os.statNolog
/Users/kenny/Documents/tools/go/src/os/stat.go:13
os.Stat
/Users/kenny/Documents/tools/go/src/os/exec/lp_unix.go:20
os/exec.findExecutable
/Users/kenny/Documents/tools/go/src/os/exec/lp_unix.go:53
os/exec.LookPath
/Users/kenny/Documents/tools/go/src/os/exec/exec.go:175
os/exec.Command
/Users/kenny/Documents/tools/go/pkg/mod/github.com/denisbrodbeck/[email protected]/helper.go:16
github.com/denisbrodbeck/machineid.run
/Users/kenny/Documents/tools/go/pkg/mod/github.com/denisbrodbeck/[email protected]/id_darwin.go:16
github.com/denisbrodbeck/machineid.machineID
/Users/kenny/Documents/tools/go/pkg/mod/github.com/denisbrodbeck/[email protected]/id.go:29
github.com/denisbrodbeck/machineid.ID
/Users/kenny/Documents/project/workspace-go/cave/crypto.go:101
main.(*Crypto).GenerateSystemAES
/Users/kenny/Documents/project/workspace-go/cave/crypto.go:57
main.newCrypto
/Users/kenny/Documents/project/workspace-go/cave/main.go:53
main.main
/Users/kenny/Documents/tools/go/src/runtime/proc.go:203
runtime.main
/Users/kenny/Documents/tools/go/src/runtime/asm_amd64.s:1373
runtime.goexit
Failed to continue - runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation]
Unable to propogate EXC_BAD_ACCESS signal to target process and panic (see go-delve/delve#852)
Last known immediate stacktrace (goroutine id 1):
?:-1

/Users/kenny/Documents/tools/go/src/runtime/sys_darwin_amd64.s:547
runtime.pthread_cond_wait_trampoline
/Users/kenny/Documents/tools/go/src/runtime/asm_amd64.s:685
runtime.asmcgocall
Failed to get list local variables - unable to find function context
Last known immediate stacktrace (goroutine id 1):
?:-1

/Users/kenny/Documents/tools/go/src/runtime/sys_darwin_amd64.s:547
runtime.pthread_cond_wait_trampoline
/Users/kenny/Documents/tools/go/src/runtime/asm_amd64.s:685
runtime.asmcgocall
Process exiting with code: 0

@peterfraedrich
Copy link
Contributor

@bitcard can you post some details about your system, environment, which binary you are attempting to run, and any other information that might be useful?

Thanks!

@bitcard
Copy link
Author

bitcard commented Dec 27, 2020

@bitcard can you post some details about your system, environment, which binary you are attempting to run, and any other information that might be useful?

Thanks!

macos 10.15.2, go 1.13, vscode, after go build, run cave.

@peterfraedrich
Copy link
Contributor

peterfraedrich commented Dec 27, 2020

we haven't tested cave on MacOS yet, so this is uncharted territory for us. Theoretically it should work, but sometimes there's little things that need changed between Linux and MacOS. Are you getting any output during the build process that might indicate an issue?
Also, are you building using the Makefile, or running a go build command?
Let me do some testing on our end and see what I can dig up.

@bitcard
Copy link
Author

bitcard commented Dec 28, 2020

we haven't tested cave on MacOS yet, so this is uncharted territory for us. Theoretically it should work, but sometimes there's little things that need changed between Linux and MacOS. Are you getting any output during the build process that might indicate an issue?
Also, are you building using the Makefile, or running a go build command?
Let me do some testing on our end and see what I can dig up.

I build with make build. first I build success. but build it fail just now. the follow error:

CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o cave .
go: finding module for package github.com/libp2p/go-libp2p-net
go: finding module for package github.com/libp2p/go-libp2p-host
go: finding module for package github.com/libp2p/go-libp2p-crypto
go: finding module for package github.com/libp2p/go-libp2p
go: finding module for package github.com/libp2p/go-libp2p-kad-dht/opts
go: finding module for package github.com/libp2p/go-libp2p-peer
go: finding module for package github.com/libp2p/go-libp2p-kad-dht
go: downloading golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
go: downloading go.uber.org/zap v1.13.0
go: downloading go.uber.org/atomic v1.5.1
go: downloading go.uber.org/multierr v1.3.0
go: finding module for package github.com/libp2p/go-libp2p-peerstore
go: found github.com/libp2p/go-libp2p in github.com/libp2p/go-libp2p v0.13.0
go: found github.com/libp2p/go-libp2p-crypto in github.com/libp2p/go-libp2p-crypto v0.1.0
go: found github.com/libp2p/go-libp2p-host in github.com/libp2p/go-libp2p-host v0.1.0
go: found github.com/libp2p/go-libp2p-kad-dht in github.com/libp2p/go-libp2p-kad-dht v0.11.1
go: found github.com/libp2p/go-libp2p-net in github.com/libp2p/go-libp2p-net v0.1.0
go: found github.com/libp2p/go-libp2p-peer in github.com/libp2p/go-libp2p-peer v0.2.0
go: found github.com/libp2p/go-libp2p-peerstore in github.com/libp2p/go-libp2p-peerstore v0.2.6
# github.com/libp2p/go-libp2p-net
../../../tools/go/pkg/mod/github.com/libp2p/[email protected]/deprecated.go:94:18: undefined: helpers.EOFTimeout
../../../tools/go/pkg/mod/github.com/libp2p/[email protected]/deprecated.go:97:22: undefined: helpers.ErrExpectedEOF
../../../tools/go/pkg/mod/github.com/libp2p/[email protected]/deprecated.go:101:9: undefined: helpers.FullClose
../../../tools/go/pkg/mod/github.com/libp2p/[email protected]/deprecated.go:106:9: undefined: helpers.AwaitEOF
make: *** [build] Error 2

use go build is same error.

@peterfraedrich peterfraedrich self-assigned this Dec 29, 2020
@peterfraedrich peterfraedrich added the bug Something isn't working label Dec 29, 2020
@peterfraedrich
Copy link
Contributor

@bitcard im going to look into this further; thanks for providing the above info

@bitcard
Copy link
Author

bitcard commented Dec 29, 2020

@bitcard im going to look into this further; thanks for providing the above info

maybe libp2p version change cause this error. it use libp2p v0.13.0

@peterfraedrich peterfraedrich removed their assignment Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants