New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail randomly on Ubuntu 16.04 WSL (Windows Subsystem for Linux) #894

Closed
alexnask opened this Issue Apr 5, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@alexnask
Contributor

alexnask commented Apr 5, 2018

Steps:

git clone https://github.com/zig-lang/zig
cd zig
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)
make
make install
./zig build --build-file ../build.zig test

Output:

docgen example code 1/116...OK
docgen example code 2/116...OK
docgen example code 3/116...OK
docgen example code 4/116...OK
docgen example code 5/116...OK
docgen example code 6/116...OK
docgen example code 7/116...OK
docgen example code 8/116...OK
docgen example code 9/116...OK
docgen example code 10/116...OK
docgen example code 11/116...OK
docgen example code 12/116...OK
docgen example code 13/116.../home/alexnask/zig/build/zig:1:1: error: invalid character: '\x7f'
�ELF����
^

The following command exited with code 1:
build/zig build-obj docgen_tmp/test.zig --color on --output docgen_tmp/test.o
doc/langref.html.in:644:28: error: example failed to compile
      {#code_begin|syntax#}
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: ParseError
/home/alexnask/zig/doc/docgen.zig:981:17: 0x23932f in ??? (docgen)
                return error.ChildExitError;
                ^
/home/alexnask/zig/doc/docgen.zig:244:5: 0x2395a8 in ??? (docgen)
    return error.ParseError;
    ^
/home/alexnask/zig/doc/docgen.zig:959:82: 0x22989e in ??? (docgen)
                            _ = exec(allocator, build_args.toSliceConst()) catch return parseError(
                                                                                 ^
/home/alexnask/zig/build/lib/zig/std/os/index.zig:750:9: 0x24ab42 in ??? (docgen)
        return switch (err) {
        ^
/home/alexnask/zig/build/lib/zig/std/os/index.zig:719:9: 0x247a50 in ??? (docgen)
        return deleteFilePosix(allocator, file_path);
        ^
/home/alexnask/zig/doc/docgen.zig:62:5: 0x220a61 in ??? (docgen)
    try genHtml(allocator, &tokenizer, &toc, &buffered_out_stream.stream, zig_exe);
    ^
The following command exited with error code 1:
cd ./.. && zig-cache/docgen build/zig doc/langref.html.in zig-cache/langref.html
error: UncleanExit
/home/alexnask/zig/build/lib/zig/std/build.zig:579:21: 0x2746c7 in ??? (build)
                    return error.UncleanExit;
                    ^
/home/alexnask/zig/build/lib/zig/std/build.zig:1807:9: 0x26676f in ??? (build)
        return self.builder.spawnChildEnvMap(cwd, self.env_map, self.argv);
        ^
/home/alexnask/zig/build/lib/zig/std/build.zig:1981:9: 0x249fba in ??? (build)
        try self.makeFn(self);
        ^
/home/alexnask/zig/build/lib/zig/std/build.zig:306:9: 0x248f75 in ??? (build)
        try s.make();
        ^
/home/alexnask/zig/build/lib/zig/std/build.zig:300:17: 0x248f26 in ??? (build)
                return err;
                ^
/home/alexnask/zig/build/lib/zig/std/build.zig:300:17: 0x248f26 in ??? (build)
                return err;
                ^
/home/alexnask/zig/build/lib/zig/std/build.zig:252:13: 0x24227e in ??? (build)
            try self.makeOneStep(s);
            ^
/home/alexnask/zig/build/lib/zig/std/special/build_runner.zig:129:9: 0x23f565 in ??? (build)
        return err;
        ^

Build failed. The following command failed:
./../zig-cache/build ./zig ./.. ./../zig-cache test

Default C/C++ compilers:

# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.2.0-1ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.2.0 (Ubuntu 7.2.0-1ubuntu1~16.04)

# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.2.0-1ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.2.0 (Ubuntu 7.2.0-1ubuntu1~16.04)

@alexnask alexnask changed the title from Tests fail on Ubuntu 16.04 on Windows to Tests fail on Ubuntu 16.04 WSL (Windows Subsystem for Linux) Apr 5, 2018

@alexnask

This comment has been minimized.

Contributor

alexnask commented Apr 5, 2018

The example code it errors on appears to be pretty random, running the tests a couple of times I got through the docgen phase and everything seems to run smoothly afterwards.

@alexnask alexnask changed the title from Tests fail on Ubuntu 16.04 WSL (Windows Subsystem for Linux) to Docgen tests fail randomly on Ubuntu 16.04 WSL (Windows Subsystem for Linux) Apr 5, 2018

@alexnask alexnask changed the title from Docgen tests fail randomly on Ubuntu 16.04 WSL (Windows Subsystem for Linux) to Tests fail randomly on Ubuntu 16.04 WSL (Windows Subsystem for Linux) Apr 5, 2018

@alexnask

This comment has been minimized.

Contributor

alexnask commented Apr 5, 2018

Actually, it appears that any test may fail with this error message randomly :-/

@andrewrk

This comment has been minimized.

Member

andrewrk commented Apr 5, 2018

It looks like an attempt to use an ELF file as source code. I'll try running the tests on the WSL and see if I can figure it out.

@alexnask

This comment has been minimized.

Contributor

alexnask commented Apr 5, 2018

@andrewrk
It seems to happen randomly on any compilation, not only when testing, if that helps.
(It happened while I was testing with zig run)

@andrewrk andrewrk added this to the 0.4.0 milestone Apr 6, 2018

@andrewrk andrewrk added the bug label Apr 15, 2018

@andrewrk andrewrk modified the milestones: 0.4.0, 0.3.0 Apr 15, 2018

@andrewrk andrewrk closed this in 4a2bfec Apr 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment