ziglang/zig
262
6.0k
Fork
You've already forked zig
779

Windows kernel bug causes Unix socket timeouts #31499

Open
opened 2026年03月14日 02:07:38 +01:00 by andrewrk · 7 comments

Issue migrated from https://github.com/ziglang/zig/issues/25983

Observed against 5d71e30518

Main test suite...
test
+- test-modules
 +- test-std
 +- run test std-native-znver5-ReleaseFast-libc 3030 pass, 65 skip, 1 timeout (3096 total)
error: 'Io.net.test.test.listen on a unix socket, send bytes, receive bytes' timed out after 30m9.714ms
failed command: "C:\\Users\\ci\\.cache\\act\\c66491d7fc031988\\hostexecutor\\zig-local-cache\\o\81円d4e4f42530a09a02a7fb586c31e3af\\test.exe" "--cache-dir=C:\\Users\\ci\\.cache\\act\\c66491d7fc031988\\hostexecutor\\zig-local-cache" --seed=0x8c1d43e9 --listen=-
Build Summary: 5162/5391 steps succeeded (225 skipped, 1 failed); 61417/62839 tests passed (1421 skipped, 1 timed out)
test transitive failure
+- test-modules transitive failure
 +- test-std transitive failure
 +- run test std-native-znver5-ReleaseFast-libc 3030 pass, 65 skip, 1 timeout (3096 total)
error: the following build command failed with exit code 1:
C:\Users\ci\.cache\act\c66491d7fc031988\hostexecutor\zig-local-cache\o\cdf3b8c40b1c7c04b2bf5651a38e3846\build.exe C:\Users\ci\.cache\act\c66491d7fc031988\hostexecutor\build-release\stage3-release\bin\zig.exe C:\Users\ci\.cache\act\c66491d7fc031988\hostexecutor\lib C:\Users\ci\.cache\act\c66491d7fc031988\hostexecutor C:\Users\ci\.cache\act\c66491d7fc031988\hostexecutor\zig-local-cache C:\Users\ci\.cache\act\c66491d7fc031988\hostexecutor\zig-global-cache --seed 0x8c1d43e9 -Zb4d34a580c667b90 test docs --maxrss 49392123904 --search-prefix C:\Users\ci\deps\zig+llvm+lld+clang-x86_64-windows-gnu-0.16.0-dev.104+689461e31 -Dstatic-llvm -Dskip-non-native -Dskip-test-incremental -Denable-symlinks-windows --test-timeout 30m

Unable to reproduce reliably. Eyeballing it, I don't see any issues in the test or implementation.

Issue migrated from https://github.com/ziglang/zig/issues/25983 Observed against 5d71e3051833d20dd2dbfe801e060b3a1a3afa69 ``` Main test suite... test +- test-modules +- test-std +- run test std-native-znver5-ReleaseFast-libc 3030 pass, 65 skip, 1 timeout (3096 total) error: 'Io.net.test.test.listen on a unix socket, send bytes, receive bytes' timed out after 30m9.714ms failed command: "C:\\Users\\ci\\.cache\\act\\c66491d7fc031988\\hostexecutor\\zig-local-cache\\o\81円d4e4f42530a09a02a7fb586c31e3af\\test.exe" "--cache-dir=C:\\Users\\ci\\.cache\\act\\c66491d7fc031988\\hostexecutor\\zig-local-cache" --seed=0x8c1d43e9 --listen=- Build Summary: 5162/5391 steps succeeded (225 skipped, 1 failed); 61417/62839 tests passed (1421 skipped, 1 timed out) test transitive failure +- test-modules transitive failure +- test-std transitive failure +- run test std-native-znver5-ReleaseFast-libc 3030 pass, 65 skip, 1 timeout (3096 total) error: the following build command failed with exit code 1: C:\Users\ci\.cache\act\c66491d7fc031988\hostexecutor\zig-local-cache\o\cdf3b8c40b1c7c04b2bf5651a38e3846\build.exe C:\Users\ci\.cache\act\c66491d7fc031988\hostexecutor\build-release\stage3-release\bin\zig.exe C:\Users\ci\.cache\act\c66491d7fc031988\hostexecutor\lib C:\Users\ci\.cache\act\c66491d7fc031988\hostexecutor C:\Users\ci\.cache\act\c66491d7fc031988\hostexecutor\zig-local-cache C:\Users\ci\.cache\act\c66491d7fc031988\hostexecutor\zig-global-cache --seed 0x8c1d43e9 -Zb4d34a580c667b90 test docs --maxrss 49392123904 --search-prefix C:\Users\ci\deps\zig+llvm+lld+clang-x86_64-windows-gnu-0.16.0-dev.104+689461e31 -Dstatic-llvm -Dskip-non-native -Dskip-test-incremental -Denable-symlinks-windows --test-timeout 30m ``` Unable to reproduce reliably. Eyeballing it, I don't see any issues in the test or implementation.
jacobly modified the milestone from Upcoming to 0.16.0 2026年03月20日 02:42:07 +01:00
alexrp modified the milestone from 0.16.0 to Urgent 2026年03月21日 14:15:22 +01:00

https://codeberg.org/ziglang/zig/actions/runs/2496/jobs/25/attempt/1

test
+- test-modules
 +- test-std
 +- run test std-native-znver5-ReleaseSafe 3034 pass, 62 skip, 1 timeout (3097 total)
error: 'Io.net.test.test.listen on a unix socket, send bytes, receive bytes' timed out after 30m14.603ms
failed command: "C:\\Users\\ci\\.cache\\act\75円e2e2202cdc2e8b\\hostexecutor\\zig-local-cache\\o\878円eef5a6246b0d67c87c1eb11a400a2\\test.exe" "--cache-dir=C:\\Users\\ci\\.cache\\act\75円e2e2202cdc2e8b\\hostexecutor\\zig-local-cache" --seed=0x3f8e59b --listen=-
https://codeberg.org/ziglang/zig/actions/runs/2496/jobs/25/attempt/1 ``` test +- test-modules +- test-std +- run test std-native-znver5-ReleaseSafe 3034 pass, 62 skip, 1 timeout (3097 total) error: 'Io.net.test.test.listen on a unix socket, send bytes, receive bytes' timed out after 30m14.603ms failed command: "C:\\Users\\ci\\.cache\\act\75円e2e2202cdc2e8b\\hostexecutor\\zig-local-cache\\o\878円eef5a6246b0d67c87c1eb11a400a2\\test.exe" "--cache-dir=C:\\Users\\ci\\.cache\\act\75円e2e2202cdc2e8b\\hostexecutor\\zig-local-cache" --seed=0x3f8e59b --listen=- ```

This test is just written incorrectly and I honestly can't figure out how it ever works...

/// Returns the number of bytes read, which is less than `buffer.len` if and/// only if the stream reached the end.pubfnreadSliceShort(r:*Reader,buffer:[]u8)ShortError!usize{

As documented, this function infinite loops until buffer is full or end of stream is reached, and the test makes neither condition ever true.

This test is just written incorrectly and I honestly can't figure out how it ever works... ```zig /// Returns the number of bytes read, which is less than `buffer.len` if and /// only if the stream reached the end. pub fn readSliceShort(r: *Reader, buffer: []u8) ShortError!usize { ``` As documented, this function infinite loops until buffer is full or end of stream is reached, and the test makes neither condition ever true.
Owner
Copy link

the test makes neither condition ever true.

Why wouldn't end of stream be reached? The client calls stream.close immediately after writing its string.

> the test makes neither condition ever true. Why wouldn't end of stream be reached? The client calls `stream.close` immediately after writing its string.
conststd=@import("std");pubfnmain(init:std.process.Init)!void{varfutures:std.ArrayList(std.Io.Future(@typeInfo(@TypeOf(tryRepro)).@"fn".return_type.?))=.empty;defer{for(futures.items)|*future|future.cancel(init.io)catch{};futures.deinit(init.gpa);}for([1]?std.Io.net.ShutdownHow{null}++std.enums.values(std.Io.net.ShutdownHow))|shutdown|{for(std.enums.values(Options.Close))|close|{tryfutures.append(init.gpa,init.io.async(tryRepro,.{init.io,.{.id=futures.items.len,.shutdown=shutdown,.close=close,}}));}}for(futures.items)|*future|tryfuture.await(init.io);}constOptions=struct{id:usize,shutdown:?std.Io.net.ShutdownHow,close:Close,constClose=enum{before,after};};fntryRepro(io:std.Io,options:Options)!void{varbuffer:[16]u8=undefined;varfuture=tryio.concurrent(repro,.{io,&buffer,options});deferstd.debug.print("repro(io, {any}) = {!s}\n",.{options,future.cancel(io)});tryio.sleep(.fromMilliseconds(100),.awake);}fnrepro(io:std.Io,buffer:[]u8,options:Options)![]constu8{varpath_buffer:[std.fmt.count("repro-{d}.sock",.{std.math.maxInt(usize)})]u8=undefined;constaddr:std.Io.net.UnixAddress=try.init(std.fmt.bufPrint(&path_buffer,"repro-{d}.sock",.{options.id})catchunreachable);std.Io.Dir.cwd().deleteFile(io,addr.path)catch|err|switch(err){error.FileNotFound=>{},else=>|e|returne,};varserver=tryaddr.listen(io,.{});deferserver.deinit(io);varclient_stream:?std.Io.net.Stream=tryaddr.connect(io);deferif(client_stream)|stream|stream.close(io);varserver_stream=tryserver.accept(io);deferserver_stream.close(io);varclient_writer=client_stream.?.writer(io,&.{});client_writer.interface.writeAll("Hello world!")catch|err|switch(err){error.WriteFailed=>returnclient_writer.err.?,};if(options.shutdown)|how|tryclient_stream.?.shutdown(io,how);if(options.close==.before){client_stream.?.close(io);client_stream=null;}varserver_reader=server_stream.reader(io,&.{});returnbuffer[0..server_reader.interface.readSliceShort(buffer)catch|err|switch(err){error.ReadFailed=>returnserver_reader.err.?,}];}

Not according to windows:

PS> release\bin\zig fmt repro.zig; release\bin\zig run repro.zig
repro(io, .{ .id = 0, .shutdown = null, .close = .before }) = Hello world!
repro(io, .{ .id = 1, .shutdown = null, .close = .after }) = error.Canceled
repro(io, .{ .id = 2, .shutdown = .recv, .close = .before }) = Hello world!
repro(io, .{ .id = 3, .shutdown = .recv, .close = .after }) = error.Canceled
repro(io, .{ .id = 4, .shutdown = .send, .close = .before }) = Hello world!
repro(io, .{ .id = 5, .shutdown = .send, .close = .after }) = Hello world!
repro(io, .{ .id = 6, .shutdown = .both, .close = .before }) = Hello world!
repro(io, .{ .id = 7, .shutdown = .both, .close = .after }) = Hello world!

Or linux for that matter:

$ zig run repro.zig
repro(io, .{ .id = 0, .shutdown = null, .close = .before }) = Hello world!
repro(io, .{ .id = 1, .shutdown = null, .close = .after }) = error.Canceled
repro(io, .{ .id = 2, .shutdown = .recv, .close = .before }) = Hello world!
repro(io, .{ .id = 3, .shutdown = .recv, .close = .after }) = error.Canceled
repro(io, .{ .id = 4, .shutdown = .send, .close = .before }) = Hello world!
repro(io, .{ .id = 5, .shutdown = .send, .close = .after }) = Hello world!
repro(io, .{ .id = 6, .shutdown = .both, .close = .before }) = Hello world!
repro(io, .{ .id = 7, .shutdown = .both, .close = .after }) = Hello world!

