Repository: rust
Issue: Spurious CI failure: tests/run-make/jobserver-error
Labels: A-testsuite,T-compiler,T-bootstrap,C-bug,A-run-make,I-flaky-test

https://github.com/rust-lang/rust/pull/110177#issuecomment-1507070743 seems to have run into some spurious CI failure

```
---- [run-make] tests/run-make/jobserver-error stdout ----

error: make failed
status: exit status: 2
command: cd "/checkout/tests/run-make/jobserver-error" && AR="i586-unknown-linux-gnu-ar" CC="i586-unknown-linux-gnu-gcc -ffunction-sections -fdata-sections -fPIC -m32 -march=pentium -Wa,-mrelax-relocations=no" CXX="c++ -ffunction-sections -fdata-sections -fPIC -m32 -march=pentium" HOST_RPATH_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerparallel dwp engine executionengine extensions filecheck frontendhlsl frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xray" LLVM_FILECHECK="/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" PYTHON="/usr/bin/python3" RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_LINKER="i586-unknown-linux-gnu-gcc" RUSTDOC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" RUST_BUILD_STAGE="stage2-i586-unknown-linux-gnu" RUST_DEMANGLER="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools-bin/rust-demangler" S="/checkout" TARGET="i586-unknown-linux-gnu" TARGET_RPATH_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/i586-unknown-linux-gnu/lib" TMPDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error" "make"
--- stdout -------------------------------
bash -c 'echo "fn main() {}" | MAKEFLAGS="--jobserver-auth=3,3" LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error  -Clinker='i586-unknown-linux-gnu-gcc' - 3</dev/null' 2>&1 | diff jobserver.stderr -
1c1,27
< error: failed to acquire jobserver token: early EOF on jobserver pipe
---
> error: linking with `i586-unknown-linux-gnu-gcc` failed: exit status: 1
>   |
>   = note: LC_ALL="C" PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/x-tools/i586-unknown-linux-gnu/bin" VSLANG="1033" "i586-unknown-linux-gnu-gcc" "-m64" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rustckXLWxz/symbols.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.rust_out.b8060d94-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.rust_out.b8060d94-cgu.1.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.rust_out.b8060d94-cgu.2.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.rust_out.b8060d94-cgu.3.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.rust_out.b8060d94-cgu.4.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.4u7kfiaws83vwnvi.rcgu.o" "-Wl,--as-needed" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-21dcc623e8bedf43.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-e09f867968bd88e3.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-33fb876b68f7fd77.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-c0ff7ddb2987d8da.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-48db2e664dcd007b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-e4d46294820130ba.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-d22c51811a78dc80.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-328f43c2abce5784.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-c6524d8077d4ee9d.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-fc890bd32fb6cecd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-6deb8c633abe47e3.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-45ff23c614a38f1d.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-daa91946230a4443.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-0b7d1529f62927c0.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-68a2d9e195dd6ed2.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-c2c050aec00eb6da.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-522518611024dce5.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-05898138a596088a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-35b8a4bd2de4e62e.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
>   = note: /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rustckXLWxz/symbols.o' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.rust_out.b8060d94-cgu.0.rcgu.o' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.rust_out.b8060d94-cgu.1.rcgu.o' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.rust_out.b8060d94-cgu.2.rcgu.o' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.rust_out.b8060d94-cgu.3.rcgu.o' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.rust_out.b8060d94-cgu.4.rcgu.o' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.4u7kfiaws83vwnvi.rcgu.o' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-21dcc623e8bedf43.rlib(std-21dcc623e8bedf43.std.9e3db96e-cgu.0.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-e09f867968bd88e3.rlib(panic_unwind-e09f867968bd88e3.panic_unwind.ec2351a3-cgu.0.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-33fb876b68f7fd77.rlib(object-33fb876b68f7fd77.object.c99370cb-cgu.0.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-c0ff7ddb2987d8da.rlib(memchr-c0ff7ddb2987d8da.memchr.2b17ee83-cgu.0.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-48db2e664dcd007b.rlib(addr2line-48db2e664dcd007b.addr2line.3e241b1b-cgu.0.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-e4d46294820130ba.rlib(gimli-e4d46294820130ba.gimli.4fa9f6c2-cgu.0.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-d22c51811a78dc80.rlib(rustc_demangle-d22c51811a78dc80.rustc_demangle.4fc2d765-cgu.0.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-fc890bd32fb6cecd.rlib(miniz_oxide-fc890bd32fb6cecd.miniz_oxide.52a5fa4d-cgu.0.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-6deb8c633abe47e3.rlib(adler-6deb8c633abe47e3.adler.83a4b082-cgu.0.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-68a2d9e195dd6ed2.rlib(libc-68a2d9e195dd6ed2.libc.c95aa1cb-cgu.0.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-c2c050aec00eb6da.rlib(alloc-c2c050aec00eb6da.alloc.684d6a34-cgu.0.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-05898138a596088a.rlib(core-05898138a596088a.core.441cf872-cgu.0.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-35b8a4bd2de4e62e.rlib(compiler_builtins-35b8a4bd2de4e62e.compiler_builtins.d0a19a8a-cgu.118.rcgu.o)' is incompatible with i386 output
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/jobserver-error/jobserver-error/rust_out.rust_out.b8060d94-cgu.0.rcgu.o: file class ELFCLASS64 incompatible with ELFCLASS32
>           /x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/8.3.0/../../../../i586-unknown-linux-gnu/bin/ld: final link failed: file in wrong format
>           collect2: error: ld returned 1 exit status
>
------------------------------------------
--- stderr -------------------------------
make: *** [Makefile:8: all] Error 1
------------------------------------------
```