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

fix some netns ls command errors #9

Merged
merged 3 commits into from
Sep 6, 2018

Conversation

lifubang
Copy link
Contributor

@lifubang lifubang commented Aug 6, 2018

Before the commit eec8db6 :

netns ls command always return:

no networks found

Because without openDB, the db field is always nil.

After fix this error, there'll be new errors:

unexpected fault address 0x7efdcdab7070
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x1 addr=0x7efdcdab7070 pc=0x4f3ee8]

goroutine 1 [running]:
runtime.throw(0x6ddfa4, 0x5)
	/opt/go/src/runtime/panic.go:616 +0x81 fp=0xc420053ab8 sp=0xc420053a98 pc=0x42b061
runtime.sigpanic()
	/opt/go/src/runtime/signal_unix.go:395 +0x211 fp=0xc420053b08 sp=0xc420053ab8 pc=0x43f611
net.IP.String(0x7efdcdab7070, 0x4, 0x4, 0x1, 0x1)
	/opt/go/src/net/ip.go:278 +0x3c8 fp=0xc420053c40 sp=0xc420053b08 pc=0x4f3ee8
main.(*listCommand).Run(0x87d718, 0x712640, 0xc42007eae0, 0xc420090000, 0x0, 0x0, 0x3, 0x6)
	/root/gocode/src/github.com/genuinetools/netns/list.go:33 +0x1ba fp=0xc420053dc0 sp=0xc420053c40 pc=0x644c4a
github.com/genuinetools/netns/vendor/github.com/genuinetools/pkg/cli.(*Program).run(0xc4200c4000, 0x712640, 0xc42007eae0, 0xc420090000, 0x2, 0x2, 0x712640, 0xc42007eae0, 0x4120e8)
	/root/gocode/src/github.com/genuinetools/netns/vendor/github.com/genuinetools/pkg/cli/cli.go:173 +0x365 fp=0xc420053e78 sp=0xc420053dc0 pc=0x642715
github.com/genuinetools/netns/vendor/github.com/genuinetools/pkg/cli.(*Program).Run(0xc4200c4000)
	/root/gocode/src/github.com/genuinetools/netns/vendor/github.com/genuinetools/pkg/cli/cli.go:88 +0x170 fp=0xc420053f18 sp=0xc420053e78 pc=0x642240
main.main()
	/root/gocode/src/github.com/genuinetools/netns/main.go:126 +0x4a1 fp=0xc420053f88 sp=0xc420053f18 pc=0x645311
runtime.main()
	/opt/go/src/runtime/proc.go:198 +0x212 fp=0xc420053fe0 sp=0xc420053f88 pc=0x42c8d2
runtime.goexit()
	/opt/go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420053fe8 sp=0xc420053fe0 pc=0x456761

Because n.IP address is lost. The commit 7f2448b is aim to fix this error.

After fix:
netns ls

IP                  LOCAL VETH          PID                 STATUS              NS FD
172.19.0.2          netnsv0-1116        1116                running             5

@codecov
Copy link

codecov bot commented Aug 6, 2018

Codecov Report

Merging #9 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #9   +/-   ##
=======================================
  Coverage   48.52%   48.52%           
=======================================
  Files           5        5           
  Lines         272      272           
=======================================
  Hits          132      132           
  Misses         98       98           
  Partials       42       42
Impacted Files Coverage Δ
network/list.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d3c817...0d2bd97. Read the comment docs.

@jessfraz
Copy link
Collaborator

jessfraz commented Sep 6, 2018

thanks!

@jessfraz jessfraz merged commit 01e3a70 into genuinetools:master Sep 6, 2018
@lifubang
Copy link
Contributor Author

@jessfraz for opencontainers/runc#201 (comment)
Shall we need to make a new release? Or else lots of body like me will meet the same error.
Thank you.

@alexellis
Copy link

cc - I also ran into this issue and was kind of confused, also with issues disabled what's the best way to provide feedback on bugs @jessfraz ?

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

Successfully merging this pull request may close these issues.

3 participants