Skip to content

Random(?) compiler error codes on Windows CI runners (seen error codes 5 and 116 so far) #22567

@floooh

Description

@floooh

Zig Version

zig-windows-x86_64-0.14.0-dev.2851+b074fb7dd

Steps to Reproduce and Observed Behavior

My sokol-zig CI builds started to fail randomly with 'error codes' 5 (once) and 116 (twice) in the last few days, only on Windows, and only for the last few days, about 50% of CI runs on Windows seem to be affected.

CI overview (but note that not all red CI pipelines actually have that error, some are just regular CI errors):

https://github.com/floooh/sokol-zig/actions

First time I've seen it with version zig-windows-x86_64-0.14.0-dev.2802+257054a14

Last time it worked reliably might have been zig-windows-x86_64-0.14.0-dev.2639+15fe99957.

Attached are two raw logs from failing Windows builds in one the problem happens once, in the other the problem happens twice (search for error code).

There's not much in common. I'm seeing exit code 116 and exit code 5, the compiled program seems to be random, e.g.:

2025-01-18T14:46:49.6162615Z error: the following command exited with error code 116:
2025-01-18T14:46:49.6280322Z C:\hostedtoolcache\windows\zig\0.14.0-dev.2802\x64\zig.exe build-exe -ODebug --dep sokol -Mroot=D:\a\sokol-zig\sokol-zig\src\examples\sgl-context.zig C:\Users\runneradmin\AppData\Local\zig\o\5782b6b34c543eacc1e672c8927ede10\sokol_clib.lib -I C:\Users\runneradmin\AppData\Local\zig\o\fd2bb3fe49d783e6233de8bbcaca0706 -Msokol=D:\a\sokol-zig\sokol-zig\src\sokol\sokol.zig -lkernel32 -luser32 -lgdi32 -lole32 -ld3d11 -ldxgi -lc --cache-dir C:\Users\runneradmin\AppData\Local\zig --global-cache-dir C:\Users\runneradmin\AppData\Local\zig --name sgl-context --zig-lib-dir C:\hostedtoolcache\windows\zig\0.14.0-dev.2802\x64\lib\ --listen=-
2025-01-21T17:56:12.9870889Z error: the following command exited with error code 5:
2025-01-21T17:56:12.9873153Z C:\hostedtoolcache\windows\zig\0.14.0-dev.2851\x64\zig.exe build-exe -ODebug --dep sokol -Mroot=D:\a\sokol-zig\sokol-zig\src\examples\offscreen.zig C:\Users\runneradmin\AppData\Local\zig\o\3a75123ead4d4ca9dcb76fc4fb6dfcea\sokol_clib.lib -I C:\Users\runneradmin\AppData\Local\zig\o\5d3ae77db916ce4e147481038475d5e9 -Msokol=D:\a\sokol-zig\sokol-zig\src\sokol\sokol.zig -lkernel32 -luser32 -lgdi32 -lole32 -ld3d11 -ldxgi -lc --cache-dir C:\Users\runneradmin\AppData\Local\zig --global-cache-dir C:\Users\runneradmin\AppData\Local\zig --name offscreen --zig-lib-dir C:\hostedtoolcache\windows\zig\0.14.0-dev.2851\x64\lib\ --listen=- 
2025-01-21T17:56:13.1135769Z error: the following command exited with error code 116:
2025-01-21T17:56:13.1139288Z C:\hostedtoolcache\windows\zig\0.14.0-dev.2851\x64\zig.exe build-exe -ODebug --dep sokol -Mroot=D:\a\sokol-zig\sokol-zig\src\examples\shapes.zig C:\Users\runneradmin\AppData\Local\zig\o\3a75123ead4d4ca9dcb76fc4fb6dfcea\sokol_clib.lib -I C:\Users\runneradmin\AppData\Local\zig\o\5d3ae77db916ce4e147481038475d5e9 -Msokol=D:\a\sokol-zig\sokol-zig\src\sokol\sokol.zig -lkernel32 -luser32 -lgdi32 -lole32 -ld3d11 -ldxgi -lc --cache-dir C:\Users\runneradmin\AppData\Local\zig --global-cache-dir C:\Users\runneradmin\AppData\Local\zig --name shapes --zig-lib-dir C:\hostedtoolcache\windows\zig\0.14.0-dev.2851\x64\lib\ --listen=- 

I have not yet attempted to reproduce the problem on a local Windows machine.

Expected Behavior

Building on Windows should reliably work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behavioros-windowsMicrosoft Windows

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions