move_src incremental test has started failing on loongarch64-linux #30748

Closed
opened 2026-01-08 06:08:43 +01:00 by alexrp · 1 comment
Owner

Since #30686 was merged, we're seeing this failure on loongarch64-linux:

mq test-incremental
   mq incr-check 'move_src' failure
error: [wasm32-wasi-selfhosted 'initial version'] unexpected stderr:
Compiler crash context:
(no context)
thread 3693047 panic: attempt to unwrap error: WriteFailed
error return context:
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/lib/std/Io/Writer.zig:2492:13: 0x5bb1dbf in fixedDrain (zig)
            return error.WriteFailed;
            ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/lib/std/Io/Writer.zig:729:19: 0x5be9bd3 in writeByte (zig)
        const n = try w.vtable.drain(w, &.{&.{byte}}, 1);
                  ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/lib/std/Io/Writer.zig:1924:9: 0x6fdd317 in writeLeb128__anon_426546 (zig)
        try w.writeByte(@bitCast(byte));
        ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/lib/std/Io/Writer.zig:1887:5: 0x698d3cb in writeUleb128__anon_291682 (zig)
    try w.writeLeb128(switch (@typeInfo(@TypeOf(value))) {
    ^
stack trace:
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/link/Wasm/Flush.zig:1996:30: 0x698df13 in appendReservedUleb32 (zig)
        error.WriteFailed => unreachable,
                             ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/link/Wasm/Flush.zig:1951:33: 0x698dd33 in emitTagNameFunction (zig)
            appendReservedUleb32(code, 1);
                                ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/link/Wasm/Flush.zig:877:48: 0x69a7e7b in finish (zig)
                        try emitTagNameFunction(wasm, binary_bytes, f.data_segments.get(.__zig_tag_name_table).?, i.value(wasm).tag_name.table_index, ip_index);
                                               ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/link/Wasm.zig:3877:36: 0x64b11d3 in flush (zig)
    return wasm.flush_buffer.finish(wasm) catch |err| switch (err) {
                                   ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/link.zig:945:77: 0x6176d1b in flush (zig)
                return @as(*tag.Type(), @fieldParentPtr("base", base)).flush(arena, tid, prog_node);
                                                                            ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/Compilation.zig:3396:17: 0x603a3df in flush (zig)
        lf.flush(arena, tid, comp.link_prog_node) catch |err| switch (err) {
                ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/Compilation.zig:3157:22: 0x5e26577 in update (zig)
            try flush(comp, arena, .main);
                     ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/main.zig:4230:32: 0x5e5c423 in serve (zig)
                try comp.update(main_progress_node);
                               ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/main.zig:3653:22: 0x5ea43d7 in buildOutputType (zig)
            try serve(
                     ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/main.zig:263:31: 0x5dbb3b7 in mainArgs (zig)
        return buildOutputType(gpa, arena, io, args, .{ .build = .Exe }, environ_map);
                              ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/main.zig:216:20: 0x5db8b7b in main (zig)
    return mainArgs(gpa, arena, io, args, &environ_map);
                   ^
/home/ci/.cache/act/a3658b2e5b573421/hostexecutor/lib/std/start.zig:676:88: 0x5db848f in callMain (zig)
    if (fn_info.params[0].type.? == std.process.Init.Minimal) return wrapMain(root.main(.{
                                                                                       ^
lib/libc/musl/src/env/__libc_start_main.c:95:7: 0x11564fb7 in libc_start_main_stage2 (lib/libc/musl/src/env/__libc_start_main.c)
Unwind error at address `/proc/self/exe:0x11564fb7` (unwind info unavailable), remaining frames may be incorrect
???:?:?: 0xf in ??? (???)
error: process exited with code 1 (expected exited with code 0)
failed command: /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/zig-local-cache/o/6524a0105c574a7730c3a8eac7036974/incr-check /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/build-debug/stage3-debug/bin/zig /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/test/incremental/move_src --zig-lib-dir /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/lib/

https://codeberg.org/ziglang/zig/actions/runs/611/jobs/4/attempt/1

Since #30686 was merged, we're seeing this failure on `loongarch64-linux`: ``` mq test-incremental mq incr-check 'move_src' failure error: [wasm32-wasi-selfhosted 'initial version'] unexpected stderr: Compiler crash context: (no context) thread 3693047 panic: attempt to unwrap error: WriteFailed error return context: /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/lib/std/Io/Writer.zig:2492:13: 0x5bb1dbf in fixedDrain (zig) return error.WriteFailed; ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/lib/std/Io/Writer.zig:729:19: 0x5be9bd3 in writeByte (zig) const n = try w.vtable.drain(w, &.{&.{byte}}, 1); ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/lib/std/Io/Writer.zig:1924:9: 0x6fdd317 in writeLeb128__anon_426546 (zig) try w.writeByte(@bitCast(byte)); ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/lib/std/Io/Writer.zig:1887:5: 0x698d3cb in writeUleb128__anon_291682 (zig) try w.writeLeb128(switch (@typeInfo(@TypeOf(value))) { ^ stack trace: /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/link/Wasm/Flush.zig:1996:30: 0x698df13 in appendReservedUleb32 (zig) error.WriteFailed => unreachable, ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/link/Wasm/Flush.zig:1951:33: 0x698dd33 in emitTagNameFunction (zig) appendReservedUleb32(code, 1); ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/link/Wasm/Flush.zig:877:48: 0x69a7e7b in finish (zig) try emitTagNameFunction(wasm, binary_bytes, f.data_segments.get(.__zig_tag_name_table).?, i.value(wasm).tag_name.table_index, ip_index); ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/link/Wasm.zig:3877:36: 0x64b11d3 in flush (zig) return wasm.flush_buffer.finish(wasm) catch |err| switch (err) { ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/link.zig:945:77: 0x6176d1b in flush (zig) return @as(*tag.Type(), @fieldParentPtr("base", base)).flush(arena, tid, prog_node); ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/Compilation.zig:3396:17: 0x603a3df in flush (zig) lf.flush(arena, tid, comp.link_prog_node) catch |err| switch (err) { ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/Compilation.zig:3157:22: 0x5e26577 in update (zig) try flush(comp, arena, .main); ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/main.zig:4230:32: 0x5e5c423 in serve (zig) try comp.update(main_progress_node); ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/main.zig:3653:22: 0x5ea43d7 in buildOutputType (zig) try serve( ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/main.zig:263:31: 0x5dbb3b7 in mainArgs (zig) return buildOutputType(gpa, arena, io, args, .{ .build = .Exe }, environ_map); ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/src/main.zig:216:20: 0x5db8b7b in main (zig) return mainArgs(gpa, arena, io, args, &environ_map); ^ /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/lib/std/start.zig:676:88: 0x5db848f in callMain (zig) if (fn_info.params[0].type.? == std.process.Init.Minimal) return wrapMain(root.main(.{ ^ lib/libc/musl/src/env/__libc_start_main.c:95:7: 0x11564fb7 in libc_start_main_stage2 (lib/libc/musl/src/env/__libc_start_main.c) Unwind error at address `/proc/self/exe:0x11564fb7` (unwind info unavailable), remaining frames may be incorrect ???:?:?: 0xf in ??? (???) error: process exited with code 1 (expected exited with code 0) failed command: /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/zig-local-cache/o/6524a0105c574a7730c3a8eac7036974/incr-check /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/build-debug/stage3-debug/bin/zig /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/test/incremental/move_src --zig-lib-dir /home/ci/.cache/act/a3658b2e5b573421/hostexecutor/lib/ ``` https://codeberg.org/ziglang/zig/actions/runs/611/jobs/4/attempt/1
alexrp added this to the Urgent milestone 2026-01-08 06:12:30 +01:00
Owner

Seems like dumb luck that this worked anywhere: there's a ensureUnusedCapacity reserving a constant number of bytes to be written by a decidedly runtime loop. Fix should be straightforward.

Seems like dumb luck that this worked anywhere: there's a `ensureUnusedCapacity` reserving a *constant* number of bytes to be written by a decidedly runtime loop. Fix should be straightforward.
mlugg closed this issue 2026-01-09 03:49:27 +01:00
alexrp modified the milestone from Urgent to 0.16.0 2026-01-11 06:09:00 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/zig#30748
No description provided.