Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#78256 - [nomad] SIGSEGV on nomad plan

Attached to Project: Community Packages
Opened by Phillip Schichtel (pschichtel) - Tuesday, 18 April 2023, 18:26 GMT
Last edited by Toolybird (Toolybird) - Friday, 19 May 2023, 22:45 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

While the nomad plan command generally works, it crashes with a SIGSEGV at the end, bash -x output:

+ nomad job plan --diff=false some.nomad
Scheduler dry-run:
- All tasks successfully allocated.

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

goroutine 1 [running]:
github.com/hashicorp/nomad/command.getExitCode(...)
/build/nomad/src/nomad/command/job_plan.go:394
github.com/hashicorp/nomad/command.(*JobPlanCommand).outputPlannedJob(0xc000936200, 0xc0001849c0?, 0xc0004aaf60, 0xb0?, 0x93?)
/build/nomad/src/nomad/command/job_plan.go:327 +0x2f3
github.com/hashicorp/nomad/command.(*JobPlanCommand).Run(0xc000936200, {0xc00012c030, 0x2, 0x2})
/build/nomad/src/nomad/command/job_plan.go:265 +0xcb0
github.com/mitchellh/cli.(*CLI).Run(0xc000928000)
/build/nomad/src/pkg/mod/github.com/mitchellh/cli@v1.1.5/cli.go:262 +0x5f8
main.Run({0xc00012c010, 0x4, 0x4})
/build/nomad/src/nomad/main.go:107 +0x28a
main.main()
/build/nomad/src/nomad/main.go:77 +0x4e
+ exit_code=2

The plan did indeed happen, but apparently it crashed when trying to determine the exit code.

Additional info:
* package version: 1.5.3-1

Steps to reproduce:
1. setup local single-node consul
2. setup local single-node nomad
3. write simple job file
4. run `nomad plan job.nomad`
This task depends upon

Closed by  Toolybird (Toolybird)
Friday, 19 May 2023, 22:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  nomad 1.5.5-1
Comment by Toolybird (Toolybird) - Tuesday, 18 April 2023, 21:50 GMT
It sounds like an upstream problem. Have you reported it there? When it crashes with sigsegv, are you able to get a backtrace using gdb automatic download [1]?

[1] https://wiki.archlinux.org/title/Debugging/Getting_traces#Debuginfod
Comment by Phillip Schichtel (pschichtel) - Wednesday, 19 April 2023, 15:42 GMT
I just created an upstream issue: https://github.com/hashicorp/nomad/issues/16939

I originally thought it's an arch-specific issue, but I don't think that anymore.
Do we really expect to get more information from gdb compared to the stacktrace with files and line numbers go already printed?

Loading...