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

Segfault merging client configs #2280

Closed
dbresson opened this issue Feb 3, 2017 · 1 comment · Fixed by #2281
Closed

Segfault merging client configs #2280

dbresson opened this issue Feb 3, 2017 · 1 comment · Fixed by #2281

Comments

@dbresson
Copy link

dbresson commented Feb 3, 2017

Nomad version

Occurs in Nomad v0.5.4. Error below is from v0.5.2.

Operating system and Environment details

Ubuntu 14.04

Issue

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4bc7e6]

goroutine 1 [running]:
panic(0xfc0620, 0xc420012050)
/opt/go/src/runtime/panic.go:500 +0x1a1
github.com/hashicorp/nomad/command/agent.(*ClientConfig).Merge(0xc4200f5a20, 0xc4200f5ad0, 0x1133dcc)
/opt/gopath/src/github.com/hashicorp/nomad/command/agent/config.go:883 +0x816
github.com/hashicorp/nomad/command/agent.(*Config).Merge(0xc4200938c0, 0xc420093a20, 0x0)
/opt/gopath/src/github.com/hashicorp/nomad/command/agent/config.go:600 +0x147b
github.com/hashicorp/nomad/command/agent.LoadConfigDir(0x7ffc39f2cf5a, 0x11, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/nomad/command/agent/config.go:1166 +0x903
github.com/hashicorp/nomad/command/agent.LoadConfig(0x7ffc39f2cf5a, 0x11, 0x1, 0x1, 0x0)
/opt/gopath/src/github.com/hashicorp/nomad/command/agent/config.go:1085 +0x9b
github.com/hashicorp/nomad/command/agent.(*Command).readConfig(0xc42007f900, 0xc420056e70)
/opt/gopath/src/github.com/hashicorp/nomad/command/agent/command.go:165 +0x12aa
github.com/hashicorp/nomad/command/agent.(*Command).Run(0xc42007f900, 0xc42000c110, 0x1, 0x1, 0x0)
/opt/gopath/src/github.com/hashicorp/nomad/command/agent/command.go:420 +0x16d
github.com/hashicorp/nomad/vendor/github.com/mitchellh/cli.(*CLI).Run(0xc4200ce0c0, 0xc4200ce0c0, 0x19, 0xc4200c3920)
/opt/gopath/src/github.com/hashicorp/nomad/vendor/github.com/mitchellh/cli/cli.go:153 +0x330
main.RunCustom(0xc42000c100, 0x2, 0x2, 0xc4201164e0, 0x0)
/opt/gopath/src/github.com/hashicorp/nomad/main.go:55 +0x7a1
main.Run(0xc42000c100, 0x2, 0x2, 0xc4200001a0)
/opt/gopath/src/github.com/hashicorp/nomad/main.go:20 +0x56
main.main()
/opt/gopath/src/github.com/hashicorp/nomad/main.go:16 +0x66

Reproduction steps

I had 1 config file with just enabled = true for the client block, with another config file that loaded after that with the reserved block inside the client block setting a reserved port range. Adding an empty reserved block to the first config file fixed the issue.

@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 Dec 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant