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

SIGSEGV on notary cli binary #1037

Closed
jsoler opened this issue Nov 15, 2016 · 4 comments
Closed

SIGSEGV on notary cli binary #1037

jsoler opened this issue Nov 15, 2016 · 4 comments

Comments

@jsoler
Copy link

jsoler commented Nov 15, 2016

Hi,

I've been trying to run any command with notary client but I always get SIGSEGV error. Here are my environment details and what error show up:

[root@ tmp]#cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

[root@ tmp]#notary -D version
notary
Version: 0.4.2
Git commit: c8aa8cf

[root@ tmp]# notary -D list docker/dtr
DEBU[0000] Configuration file not found, using defaults
DEBU[0000] Using the following trust directory: /root/.notary
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x0]

runtime stack:
runtime.throw(0x9ae407, 0x2a)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.sigpanic()
/usr/local/go/src/runtime/sigpanic_unix.go:12 +0x2cc

goroutine 10 [syscall, locked to thread]:
runtime.cgocall(0x8024b0, 0xc4200255f8, 0xc400000000)
/usr/local/go/src/runtime/cgocall.go:131 +0x110 fp=0xc4200255b0 sp=0xc420025570
net._C2func_getaddrinfo(0x14c0c00, 0x0, 0xc4202c4d50, 0xc4200263d8, 0x0, 0x0, 0x0)
??:0 +0x68 fp=0xc4200255f8 sp=0xc4200255b0
net.cgoLookupIPCNAME(0xc42026b168, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/cgo_unix.go:146 +0x37c fp=0xc420025718 sp=0xc4200255f8
net.cgoIPLookup(0xc420221740, 0xc42026b168, 0xd)
/usr/local/go/src/net/cgo_unix.go:198 +0x4d fp=0xc4200257a8 sp=0xc420025718
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200257b0 sp=0xc4200257a8
created by net.cgoLookupIP
/usr/local/go/src/net/cgo_unix.go:208 +0xb4

goroutine 1 [select]:
net/http.(*Transport).getConn(0xc4200ca870, 0xc42026b200, 0x0, 0xc42026b160, 0x5, 0xc42026b168, 0x12, 0x0, 0x0, 0x9504c0)
/usr/local/go/src/net/http/transport.go:890 +0x9cc
net/http.(*Transport).RoundTrip(0xc4200ca870, 0xc4200cab40, 0xc4200cab40, 0xc4202c47b0, 0xc4202550c0)
/usr/local/go/src/net/http/transport.go:367 +0x307
github.com/docker/notary/vendor/github.com/docker/distribution/registry/client/transport.(*transport).RoundTrip(0xc420255080, 0xc4200caa50, 0xc420255080, 0xecfbcc130, 0xc42894c8e4)
/go/src/github.com/docker/notary/vendor/github.com/docker/distribution/registry/client/transport/transport.go:62 +0x106
net/http.send(0xc4200ca960, 0xe04160, 0xc420255080, 0xecfbcc130, 0x2894c8e4, 0xe27900, 0x8, 0xc4200263b0, 0x42c2a8)
/usr/local/go/src/net/http/client.go:256 +0x15f
net/http.(*Client).send(0xc4201b9990, 0xc4200ca960, 0xecfbcc130, 0x2894c8e4, 0xe27900, 0xc4200263b0, 0x0, 0x1)
/usr/local/go/src/net/http/client.go:146 +0x102
net/http.(*Client).doFollowingRedirects(0xc4201b9990, 0xc4200ca960, 0x9e6c88, 0x3, 0x1, 0xc42026b160)
/usr/local/go/src/net/http/client.go:528 +0x5e5
net/http.(*Client).Do(0xc4201b9990, 0xc4200ca960, 0xc42026b160, 0x1e, 0x0)
/usr/local/go/src/net/http/client.go:184 +0x1ea
main.tokenAuth(0x9a43f2, 0x1a, 0xc4200ca870, 0x7ffce509f7b0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/docker/notary/cmd/notary/tuf.go:889 +0x433
main.getTransport(0xc4200d1790, 0x7ffce509f7b0, 0xa, 0x0, 0x0, 0xc420292c55, 0xc4201b9bc8, 0x6e0d08)
/go/src/github.com/docker/notary/cmd/notary/tuf.go:861 +0x4f4
main.(*tufCommander).tufList(0xc4200f7c30, 0xc4202bfa00, 0xc42026ad40, 0x1, 0x2, 0x0, 0x0)
/go/src/github.com/docker/notary/cmd/notary/tuf.go:479 +0xae
main.(*tufCommander).(main.tufList)-fm(0xc4202bfa00, 0xc42026ad40, 0x1, 0x2, 0x0, 0x0)
/go/src/github.com/docker/notary/cmd/notary/tuf.go:146 +0x52
github.com/docker/notary/vendor/github.com/spf13/cobra.(*Command).execute(0xc4202bfa00, 0xc42026abe0, 0x2, 0x2, 0xc4202bfa00, 0xc42026abe0)
/go/src/github.com/docker/notary/vendor/github.com/spf13/cobra/command.go:561 +0x20c
github.com/docker/notary/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4200cd200, 0x0, 0x0, 0x0)
/go/src/github.com/docker/notary/vendor/github.com/spf13/cobra/command.go:651 +0x367
github.com/docker/notary/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4200cd200, 0xc4200cd200, 0xffffffffffffffff)
/go/src/github.com/docker/notary/vendor/github.com/spf13/cobra/command.go:610 +0x2b
main.main()
/go/src/github.com/docker/notary/cmd/notary/main.go:200 +0x82

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1

goroutine 5 [syscall]:
os/signal.signal_recv(0x0)
/usr/local/go/src/runtime/sigqueue.go:116 +0x157
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.1
/usr/local/go/src/os/signal/signal_unix.go:28 +0x41

goroutine 7 [select]:
net/http.setRequestCancel.func4(0x0, 0xc4202c47b0, 0xc4202550c0, 0xc4202212c0)
/usr/local/go/src/net/http/client.go:329 +0x15a
created by net/http.setRequestCancel
/usr/local/go/src/net/http/client.go:337 +0x29f

goroutine 8 [select]:
net.lookupIPContext(0xe0a720, 0xc420221680, 0xc42026b168, 0xd, 0x0, 0x0, 0x0, 0x0, 0x35874b07d226)
/usr/local/go/src/net/lookup.go:122 +0x7bc
net.internetAddrList(0xe0a720, 0xc420221680, 0x99546f, 0x3, 0xc42026b168, 0x12, 0x0, 0x0, 0x0, 0xecfbcc12b, ...)
/usr/local/go/src/net/ipsock.go:241 +0x5e0
net.resolveAddrList(0xe0a720, 0xc420221680, 0x99596d, 0x4, 0x99546f, 0x3, 0xc42026b168, 0x12, 0x0, 0x0, ...)
/usr/local/go/src/net/dial.go:179 +0x106
net.(*Dialer).DialContext(0xc4201f2c30, 0xe0a6e0, 0xc4200124b8, 0x99546f, 0x3, 0xc42026b168, 0x12, 0x0, 0x0, 0x0, ...)
/usr/local/go/src/net/dial.go:329 +0x238
net.(*Dialer).Dial(0xc4201f2c30, 0x99546f, 0x3, 0xc42026b168, 0x12, 0xe28801, 0x1000000000010, 0x100, 0x100)
/usr/local/go/src/net/dial.go:282 +0x75
net.(*Dialer).Dial-fm(0x99546f, 0x3, 0xc42026b168, 0x12, 0x60, 0x0, 0xc420293101, 0xc4202215c0)
/go/src/github.com/docker/notary/cmd/notary/tuf.go:855 +0x52
net/http.(*Transport).dial(0xc4200ca870, 0xe0a6e0, 0xc4200124b8, 0x99546f, 0x3, 0xc42026b168, 0x12, 0x0, 0x0, 0x0, ...)
/usr/local/go/src/net/http/transport.go:829 +0x7b
net/http.(*Transport).dialConn(0xc4200ca870, 0xe0a6e0, 0xc4200124b8, 0x0, 0xc42026b160, 0x5, 0xc42026b168, 0x12, 0x0, 0x0, ...)
/usr/local/go/src/net/http/transport.go:967 +0x1a86
net/http.(*Transport).getConn.func4(0xc4200ca870, 0xe0a6e0, 0xc4200124b8, 0xc4202c4840, 0xc420221380)
/usr/local/go/src/net/http/transport.go:885 +0x78
created by net/http.(*Transport).getConn
/usr/local/go/src/net/http/transport.go:887 +0x3a1

goroutine 9 [select]:
net.cgoLookupIP(0xe0a720, 0xc420221680, 0xc42026b168, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/cgo_unix.go:209 +0x2f5
net.lookupIP(0xe0a720, 0xc420221680, 0xc42026b168, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/lookup_unix.go:70 +0xf9
net.glob..func11(0xe0a720, 0xc420221680, 0x9e6b10, 0xc42026b168, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/hook.go:19 +0x52
net.lookupIPContext.func1(0xc420025788, 0x593948, 0xc4200ca870, 0xe0a6e0)
/usr/local/go/src/net/lookup.go:119 +0x5c
internal/singleflight.(*Group).doCall(0xe26a10, 0xc4201f2d70, 0xc42026b168, 0xd, 0xc4202c4900)
/usr/local/go/src/internal/singleflight/singleflight.go:93 +0x3c
created by internal/singleflight.(*Group).DoChan
/usr/local/go/src/internal/singleflight/singleflight.go:86 +0x339

Regards

@HuKeping
Copy link
Contributor

ping @riyazdf seems like a duplicate with #1022

@jsoler
Copy link
Author

jsoler commented Nov 15, 2016

Well I detect that if I skip server url it fail:

[root@rm tmp]# notary -s https://notary.docker.io -d ~/.docker/trust list jsoler/debian

  • fatal: notary.docker.io does not have trust data for jsoler/debian

[root@rm tmp]# notary -d ~/.docker/trust list jsoler/debian
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x0]

runtime stack:
runtime.throw(0x9ae407, 0x2a)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.sigpanic()
/usr/local/go/src/runtime/sigpanic_unix.go:12 +0x2cc

goroutine 10 [syscall, locked to thread]:
runtime.cgocall(0x8024b0, 0xc4200275f8, 0xc400000000)
/usr/local/go/src/runtime/cgocall.go:131 +0x110 fp=0xc4200275b0 sp=0xc420027570
net._C2func_getaddrinfo(0x2764c00, 0x0, 0xc4202c8c60, 0xc4200283d8, 0x0, 0x0, 0x0)
??:0 +0x68 fp=0xc4200275f8 sp=0xc4200275b0
net.cgoLookupIPCNAME(0xc42026f0e8, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/cgo_unix.go:146 +0x37c fp=0xc420027718 sp=0xc4200275f8
net.cgoIPLookup(0xc420227740, 0xc42026f0e8, 0xd)
/usr/local/go/src/net/cgo_unix.go:198 +0x4d fp=0xc4200277a8 sp=0xc420027718
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200277b0 sp=0xc4200277a8
created by net.cgoLookupIP
/usr/local/go/src/net/cgo_unix.go:208 +0xb4

goroutine 1 [select]:
net/http.(_Transport).getConn(0xc4200d0870, 0xc42026f180, 0x0, 0xc42026f0e0, 0x5, 0xc42026f0e8, 0x12, 0x0, 0x0, 0x9504c0)
/usr/local/go/src/net/http/transport.go:890 +0x9cc
net/http.(_Transport).RoundTrip(0xc4200d0870, 0xc4200d0b40, 0xc4200d0b40, 0xc4202c8690, 0xc420264f80)
/usr/local/go/src/net/http/transport.go:367 +0x307
github.com/docker/notary/vendor/github.com/docker/distribution/registry/client/transport.(_transport).RoundTrip(0xc420264f40, 0xc4200d0a50, 0xc420264f40, 0xecfbcc7b1, 0xc4366edada)
/go/src/github.com/docker/notary/vendor/github.com/docker/distribution/registry/client/transport/transport.go:62 +0x106
net/http.send(0xc4200d0960, 0xe04160, 0xc420264f40, 0xecfbcc7b1, 0x366edada, 0xe27900, 0x8, 0xc4200283b0, 0x42c2a8)
/usr/local/go/src/net/http/client.go:256 +0x15f
net/http.(_Client).send(0xc4201bf990, 0xc4200d0960, 0xecfbcc7b1, 0x366edada, 0xe27900, 0xc4200283b0, 0x0, 0x1)
/usr/local/go/src/net/http/client.go:146 +0x102
net/http.(_Client).doFollowingRedirects(0xc4201bf990, 0xc4200d0960, 0x9e6c88, 0x3, 0x1, 0xc42026f0e0)
/usr/local/go/src/net/http/client.go:528 +0x5e5
net/http.(_Client).Do(0xc4201bf990, 0xc4200d0960, 0xc42026f0e0, 0x1e, 0x0)
/usr/local/go/src/net/http/client.go:184 +0x1ea
main.tokenAuth(0x9a43f2, 0x1a, 0xc4200d0870, 0x7ffd1f5c57ad, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/docker/notary/cmd/notary/tuf.go:889 +0x433
main.getTransport(0xc4200d7ad0, 0x7ffd1f5c57ad, 0xd, 0x0, 0x0, 0xc420298c45, 0xc4201bfbc8, 0x6e0d08)
/go/src/github.com/docker/notary/cmd/notary/tuf.go:861 +0x4f4
main.(_tufCommander).tufList(0xc4200fda20, 0xc4202c5a00, 0xc4202c8180, 0x1, 0x3, 0x0, 0x0)
/go/src/github.com/docker/notary/cmd/notary/tuf.go:479 +0xae
main.(_tufCommander).(main.tufList)-fm(0xc4202c5a00, 0xc4202c8180, 0x1, 0x3, 0x0, 0x0)
/go/src/github.com/docker/notary/cmd/notary/tuf.go:146 +0x52
github.com/docker/notary/vendor/github.com/spf13/cobra.(_Command).execute(0xc4202c5a00, 0xc420264cc0, 0x3, 0x4, 0xc4202c5a00, 0xc420264cc0)
/go/src/github.com/docker/notary/vendor/github.com/spf13/cobra/command.go:561 +0x20c
github.com/docker/notary/vendor/github.com/spf13/cobra.(_Command).ExecuteC(0xc4200d3200, 0x0, 0x0, 0x0)
/go/src/github.com/docker/notary/vendor/github.com/spf13/cobra/command.go:651 +0x367
github.com/docker/notary/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4200d3200, 0xc4200d3200, 0xffffffffffffffff)
/go/src/github.com/docker/notary/vendor/github.com/spf13/cobra/command.go:610 +0x2b
main.main()
/go/src/github.com/docker/notary/cmd/notary/main.go:200 +0x82

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1

goroutine 5 [syscall]:
os/signal.signal_recv(0x0)
/usr/local/go/src/runtime/sigqueue.go:116 +0x157
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.1
/usr/local/go/src/os/signal/signal_unix.go:28 +0x41

goroutine 7 [select]:
net/http.setRequestCancel.func4(0x0, 0xc4202c8690, 0xc420264f80, 0xc4202272c0)
/usr/local/go/src/net/http/client.go:329 +0x15a
created by net/http.setRequestCancel
/usr/local/go/src/net/http/client.go:337 +0x29f

goroutine 8 [select]:
net.lookupIPContext(0xe0a720, 0xc420227680, 0xc42026f0e8, 0xd, 0x0, 0x0, 0x0, 0x0, 0x370b029d9085)
/usr/local/go/src/net/lookup.go:122 +0x7bc
net.internetAddrList(0xe0a720, 0xc420227680, 0x99546f, 0x3, 0xc42026f0e8, 0x12, 0x0, 0x0, 0x0, 0xecfbcc7ac, ...)
/usr/local/go/src/net/ipsock.go:241 +0x5e0
net.resolveAddrList(0xe0a720, 0xc420227680, 0x99596d, 0x4, 0x99546f, 0x3, 0xc42026f0e8, 0x12, 0x0, 0x0, ...)
/usr/local/go/src/net/dial.go:179 +0x106
net.(_Dialer).DialContext(0xc4201f8c80, 0xe0a6e0, 0xc4200124b8, 0x99546f, 0x3, 0xc42026f0e8, 0x12, 0x0, 0x0, 0x0, ...)
/usr/local/go/src/net/dial.go:329 +0x238
net.(_Dialer).Dial(0xc4201f8c80, 0x99546f, 0x3, 0xc42026f0e8, 0x12, 0xe288c0, 0x10, 0x100, 0x100)
/usr/local/go/src/net/dial.go:282 +0x75
net.(_Dialer).Dial-fm(0x99546f, 0x3, 0xc42026f0e8, 0x12, 0x60, 0x0, 0xc420299101, 0xc4202275c0)
/go/src/github.com/docker/notary/cmd/notary/tuf.go:855 +0x52
net/http.(_Transport).dial(0xc4200d0870, 0xe0a6e0, 0xc4200124b8, 0x99546f, 0x3, 0xc42026f0e8, 0x12, 0x0, 0x0, 0x0, ...)
/usr/local/go/src/net/http/transport.go:829 +0x7b
net/http.(_Transport).dialConn(0xc4200d0870, 0xe0a6e0, 0xc4200124b8, 0x0, 0xc42026f0e0, 0x5, 0xc42026f0e8, 0x12, 0x0, 0x0, ...)
/usr/local/go/src/net/http/transport.go:967 +0x1a86
net/http.(_Transport).getConn.func4(0xc4200d0870, 0xe0a6e0, 0xc4200124b8, 0xc4202c8720, 0xc420227380)
/usr/local/go/src/net/http/transport.go:885 +0x78
created by net/http.(*Transport).getConn
/usr/local/go/src/net/http/transport.go:887 +0x3a1

goroutine 9 [select]:
net.cgoLookupIP(0xe0a720, 0xc420227680, 0xc42026f0e8, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/cgo_unix.go:209 +0x2f5
net.lookupIP(0xe0a720, 0xc420227680, 0xc42026f0e8, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/lookup_unix.go:70 +0xf9
net.glob..func11(0xe0a720, 0xc420227680, 0x9e6b10, 0xc42026f0e8, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/hook.go:19 +0x52
net.lookupIPContext.func1(0xc420027788, 0x593948, 0xc4200d0870, 0xe0a6e0)
/usr/local/go/src/net/lookup.go:119 +0x5c
internal/singleflight.(_Group).doCall(0xe26a10, 0xc4201f8dc0, 0xc42026f0e8, 0xd, 0xc4202c8810)
/usr/local/go/src/internal/singleflight/singleflight.go:93 +0x3c
created by internal/singleflight.(_Group).DoChan
/usr/local/go/src/internal/singleflight/singleflight.go:86 +0x339

@riyazdf
Copy link
Contributor

riyazdf commented Nov 17, 2016

@HuKeping is right that this is a duplicate of #1022 - which will be fixed for v0.4.3 and a future v0.5.1 by #1038 and #1039

@riyazdf riyazdf closed this as completed Nov 17, 2016
@jsoler
Copy link
Author

jsoler commented Nov 17, 2016

thanks @riyazdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants