Skip to content

fix(agent): drop unused Stepping field from win32Processor struct#80

Closed
bokiko wants to merge 1 commit intomainfrom
fix/agent-windows-wmi-stepping-panic
Closed

fix(agent): drop unused Stepping field from win32Processor struct#80
bokiko wants to merge 1 commit intomainfrom
fix/agent-windows-wmi-stepping-panic

Conversation

@bokiko
Copy link
Copy Markdown
Owner

@bokiko bokiko commented May 4, 2026

Crashes every Windows agent on startup with panic: reflect: call of reflect.Value.Uint on int32 Value. WMI returns Win32_Processor.Stepping as int32; struct declared it as string; StackExchange/wmi library reflection panics. Field was never used — SELECT doesn't include it and CPU stepping comes from gopsutil. Removing the field stops the panic.

Same root cause as ai-07's parked flap loop. Verified on Win10 22H2 (admin's test box) — agent now reaches steady-state.

WMI provider returns Win32_Processor.Stepping as int32 on some Windows
builds despite the MOF schema declaring it as string. The StackExchange
/wmi library iterates struct fields via reflection and tries to load
each from the result row, calling reflect.Value.Uint() on the int32 value
which panics because Uint() only accepts uint kinds.

Crashes the agent on startup with:
  panic: reflect: call of reflect.Value.Uint on int32 Value
  agent/hardware_windows.go:480 (collectHardware)

Same root cause as ai-07's flap loop — every Windows agent panics during
the first hardware snapshot send, gets restarted by SCM, panics again,
exit code 1067.

The field was never used: SELECT statement doesn't include Stepping, and
hw.CPUStepping is populated from gopsutil's cpu.Info() instead. Removing
the field tells the wmi library to skip it entirely. No functionality lost.

Verified: agent runs to steady-state on Win10 22H2 after this change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokiko bokiko closed this May 4, 2026
@bokiko bokiko deleted the fix/agent-windows-wmi-stepping-panic branch May 4, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant