Skip to content

Conversation

@mikdusan
Copy link
Member

@mikdusan mikdusan commented Sep 23, 2021

closes #8653

@mikdusan
Copy link
Member Author

mikdusan commented Sep 23, 2021

Got a failure on CI so here's the reduction: target x86_64 and use qemu:

$ zig test lib/std/x/net/tcp.zig -lc -target x86_64-linux-musl -mcpu x86_64 --test-cmd qemu-x86_64 --test-cmd-bin -I ./test
Test [4/5] test "tcp/client: read and write multiple vectors"... FAIL (MessageTooBig)
/home/mike/project/zig/work/main/lib/std/os.zig:5874:27: 0x211c69 in std.os.recvfrom (test)
                .AGAIN => return error.WouldBlock,
                          ^
/home/mike/project/zig/work/main/lib/std/os.zig:5835:5: 0x211b4a in std.os.recv (test)
    return recvfrom(sock, buf, flags, null, null);
    ^
/home/mike/project/zig/work/main/lib/std/x/os/socket_posix.zig:63:13: 0x211ae9 in std.x.os.socket_posix.Mixin(std.x.os.socket.Socket).read (test)
            return os.recv(self.fd, buf, flags);
            ^
/home/mike/project/zig/work/main/lib/std/x/net/tcp.zig:130:9: 0x211847 in Client.read (test)
        return self.socket.read(buf, flags);
        ^
/home/mike/project/zig/work/main/lib/std/x/net/tcp.zig:64:13: 0x2117f3 in Reader.read (test)
            return self.client.read(buffer, self.flags);
            ^
/home/mike/project/zig/work/main/lib/std/io/reader.zig:27:13: 0x20c23f in std.io.reader.Reader(Reader,@typeInfo(@typeInfo(@TypeOf(Reader.read)).Fn.return_type.?).ErrorUnion.error_set,Reader.read).read (test)
            return readFn(self.context, buffer);
            ^
/home/mike/project/zig/work/main/lib/std/x/os/socket_posix.zig:78:17: 0x2123b0 in std.x.os.socket_posix.Mixin(std.x.os.socket.Socket).writeMessage (test)
                return switch (os.errno(rc)) {
                ^
/home/mike/project/zig/work/main/lib/std/x/net/tcp.zig:143:9: 0x20c557 in Client.writeMessage (test)
        return self.socket.writeMessage(msg, flags);
        ^
/home/mike/project/zig/work/main/lib/std/x/net/tcp.zig:397:9: 0x2091d4 in test "tcp/client: read and write multiple vectors" (test)
    _ = try conn.client.writeMessage(Socket.Message.fromBuffers(&[_]Buffer{
        ^
4 passed; 0 skipped; 1 failed.
error: the following test command failed with exit code 1:
qemu-x86_64 lib/std/x/net/zig-cache/o/0deb3d98cbc5c5c4275cbc4310c1e045/test /home/mike/project/zig/work/main/_build/zig

weirdness 1. zig build test -Denable-qemu passed on my system last night, and this I think includes the above tests. How come it did not fail?

weirdness 2. this reduction fails for qemu-5.2.0 as well on local host. So how come it's not failing for CI?

edit: weirdness 1 explained because some fields in msghdr are undefined in qemu's user space layer and we need this simple patch to fix. This patch has been submitted to qemu upstream but no word on when/if it will land.

edit: weirdness 2 explained because our 5.2.0 was sans above-mentioned patch, 5.2.0.1 works, which is what CI before this PR is using.

@mikdusan mikdusan changed the title ci linux: bump qemu-6.1.0 ci linux: bump qemu-6.1.0.1 Sep 23, 2021
@mikdusan mikdusan merged commit cc4d38e into ziglang:master Sep 24, 2021
@mikdusan mikdusan deleted the issue.8653 branch September 24, 2021 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fs.copyFile test fails with qemu-6.0.0 and target i386 linux none

1 participant