std.Io.net: enable more tests + coverage for canceling accept #31468
net-test-coverage into master 480b750689
28abe1d748
+ stage3-debug/bin/zig build --prefix stage4-debug -Denable-llvm -Dno-lib -Dtarget=x86_64-linux-musl -Duse-zig-libcxx -Dversion-string=0.16.0-dev.2864+28abe1d74
+ stage4-debug/bin/zig test ../test/behavior.zig
General protection exception (no address available)
/home/ci/.cache/act/6f223879ad80ff37/hostexecutor/lib/std/mem.zig:781:42: 0x1aebf76 in eqlBytes (std.zig)
x |= @as(u32, @bitCast(a[n..][0..4].*)) ^ @as(u32, @bitCast(b[n..][0..4].*));
^
/home/ci/.cache/act/6f223879ad80ff37/hostexecutor/lib/std/mem.zig:736:24: 0x1aeb6ee in eql__anon_13712 (std.zig)
return eqlBytes(sliceAsBytes(a), sliceAsBytes(b));
^
/home/ci/.cache/act/6f223879ad80ff37/hostexecutor/test/behavior/nan.zig:37:31: 0x138847d9 in test.nan memory equality (behavior.zig)
try testing.expect(mem.eql(u8, mem.asBytes(&qnan_u32), mem.asBytes(&qnan_f32)));
^
/home/ci/.cache/act/6f223879ad80ff37/hostexecutor/lib/compiler/test_runner.zig:255:25: 0x1bf4786 in mainTerminal (test_runner.zig)
if (test_fn.func()) |_| {
^
/home/ci/.cache/act/6f223879ad80ff37/hostexecutor/lib/compiler/test_runner.zig:70:28: 0x1bf3fa2 in main (test_runner.zig)
return mainTerminal(init);
^
/home/ci/.cache/act/6f223879ad80ff37/hostexecutor/lib/std/start.zig:678:88: 0x1bf0886 in callMain (std.zig)
if (fn_info.params[0].type.? == std.process.Init.Minimal) return wrapMain(root.main(.{
^
/home/ci/.cache/act/6f223879ad80ff37/hostexecutor/lib/std/start.zig:190:5: 0x1bf0291 in _start (std.zig)
asm volatile (switch (native_arch) {
^
error: the following test command terminated with signal ABRT:
/home/ci/.cache/act/6f223879ad80ff37/hostexecutor/zig-local-cache/o/1c1763fdacdc42b2c5985027022cb2bb/test --seed=0x12613d8f
hm the AlertableSyscall strategy did not fix cancelation:
test
+- test-modules
+- test-std
+- run test std-native-znver5-ReleaseSafe 3014 pass, 64 skip, 1 timeout (3079 total)
error: 'Io.net.test.test.cancel accept' timed out after 30m4.99ms
failed command: "C:\\Users\\ci\\.cache\\act\8円d01ce3895aa14a5\\hostexecutor\\zig-local-cache\\o\\c93adc2bdb4aac2d08b840f1a213ddd2\\test.exe" "--cache-dir=C:\\Users\\ci\\.cache\\act\8円d01ce3895aa14a5\\hostexecutor\\zig-local-cache" --seed=0x85c100da --listen=-
test
+- test-modules
+- test-std
+- run test std-native-znver5-Debug 3014 pass, 64 skip, 1 timeout (3079 total)
error: 'Io.net.test.test.cancel accept' timed out after 30m2.755ms
failed command: "C:\\Users\\ci\\.cache\\act\8円d01ce3895aa14a5\\hostexecutor\\zig-local-cache\\o\8円cf580ef2ce375b7efc00bdab819bde3\\test.exe" "--cache-dir=C:\\Users\\ci\\.cache\\act\8円d01ce3895aa14a5\\hostexecutor\\zig-local-cache" --seed=0x85c100da --listen=-
test
+- test-modules
+- test-std
+- run test std-native-znver5-Debug-libc 3014 pass, 64 skip, 1 timeout (3079 total)
error: 'Io.net.test.test.cancel accept' timed out after 30m8.211ms
failed command: "C:\\Users\\ci\\.cache\\act\8円d01ce3895aa14a5\\hostexecutor\\zig-local-cache\\o\\d24e21bd74e49a5de8c8b50fc0c7a945\\test.exe" "--cache-dir=C:\\Users\\ci\\.cache\\act\8円d01ce3895aa14a5\\hostexecutor\\zig-local-cache" --seed=0x85c100da --listen=-
Ah, sorry, I think you misunderstood me before: the fix isn't this trivial, we will still need to do the same thing as in other overlapped code paths where we set a completion APC and use an alertable wait. Actually, thinking about it, I'm not entirely sure if you can actually set an APC for ws2_32 stuff, so maybe this is a bit trickier? (I don't have docs open right now, on mobile.) I'll take a look at this later today so I can at least confirm what you could do.
I think these are the two options:
- use
LPOVERLAPPEDwith ws2_32 operations and add additional cancel mechanism that callsCancelIoExwhich needs both theHANDLEand pointer toLPOVERLAPPEDoperation to cancel. - start using \Device\Afd directly (against advice of #31131)
28abe1d748
314264ee7d
No due date set.
No dependencies set.
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?