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

[bug] pouch logs panic #1105

Closed
Letty5411 opened this issue Apr 11, 2018 · 3 comments
Closed

[bug] pouch logs panic #1105

Letty5411 opened this issue Apr 11, 2018 · 3 comments
Assignees
Labels
areas/log kind/bug This is bug report for project kind/panic priority/P1 this is high priority that all maintainers should stop to handle this issue

Comments

@Letty5411
Copy link
Contributor

Ⅰ. Issue Description

pouch client panic.

Ⅱ. Describe what happened

#pouch run -d busybox echo test
de57d25e2e37a97b4300cd5839d27895398d1ac8d7c8de3d2e0b51d807f8e44a

#pouch logs de57d25e2e37a97b4300cd5839d27895398d1ac8d7c8de3d2e0b51d807f8e44a
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xe8683d]

goroutine 1 [running]:
main.(*LogsCommand).runLogs(0xc4204d4540, 0xc4204eb8a0, 0x1, 0x1, 0x0, 0x0)
	/tmp/pouchbuild/src/github.com/alibaba/pouch/cli/logs.go:71 +0xfd
main.(*LogsCommand).Init.func1(0xc4200ee900, 0xc4204eb8a0, 0x1, 0x1, 0x0, 0x0)
	/tmp/pouchbuild/src/github.com/alibaba/pouch/cli/logs.go:40 +0x48
github.com/alibaba/pouch/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200ee900, 0xc4204eb870, 0x1, 0x1, 0xc4200ee900, 0xc4204eb870)
	/tmp/pouchbuild/src/github.com/alibaba/pouch/vendor/github.com/spf13/cobra/command.go:742 +0x49b
github.com/alibaba/pouch/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4202686c0, 0xc42028ded0, 0x1, 0x1)
	/tmp/pouchbuild/src/github.com/alibaba/pouch/vendor/github.com/spf13/cobra/command.go:827 +0x30e
github.com/alibaba/pouch/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4202686c0, 0x1, 0xc4204eb800)
	/tmp/pouchbuild/src/github.com/alibaba/pouch/vendor/github.com/spf13/cobra/command.go:780 +0x2b
main.(*Cli).Run(0xc42058ec80, 0x16486e0, 0xc4204eadf0)
	/tmp/pouchbuild/src/github.com/alibaba/pouch/cli/cli.go:78 +0x2f
main.main()
	/tmp/pouchbuild/src/github.com/alibaba/pouch/cli/main.go:49 +0x96c

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • pouch version (use pouch version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@pouchrobot pouchrobot added areas/log kind/bug This is bug report for project kind/panic priority/P1 this is high priority that all maintainers should stop to handle this issue labels Apr 11, 2018
@Letty5411
Copy link
Contributor Author

Letty5411 commented Apr 11, 2018

It seems that panic here:

if !validDrivers[c.HostConfig.LogConfig.Type] {
		return fmt.Errorf("\"logs\" command is supported only for \"json-file\" and \"journald\" logging drivers (got; %s)", c.HostConfig.LogConfig.Type)
	}

@oiooj
Copy link
Contributor

oiooj commented Apr 25, 2018

@Letty5411 Could you help me close this issue manually? I forgot to reference this before #1192 merged. Sorry about that.

@HusterWan
Copy link
Contributor

resolved by #1192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/log kind/bug This is bug report for project kind/panic priority/P1 this is high priority that all maintainers should stop to handle this issue
Projects
None yet
Development

No branches or pull requests

4 participants