Note that the test is testing a race between id 0 and id 1.

```zig const std = @import("std"); pub fn main(init: std.process.Init) !void { var futures: std.ArrayList(std.Io.Future(@typeInfo(@TypeOf(tryRepro)).@"fn".return_type.?)) = .empty; defer { for (futures.items) |*future| future.cancel(init.io) catch {}; futures.deinit(init.gpa); } for ([1]?std.Io.net.ShutdownHow{null} ++ std.enums.values(std.Io.net.ShutdownHow)) |shutdown| { for (std.enums.values(Options.Close)) |close| { try futures.append(init.gpa, init.io.async(tryRepro, .{ init.io, .{ .id = futures.items.len, .shutdown = shutdown, .close = close, } })); } } for (futures.items) |*future| try future.await(init.io); } const Options = struct { id: usize, shutdown: ?std.Io.net.ShutdownHow, close: Close, const Close = enum { before, after }; }; fn tryRepro(io: std.Io, options: Options) !void { var buffer: [16]u8 = undefined; var future = try io.concurrent(repro, .{ io, &buffer, options }); defer std.debug.print("repro(io, {any}) = {!s}\n", .{ options, future.cancel(io) }); try io.sleep(.fromMilliseconds(100), .awake); } fn repro(io: std.Io, buffer: []u8, options: Options) ![]const u8 { var path_buffer: [std.fmt.count("repro-{d}.sock", .{std.math.maxInt(usize)})]u8 = undefined; const addr: std.Io.net.UnixAddress = try .init(std.fmt.bufPrint(&path_buffer, "repro-{d}.sock", .{options.id}) catch unreachable); std.Io.Dir.cwd().deleteFile(io, addr.path) catch |err| switch (err) { error.FileNotFound => {}, else => |e| return e, }; var server = try addr.listen(io, .{}); defer server.deinit(io); var client_stream: ?std.Io.net.Stream = try addr.connect(io); defer if (client_stream) |stream| stream.close(io); var server_stream = try server.accept(io); defer server_stream.close(io); var client_writer = client_stream.?.writer(io, &.{}); client_writer.interface.writeAll("Hello world!") catch |err| switch (err) { error.WriteFailed => return client_writer.err.?, }; if (options.shutdown) |how| try client_stream.?.shutdown(io, how); if (options.close == .before) { client_stream.?.close(io); client_stream = null; } var server_reader = server_stream.reader(io, &.{}); return buffer[0 .. server_reader.interface.readSliceShort(buffer) catch |err| switch (err) { error.ReadFailed => return server_reader.err.?, }]; } ``` Not according to windows: ```console PS> release\bin\zig fmt repro.zig; release\bin\zig run repro.zig repro(io, .{ .id = 0, .shutdown = null, .close = .before }) = Hello world! repro(io, .{ .id = 1, .shutdown = null, .close = .after }) = error.Canceled repro(io, .{ .id = 2, .shutdown = .recv, .close = .before }) = Hello world! repro(io, .{ .id = 3, .shutdown = .recv, .close = .after }) = error.Canceled repro(io, .{ .id = 4, .shutdown = .send, .close = .before }) = Hello world! repro(io, .{ .id = 5, .shutdown = .send, .close = .after }) = Hello world! repro(io, .{ .id = 6, .shutdown = .both, .close = .before }) = Hello world! repro(io, .{ .id = 7, .shutdown = .both, .close = .after }) = Hello world! ``` Or linux for that matter: ```console $ zig run repro.zig repro(io, .{ .id = 0, .shutdown = null, .close = .before }) = Hello world! repro(io, .{ .id = 1, .shutdown = null, .close = .after }) = error.Canceled repro(io, .{ .id = 2, .shutdown = .recv, .close = .before }) = Hello world! repro(io, .{ .id = 3, .shutdown = .recv, .close = .after }) = error.Canceled repro(io, .{ .id = 4, .shutdown = .send, .close = .before }) = Hello world! repro(io, .{ .id = 5, .shutdown = .send, .close = .after }) = Hello world! repro(io, .{ .id = 6, .shutdown = .both, .close = .before }) = Hello world! repro(io, .{ .id = 7, .shutdown = .both, .close = .after }) = Hello world! ``` Note that the test is testing a race between id 0 and id 1.
jacobly modified the milestone from Urgent to 0.16.0 2026年03月22日 11:41:08 +01:00
jacobly modified the milestone from 0.16.0 to Urgent 2026年03月22日 13:11:50 +01:00

The above did not accurately represent the test because it does not use concurrency, here is a repro of this bug that repros on windows but not linux:

conststd=@import("std");pubfnmain(init:std.process.Init)!void{constroot_prog=std.Progress.start(init.io,.{});varresults:[1]Result=undefined;varselect:std.Io.Select(Result)=.init(init.io,&results);defer_=select.cancelDiscard();constn=trystd.Thread.getCpuCount();for(0..n)|id|tryselect.concurrent(.server,server,.{&select,root_prog,id});for(0..2*n)|_|switch(tryselect.await()){.server=>|result|tryresult,.client=>|result|tryresult,};}constResult=union(enum){server:@typeInfo(@TypeOf(server)).@"fn".return_type.?,client:@typeInfo(@TypeOf(client)).@"fn".return_type.?,};fnserver(select:*std.Io.Select(Result),parent_prog:std.Progress.Node,id:usize)!void{constprog=parent_prog.startFmt(0,"server {d}",.{id});varpath_buffer:[std.fmt.count("repro-{d}.sock",.{std.math.maxInt(usize)})]u8=undefined;constaddr:std.Io.net.UnixAddress=try.init(std.fmt.bufPrint(&path_buffer,"repro-{d}.sock",.{id})catchunreachable);constio=select.io;std.Io.Dir.cwd().deleteFile(io,addr.path)catch|err|switch(err){error.FileNotFound=>{},else=>|e|returne,};varsemaphore:std.Io.Semaphore=.{};varserver_socket=tryaddr.listen(io,.{});deferserver_socket.deinit(io);tryselect.concurrent(.client,client,.{io,prog,id,&semaphore,addr});while(true){semaphore.post(io);varserver_stream=tryserver_socket.accept(io);deferserver_stream.close(io);varserver_reader=server_stream.reader(io,&.{});varbuffer:[16]u8=undefined;if(server_reader.interface.readSliceShort(&buffer)catch|err|switch(err){error.ReadFailed=>returnserver_reader.err.?,}!=12)returnerror.IncorrectRead;prog.completeOne();}}fnclient(io:std.Io,parent_prog:std.Progress.Node,id:usize,semaphore:*std.Io.Semaphore,addr:std.Io.net.UnixAddress)!void{constprog=parent_prog.startFmt(0,"client {d}",.{id});while(true){trysemaphore.wait(io);varclient_stream=tryaddr.connect(io);deferclient_stream.close(io);varclient_writer=client_stream.writer(io,&.{});client_writer.interface.writeAll("Hello world!")catch|err|switch(err){error.WriteFailed=>returnclient_writer.err.?,};if(false)tryclient_stream.shutdown(io,.send);prog.completeOne();}}
PS> zig run unix.zig
[29] server 3
└─ [30] client 3
[914] server 0
└─ [915] client 0
[24934] server 1
└─ [24935] client 1
[72663] server 2
└─ [72664] client 2
[8640] server 4
└─ [8641] client 4
[2474] server 5
└─ [2475] client 5
[19] server 7
└─ [20] client 7
[13] server 6
└─ [14] client 6
$ zig run unix.zig
[12416022] server 2
└─ [12416022] client 2
[12266176] server 30
└─ [12266177] client 30
[12230746] server 31
└─ [12230747] client 31
[12236832] server 29
└─ [12236833] client 29
[12321018] server 28
└─ [12321019] client 28
[12178736] server 27
└─ [12178736] client 27
[12139926] server 26
└─ [12139927] client 26
[12405513] server 23
└─ [12405513] client 23
[12340528] server 25
└─ [12340528] client 25
[12444300] server 24
└─ [12444300] client 24
[12191865] server 22
└─ [12191865] client 22
[12311698] server 21
└─ [12311699] client 21
[12325281] server 20
└─ [12325281] client 20
[12301859] server 19
└─ [12301860] client 19
[12402993] server 18
└─ [12402994] client 18
[12204067] server 17
└─ [12204068] client 17
[12475105] server 16
└─ [12475105] client 16
[12322603] server 15
└─ [12322603] client 15
[12286691] server 14
└─ [12286692] client 14
[12196086] server 13
└─ [12196086] client 13
[12221112] server 12
└─ [12221112] client 12
[12438852] server 11
└─ [12438852] client 11
[12258186] server 10
└─ [12258186] client 10
[12194774] server 9
└─ [12194775] client 9
[12392460] server 8
└─ [12392460] client 8
[12325927] server 7
└─ [12325928] client 7
[12398880] server 6
└─ [12398881] client 6
[12482285] server 5
└─ [12482285] client 5
[12311713] server 1
└─ [12311713] client 1
[12327351] server 0
└─ [12327352] client 0
[12300604] server 4
└─ [12300604] client 4
[12379954] server 3
└─ [12379954] client 3
The above did not accurately represent the test because it does not use concurrency, here is a repro of this bug that repros on windows but not linux: ```zig const std = @import("std"); pub fn main(init: std.process.Init) !void { const root_prog = std.Progress.start(init.io, .{}); var results: [1]Result = undefined; var select: std.Io.Select(Result) = .init(init.io, &results); defer _ = select.cancelDiscard(); const n = try std.Thread.getCpuCount(); for (0..n) |id| try select.concurrent(.server, server, .{ &select, root_prog, id }); for (0..2 * n) |_| switch (try select.await()) { .server => |result| try result, .client => |result| try result, }; } const Result = union(enum) { server: @typeInfo(@TypeOf(server)).@"fn".return_type.?, client: @typeInfo(@TypeOf(client)).@"fn".return_type.?, }; fn server(select: *std.Io.Select(Result), parent_prog: std.Progress.Node, id: usize) !void { const prog = parent_prog.startFmt(0, "server {d}", .{id}); var path_buffer: [std.fmt.count("repro-{d}.sock", .{std.math.maxInt(usize)})]u8 = undefined; const addr: std.Io.net.UnixAddress = try .init(std.fmt.bufPrint(&path_buffer, "repro-{d}.sock", .{id}) catch unreachable); const io = select.io; std.Io.Dir.cwd().deleteFile(io, addr.path) catch |err| switch (err) { error.FileNotFound => {}, else => |e| return e, }; var semaphore: std.Io.Semaphore = .{}; var server_socket = try addr.listen(io, .{}); defer server_socket.deinit(io); try select.concurrent(.client, client, .{ io, prog, id, &semaphore, addr }); while (true) { semaphore.post(io); var server_stream = try server_socket.accept(io); defer server_stream.close(io); var server_reader = server_stream.reader(io, &.{}); var buffer: [16]u8 = undefined; if (server_reader.interface.readSliceShort(&buffer) catch |err| switch (err) { error.ReadFailed => return server_reader.err.?, } != 12) return error.IncorrectRead; prog.completeOne(); } } fn client(io: std.Io, parent_prog: std.Progress.Node, id: usize, semaphore: *std.Io.Semaphore, addr: std.Io.net.UnixAddress) !void { const prog = parent_prog.startFmt(0, "client {d}", .{id}); while (true) { try semaphore.wait(io); var client_stream = try addr.connect(io); defer client_stream.close(io); var client_writer = client_stream.writer(io, &.{}); client_writer.interface.writeAll("Hello world!") catch |err| switch (err) { error.WriteFailed => return client_writer.err.?, }; if (false) try client_stream.shutdown(io, .send); prog.completeOne(); } } ``` ```console PS> zig run unix.zig [29] server 3 └─ [30] client 3 [914] server 0 └─ [915] client 0 [24934] server 1 └─ [24935] client 1 [72663] server 2 └─ [72664] client 2 [8640] server 4 └─ [8641] client 4 [2474] server 5 └─ [2475] client 5 [19] server 7 └─ [20] client 7 [13] server 6 └─ [14] client 6 ``` ```console $ zig run unix.zig [12416022] server 2 └─ [12416022] client 2 [12266176] server 30 └─ [12266177] client 30 [12230746] server 31 └─ [12230747] client 31 [12236832] server 29 └─ [12236833] client 29 [12321018] server 28 └─ [12321019] client 28 [12178736] server 27 └─ [12178736] client 27 [12139926] server 26 └─ [12139927] client 26 [12405513] server 23 └─ [12405513] client 23 [12340528] server 25 └─ [12340528] client 25 [12444300] server 24 └─ [12444300] client 24 [12191865] server 22 └─ [12191865] client 22 [12311698] server 21 └─ [12311699] client 21 [12325281] server 20 └─ [12325281] client 20 [12301859] server 19 └─ [12301860] client 19 [12402993] server 18 └─ [12402994] client 18 [12204067] server 17 └─ [12204068] client 17 [12475105] server 16 └─ [12475105] client 16 [12322603] server 15 └─ [12322603] client 15 [12286691] server 14 └─ [12286692] client 14 [12196086] server 13 └─ [12196086] client 13 [12221112] server 12 └─ [12221112] client 12 [12438852] server 11 └─ [12438852] client 11 [12258186] server 10 └─ [12258186] client 10 [12194774] server 9 └─ [12194775] client 9 [12392460] server 8 └─ [12392460] client 8 [12325927] server 7 └─ [12325928] client 7 [12398880] server 6 └─ [12398881] client 6 [12482285] server 5 └─ [12482285] client 5 [12311713] server 1 └─ [12311713] client 1 [12327351] server 0 └─ [12327352] client 0 [12300604] server 4 └─ [12300604] client 4 [12379954] server 3 └─ [12379954] client 3 ```

