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

Specifying a non-existent job version causes SEGV in nomad CLI #4542

Closed
Jeff-Hanson opened this issue Jul 31, 2018 · 2 comments
Closed

Specifying a non-existent job version causes SEGV in nomad CLI #4542

Jeff-Hanson opened this issue Jul 31, 2018 · 2 comments

Comments

@Jeff-Hanson
Copy link

Jeff-Hanson commented Jul 31, 2018

If you have a question, prepend your issue with [question] or preferably use the nomad mailing list.

If filing a bug please include the following:

Nomad version

Output from nomad version
09:36 $ nomad version
Nomad v0.8.4

Operating system and Environment details

OSX 10.12.6

Issue

When running 'nomad job history -full -version bad-version job-name' using the CLI I get:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x100 pc=0x50d59a5]

goroutine 1 [running]:
github.com/hashicorp/nomad/command.(*JobHistoryCommand).formatJobVersion(0xc420514790, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0)
/private/tmp/nomad-20180611-50613-t48b0m/nomad-0.8.4/src/github.com/hashicorp/nomad/command/job_history.go:252 +0x45
github.com/hashicorp/nomad/command.(*JobHistoryCommand).Run(0xc420514790, 0xc4200f0030, 0x4, 0x4, 0xc4202b6b40)
/private/tmp/nomad-20180611-50613-t48b0m/nomad-0.8.4/src/github.com/hashicorp/nomad/command/job_history.go:185 +0xc1d
github.com/hashicorp/nomad/vendor/github.com/mitchellh/cli.(*CLI).Run(0xc42012d2c0, 0xc42012d2c0, 0xc420511ca0, 0xc)
/private/tmp/nomad-20180611-50613-t48b0m/nomad-0.8.4/src/github.com/hashicorp/nomad/vendor/github.com/mitchellh/cli/cli.go:255 +0x1eb
main.RunCustom(0xc4200f0010, 0x6, 0x6, 0xc4204e9f68)
/private/tmp/nomad-20180611-50613-t48b0m/nomad-0.8.4/src/github.com/hashicorp/nomad/main.go:127 +0x4b4
main.Run(0xc4200f0010, 0x6, 0x6, 0xc4200c6058)
/private/tmp/nomad-20180611-50613-t48b0m/nomad-0.8.4/src/github.com/hashicorp/nomad/main.go:72 +0x3f
main.main()
/private/tmp/nomad-20180611-50613-t48b0m/nomad-0.8.4/src/github.com/hashicorp/nomad/main.go:68 +0x63

Reproduction steps

Execute 'nomad job history -full -version bad-version job-name' with a job version that doesn't exist.

Nomad Server logs (if appropriate)

NA

Nomad Client logs (if appropriate)

NA

Job file (if appropriate)

NA

@preetapan
Copy link
Contributor

Thanks for the bug report @Jeff-Hanson, was able to repro this. We'll fix this in the upcoming release.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants