GoogleContainerTools/skaffold · error
could not set information job object: %w
Error message
could not set information job object: %w
What it means
After creating the Windows job object, Start configures it with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE via SetInformationJobObject; this error wraps failure of that call. It means the kernel rejected the extended limit information struct for the job object.
Source
Thrown at pkg/skaffold/kubectl/exec_windows.go:60
// Start starts the specified command in a job object but does not wait for it to complete
func (c *Cmd) Start() error {
handle, err := windows.CreateJobObject(nil, nil)
if err != nil {
return fmt.Errorf("could not create job object: %w", err)
}
// https://gist.github.com/hallazzang/76f3970bfc949831808bbebc8ca15209
info := windows.JOBOBJECT_EXTENDED_LIMIT_INFORMATION{
BasicLimitInformation: windows.JOBOBJECT_BASIC_LIMIT_INFORMATION{
LimitFlags: windows.JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE,
},
}
if _, err := windows.SetInformationJobObject(
handle,
windows.JobObjectExtendedLimitInformation,
uintptr(unsafe.Pointer(&info)),
uint32(unsafe.Sizeof(info))); err != nil {
return fmt.Errorf("could not set information job object: %w", err)
}
if err := c.Cmd.Start(); err != nil {
return fmt.Errorf("could not start the command: %w", err)
}
processHandle, err := getHandleFromProcess(c.Process)
if err != nil {
return fmt.Errorf("could not get handle from process: %w", err)
}
if err := windows.AssignProcessToJobObject(handle, processHandle); err != nil {
return fmt.Errorf("could not assign job object: %w", err)
}
c.handle = handle
go func() {
<-c.ctx.Done()View on GitHub (pinned to a1189de023)
Solutions
- Update golang.org/x/sys to the latest version so the JOBOBJECT structs match current Windows ABI
- Rerun in an unrestricted (non-elevated-issue) terminal and check for AV interference
- Retry the command — transient Win32 failures are rare but possible
- If persistent, capture the wrapped %w error's Win32 code for a Windows support/debugging angle
Example fix
// go.mod // before golang.org/x/sys v0.0.0-2021... // after golang.org/x/sys v0.20.0
Defensive patterns
Strategy: fallback
Try / catch
if err := c.Start(); err != nil {
if strings.Contains(err.Error(), "could not set information job object") {
return fmt.Errorf("job object config rejected (%w); update golang.org/x/sys and retry", err)
}
return err
} Prevention
- Keep golang.org/x/sys/windows at a recent version for correct JOBOBJECT struct layout
- Pin a known-good Windows build in CI where job objects are exercised
- Check the wrapped Win32 error code when diagnosing
- Avoid mixing struct definitions from different x/sys versions in the build
When it happens
Trigger: SetInformationJobObject returns non-zero (Win32 failure) when applying JOBOBJECT_EXTENDED_LIMIT_INFORMATION — e.g. invalid handle from a prior partial failure, access denied, or struct size/layout mismatch from an incompatible golang.org/x/sys/windows version.
Common situations: Outdated golang.org/x/sys/windows package with struct layout mismatches on newer Windows builds, corrupted handle state, restricted-process scenarios similar to job-object creation failures.
Related errors
- could not create job object: %w
- could not assign job object: %w
- could not start the command: %w
- could not get handle from process: %w
- starting cmd: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/4cac1237cc86bd62.
Report an issue: GitHub.