This appears to be a kernel bug with no workaround.

This appears to be a kernel bug with no workaround.
andrewrk changed title from (削除) flaky timeout: std.Io.net.test.test.listen on a unix socket, send bytes, receive bytes (削除ここまで) to Windows kernel bug causes Unix socket timeouts 2026年03月22日 19:48:39 +01:00
Author
Owner
Copy link

I think the "workaround" is to have the std lib treat Windows as an operating system that does not have Unix socket capabilities (i.e. return error.AddressFamilyUnsupported on that platform). Then this issue can be closed.

I think the "workaround" is to have the std lib treat Windows as an operating system that does not have Unix socket capabilities (i.e. return `error.AddressFamilyUnsupported` on that platform). Then this issue can be closed.
Sign in to join this conversation.
No Branch/Tag specified
master
elfv2
spork8
restricted
0.16.x
panic-rewrite
parking-futex-lockfree
windows-Io-cleanup
Io-watch
ParseCommandLineOptions
windows-async-files
poll-ring
debug-file-leaks-differently
debug-file-leaks
ProcessPrng
elfv2-dyn
jobserver
threadtheft
io-threaded-no-queue
0.15.x
Io.net
comptime-allocator
restricted-function-pointers
cli
wasm-linker-writer
wrangle-writer-buffering
sha1-stream
async-await-demo
fixes
0.14.x
ast-node-methods
macos-debug-info
make-vs-configure
fuzz-macos
sans-aro
ArrayList-reserve
incr-bug
llvm-ir-nosanitize-metadata
ci-tarballs
ci-scripts
threadpool
0.12.x
new-pkg-hash
json-diagnostics
more-doctests
rework-comptime-mutation
0.11.x
ci-perf-comment
stage2-async
0.10.x
autofix
0.9.x
aro
hcs
0.8.x
0.7.x
0.16.0
0.15.2
0.15.1
0.15.0
0.14.1
0.14.0
0.12.1
0.13.0
0.12.0
0.11.0
0.10.1
0.10.0
0.9.1
0.9.0
0.8.1
0.8.0
0.7.1
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.1
0.1.0
Labels
Clear labels
abi/f32
abi/ilp32
abi/sf
accepted
This proposal is planned.
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
The web application for interactive documentation and generation of its assets.
backend/c
The C backend outputs C source code.
backend/llvm
The LLVM backend outputs an LLVM bitcode module.
backend/self-hosted
The self-hosted backends produce machine code directly.
binutils
Zig's included binary utilities: zig ar, zig dlltool, zig lib, zig ranlib, zig objcopy, and zig rc.
breaking
Implementing this issue could cause existing code to no longer compile or have different behavior.
build system
The Zig build system - zig build, std.Build, the build runner, and package management.
debug info
An issue related to debug information (e.g. DWARF) produced by the Zig compiler.
docs
An issue with documentation, e.g. the language reference or standard library doc comments.
error message
This issue points out an error message that is unhelpful and should be improved.
frontend
Tokenization, parsing, AstGen, ZonGen, Sema, Legalize, and Liveness.
fuzzing
An issue related to Zig's integrated fuzz testing.
incremental
Reuse of internal compiler state for faster compilation.
lib/c
This issue relates to Zig's libc implementation and/or vendored libcs.
lib/compiler-rt
This issue relates to Zig's compiler-rt library.
lib/cxx
This issue relates to Zig's vendored libc++ and/or libc++abi.
lib/std
This issue relates to Zig's standard library.
lib/tsan
This issue relates to Zig's vendored libtsan.
lib/ubsan-rt
This issue relates to Zig's ubsan-rt library.
lib/unwind
This issue relates to Zig's vendored libunwind.
linking
Zig's integrated object file and incremental linker.
miscompilation
The compiler reports success but produces semantically incorrect code.
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
This issue suggests language modifications. If it also has the "accepted" label then it is planned.
release notes
This issue or pull request should be mentioned in the release notes.
testing
This issue is related to testing the compiler, standard library, or other parts of Zig.
zig cc
Zig as a drop-in C-family compiler.
zig fmt
The Zig source code formatter.
zig reduce
The Zig source code reduction tool.
bounty
https://ziglang.org/news/announcing-donor-bounties
bug
Observed behavior contradicts documented or intended behavior.
contributor-friendly
This issue is limited in scope and/or knowledge of project internals.
downstream
An issue with a third-party project that uses this project.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
infra
An issue related to project infrastructure, e.g. continuous integration.
optimization
A task to improve performance and/or resource usage.
question
No questions on the issue tracker; use a community space instead.
regression
Something that used to work in a previous version stopped working
upstream
An issue with a third-party project that this project uses.
use case
Describes a real use case that is difficult or impossible, but does not propose a solution.
No labels
abi/f32
abi/ilp32
abi/sf
accepted
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
backend/c
backend/llvm
backend/self-hosted
binutils
breaking
build system
debug info
docs
error message
frontend
fuzzing
incremental
lib/c
lib/compiler-rt
lib/cxx
lib/std
lib/tsan
lib/ubsan-rt
lib/unwind
linking
miscompilation
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
release notes
testing
zig cc
zig fmt
zig reduce
bounty
bug
contributor-friendly
downstream
enhancement
infra
optimization
question
regression
upstream
use case
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 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#31499
Reference in a new issue
ziglang/zig
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?