nomad icon indicating copy to clipboard operation
nomad copied to clipboard

Nil dereference after 1.7.5 update

Open morphine1900 opened this issue 1 year ago • 4 comments
trafficstars

Nomad version

Output from nomad version 1.7.5

Operating system and Environment details

Linux amd64

Issue

Nil dereference on running job after updating to 1.7.5

Nomad Client logs (if appropriate)

nomad[11069]: \nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x5e\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).Process.func1()\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:83 +0x58\npanic({0x2a88140?, 0x4f5ea50?})\n\truntime/panic.go:914 +0x21f\ngithub.com/hashicorp/nomad/client/lib/numalib.(*Topology).UsableCores(...)\n\tgithub.com/hashicorp/nomad/client/lib/numalib/topology.go:258\ngithub.com/hashicorp/nomad/nomad/structs.(*NodeResources).Comparable(0xc00190e320)\n\tgithub.com/hashicorp/nomad/nomad/structs/structs.go:3185 +0xcc\ngithub.com/hashicorp/nomad/scheduler.(*Preemptor).SetNode(0xc00145b048, 0xc00148c600)\n\tgithub.com/hashicorp/nomad/scheduler/preemption.go:139 +0x36\ngithub.com/hashicorp/nomad/scheduler.(*BinPackIterator).Next(0xc000127810)\n\tgithub.com/hashicorp/nomad/scheduler/rank.go:274 +0x74d\ngithub.com/hashicorp/nomad/scheduler.(*ScoreNormalizationIterator).Next(0xc00066c1c0)\n\tgithub.com/hashicorp/nomad/scheduler/rank.go:816 +0x28\ngithub.com/hashicorp/nomad/scheduler.(*SystemStack).Select(0xc00191a880, 0xc001636a20, 0xc00145b790)\n\tgithub.com/hashicorp/nomad/scheduler/stack.go:362 +0x82e\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).computePlacements(0xc001d1c3c0, {0xc00191a980, 0x3, 0xb?})\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:374 +0x325\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).computeJobAllocs(0xc001d1c3c0)\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:322 +0xb85\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).process(0xc001d1c3c0)\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:163 +0x4da\ngithub.com/hashicorp/nomad/scheduler.retryMax(0x5, 0xc00145bd80, 0xc00145bd70)\n\tgithub.com/hashicorp/nomad/scheduler/util.go:96 +0x49\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).Process(0xc001d1c3c0, 0xc002200480)\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:108 +0x525\ngithub.com/hashicorp/nomad/nomad.(*Worker).invokeScheduler(0xc0012a76c0, 0xc001154420, 0xc002200480, {0xc001e6f7d0, 0x24})\n\tgithub.com/hashicorp/nomad/nomad/worker.go:634 +0x353\ngithub.com/hashicorp/nomad/nomad.(*Worker).run(0xc0012a76c0, 0x12a05f200)\n\tgithub.com/hashicorp/nomad/nomad/worker.go:463 +0x5a5\ncreated by github.com/hashicorp/nomad/nomad.(*Worker).Start in goroutine 1\n\tgithub.com/hashicorp/nomad/nomad/worker.go:162 +0x59\n","worker_id":"0b7cd3e0-f1d4-bab0-9843-e6eef610aa25"}
nomad[11069]: {"@level":"error","@message":"processing eval panicked scheduler - please report this as a bug!","@module":"worker.system_sched","@timestamp":"2024-07-20T00:08:01.615847Z","error":"runtime error: invalid memory address or nil pointer dereference","eval_id":"33a13e15-fa8c-c2b6-5437-272e0a5b9c0a","job_id":"m3hostfiles","namespace":"default","stack_trace":"goroutine 65 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x5e\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).Process.func1()\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:83 +0x58\npanic({0x2a88140?, 0x4f5ea50?})\n\truntime/panic.go:914 +0x21f\ngithub.com/hashicorp/nomad/client/lib/numalib.(*Topology).UsableCores(...)\n\tgithub.com/hashicorp/nomad/client/lib/numalib/topology.go:258\ngithub.com/hashicorp/nomad/nomad/structs.(*NodeResources).Comparable(0xc00190e320)\n\tgithub.com/hashicorp/nomad/nomad/structs/structs.go:3185 +0xcc\ngithub.com/hashicorp/nomad/scheduler.(*Preemptor).SetNode(0xc00145b048, 0xc00148c600)\n\tgithub.com/hashicorp/nomad/scheduler/preemption.go:139 +0x36\ngithub.com/hashicorp/nomad/scheduler.(*BinPackIterator).Next(0xc000127810)\n\tgithub.com/hashicorp/nomad/scheduler/rank.go:274 +0x74d\ngithub.com/hashicorp/nomad/scheduler.(*ScoreNormalizationIterator).Next(0xc00066c1c0)\n\tgithub.com/hashicorp/nomad/scheduler/rank.go:816 +0x28\ngithub.com/hashicorp/nomad/scheduler.(*SystemStack).Select(0xc00191a880, 0xc001636a20, 0xc00145b790)\n\tgithub.com/hashicorp/nomad/scheduler/stack.go:362 +0x82e\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).computePlacements(0xc001d1c3c0, {0xc00191a980, 0x3, 0xb?})\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:374 +0x325\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).computeJobAllocs(0xc001d1c3c0)\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:322 +0xb85\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).process(0xc001d1c3c0)\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:163 +0x4da\ngithub.com/hashicorp/nomad/scheduler.retryMax(0x5, 0xc00145bd80, 0xc00145bd70)\n\tgithub.com/hashicorp/nomad/scheduler/util.go:96 +0x49\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).Process(0xc001d1c3c0, 0xc002200480)\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:108 +0x525\ngithub.com/hashicorp/nomad/nomad.(*Worker).invokeScheduler(0xc0012a76c0, 0xc001154420, 0xc002200480, {0xc001e6f7d0, 0x24})\n\tgithub.com/hashicorp/nomad/nomad/worker.go:634 +0x353\ngithub.com/hashicorp/nomad/nomad.(*Worker).run(0xc0012a76c0, 0x12a05f200)\n\tgithub.com/hashicorp/nomad/nomad/worker.go:463 +0x5a5\ncreated by github.com/hashicorp/nomad/nomad.(*Worker).Start in goroutine 1\n\tgithub.com/hashicorp/nomad/nomad/worker.go:162 +0x59\n","worker_id":"0b7cd3e0-f1d4-bab0-9843-e6eef610aa25"}
nomad[11069]: {"@level":"error","@message":"error invoking scheduler","@module":"worker","@timestamp":"2024-07-20T00:08:01.616029Z","error":"failed to process evaluation: failed to process eval: runtime error: invalid memory address or nil pointer dereference","worker_id":"0b7cd3e0-f1d4-bab0-9843-e6eef610aa25"}
nomad[11069]: {"@level":"error","@message":"error invoking scheduler","@module":"worker","@timestamp":"2024-07-20T00:08:01.616029Z","error":"failed to process evaluation: failed to process eval: runtime error: invalid memory address or nil pointer dereference","worker_id":"0b7cd3e0-f1d4-bab0-9843-e6eef610aa25"}
nomad[11069]: \nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x5e\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).Process.func1()\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:83 +0x58\npanic({0x2a88140?, 0x4f5ea50?})\n\truntime/panic.go:914 +0x21f\ngithub.com/hashicorp/nomad/client/lib/numalib.(*Topology).UsableCores(...)\n\tgithub.com/hashicorp/nomad/client/lib/numalib/topology.go:258\ngithub.com/hashicorp/nomad/nomad/structs.(*NodeResources).Comparable(0xc00190e320)\n\tgithub.com/hashicorp/nomad/nomad/structs/structs.go:3185 +0xcc\ngithub.com/hashicorp/nomad/scheduler.(*Preemptor).SetNode(0xc00145b048, 0xc00148c600)\n\tgithub.com/hashicorp/nomad/scheduler/preemption.go:139 +0x36\ngithub.com/hashicorp/nomad/scheduler.(*BinPackIterator).Next(0xc00069e230)\n\tgithub.com/hashicorp/nomad/scheduler/rank.go:274 +0x74d\ngithub.com/hashicorp/nomad/scheduler.(*ScoreNormalizationIterator).Next(0xc000efcfa0)\n\tgithub.com/hashicorp/nomad/scheduler/rank.go:816 +0x28\ngithub.com/hashicorp/nomad/scheduler.(*SystemStack).Select(0xc002870d00, 0xc001636a20, 0xc00145b790)\n\tgithub.com/hashicorp/nomad/scheduler/stack.go:362 +0x82e\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).computePlacements(0xc00178a0c0, {0xc002870e00, 0x3, 0xb?})\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:374 +0x325\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).computeJobAllocs(0xc00178a0c0)\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:322 +0xb85\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).process(0xc00178a0c0)\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:163 +0x4da\ngithub.com/hashicorp/nomad/scheduler.retryMax(0x5, 0xc00145bd80, 0xc00145bd70)\n\tgithub.com/hashicorp/nomad/scheduler/util.go:96 +0x49\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).Process(0xc00178a0c0, 0xc001994000)\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:108 +0x525\ngithub.com/hashicorp/nomad/nomad.(*Worker).invokeScheduler(0xc0012a76c0, 0xc001226540, 0xc001994000, {0xc0036ab650, 0x24})\n\tgithub.com/hashicorp/nomad/nomad/worker.go:634 +0x353\ngithub.com/hashicorp/nomad/nomad.(*Worker).run(0xc0012a76c0, 0x12a05f200)\n\tgithub.com/hashicorp/nomad/nomad/worker.go:463 +0x5a5\ncreated by github.com/hashicorp/nomad/nomad.(*Worker).Start in goroutine 1\n\tgithub.com/hashicorp/nomad/nomad/worker.go:162 +0x59\n","worker_id":"0b7cd3e0-f1d4-bab0-9843-e6eef610aa25"}
nomad[11069]: {"@level":"error","@message":"processing eval panicked scheduler - please report this as a bug!","@module":"worker.system_sched","@timestamp":"2024-07-20T00:08:02.619052Z","error":"runtime error: invalid memory address or nil pointer dereference","eval_id":"33a13e15-fa8c-c2b6-5437-272e0a5b9c0a","job_id":"m3hostfiles","namespace":"default","stack_trace":"goroutine 65 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x5e\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).Process.func1()\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:83 +0x58\npanic({0x2a88140?, 0x4f5ea50?})\n\truntime/panic.go:914 +0x21f\ngithub.com/hashicorp/nomad/client/lib/numalib.(*Topology).UsableCores(...)\n\tgithub.com/hashicorp/nomad/client/lib/numalib/topology.go:258\ngithub.com/hashicorp/nomad/nomad/structs.(*NodeResources).Comparable(0xc00190e320)\n\tgithub.com/hashicorp/nomad/nomad/structs/structs.go:3185 +0xcc\ngithub.com/hashicorp/nomad/scheduler.(*Preemptor).SetNode(0xc00145b048, 0xc00148c600)\n\tgithub.com/hashicorp/nomad/scheduler/preemption.go:139 +0x36\ngithub.com/hashicorp/nomad/scheduler.(*BinPackIterator).Next(0xc00069e230)\n\tgithub.com/hashicorp/nomad/scheduler/rank.go:274 +0x74d\ngithub.com/hashicorp/nomad/scheduler.(*ScoreNormalizationIterator).Next(0xc000efcfa0)\n\tgithub.com/hashicorp/nomad/scheduler/rank.go:816 +0x28\ngithub.com/hashicorp/nomad/scheduler.(*SystemStack).Select(0xc002870d00, 0xc001636a20, 0xc00145b790)\n\tgithub.com/hashicorp/nomad/scheduler/stack.go:362 +0x82e\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).computePlacements(0xc00178a0c0, {0xc002870e00, 0x3, 0xb?})\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:374 +0x325\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).computeJobAllocs(0xc00178a0c0)\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:322 +0xb85\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).process(0xc00178a0c0)\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:163 +0x4da\ngithub.com/hashicorp/nomad/scheduler.retryMax(0x5, 0xc00145bd80, 0xc00145bd70)\n\tgithub.com/hashicorp/nomad/scheduler/util.go:96 +0x49\ngithub.com/hashicorp/nomad/scheduler.(*SystemScheduler).Process(0xc00178a0c0, 0xc001994000)\n\tgithub.com/hashicorp/nomad/scheduler/scheduler_system.go:108 +0x525\ngithub.com/hashicorp/nomad/nomad.(*Worker).invokeScheduler(0xc0012a76c0, 0xc001226540, 0xc001994000, {0xc0036ab650, 0x24})\n\tgithub.com/hashicorp/nomad/nomad/worker.go:634 +0x353\ngithub.com/hashicorp/nomad/nomad.(*Worker).run(0xc0012a76c0, 0x12a05f200)\n\tgithub.com/hashicorp/nomad/nomad/worker.go:463 +0x5a5\ncreated by github.com/hashicorp/nomad/nomad.(*Worker).Start in goroutine 1\n\tgithub.com/hashicorp/nomad/nomad/worker.go:162 +0x59\n","worker_id":"0b7cd3e0-f1d4-bab0-9843-e6eef610aa25"}
nomad[11069]: {"@level":"error","@message":"error invoking scheduler","@module":"worker","@timestamp":"2024-07-20T00:08:02.619112Z","error":"failed to process evaluation: failed to process eval: runtime error: invalid memory address or nil pointer dereference","worker_id":"0b7cd3e0-f1d4-bab0-9843-e6eef610aa25"}
nomad[11069]: {"@level":"error","@message":"error invoking scheduler","@module":"worker","@timestamp":"2024-07-20T00:08:02.619112Z","error":"failed to process evaluation: failed to process eval: runtime error: invalid memory address or nil pointer dereference","worker_id":"0b7cd3e0-f1d4-bab0-9843-e6eef610aa25"}

morphine1900 avatar Jul 22 '24 00:07 morphine1900