mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.33k stars 1.53k forks source link

BlockingIOError when running meson test on the master branch #13113

Closed DaanDeMeyer closed 1 month ago

DaanDeMeyer commented 1 month ago

Describe the bug

Running the following: ../meson/meson.py test -C build --suite integration-tests --num-processes 1 TEST-02-UNITTESTS -v

Results in this exception when the test is finished:

handle: <Handle TestHarness._run_tests.<locals>.test_done(<Task finishe...king', 13312)>) at /home/daandemeyer/projects/meson/mesonbuild/mtest.py:2033>
Traceback (most recent call last):
  File "/usr/lib64/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/home/daandemeyer/projects/meson/mesonbuild/mtest.py", line 2035, in test_done
    f.result()
  File "/home/daandemeyer/projects/meson/mesonbuild/mtest.py", line 2027, in run_test
    res = await test.run(self)
          ^^^^^^^^^^^^^^^^^^^^
  File "/home/daandemeyer/projects/meson/mesonbuild/mtest.py", line 1497, in run
    await self._run_cmd(harness, cmd)
  File "/home/daandemeyer/projects/meson/mesonbuild/mtest.py", line 1564, in _run_cmd
    await p.wait(self.runobj)
  File "/home/daandemeyer/projects/meson/mesonbuild/mtest.py", line 1368, in wait
    await complete_all(self.all_futures, timeout=test.timeout)
  File "/home/daandemeyer/projects/meson/mesonbuild/mtest.py", line 1264, in complete_all
    check_futures(done)
  File "/home/daandemeyer/projects/meson/mesonbuild/mtest.py", line 1253, in check_futures
    f.result()
  File "/home/daandemeyer/projects/meson/mesonbuild/mtest.py", line 1295, in collect_stdo
    test.stdo = await read_decode(reader, self.queue, console_mode)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daandemeyer/projects/meson/mesonbuild/mtest.py", line 1196, in read_decode
    print(line, end='', flush=True)
BlockingIOError: [Errno 11] write could not complete without blocking

To Reproduce

Reproducing is quite involved, will add instructions if really needed.

Expected behavior

No exception happens.

system parameters

DaanDeMeyer commented 1 month ago

Turns out this happens because qemu puts stdio in nonblocking mode. Not something to fix in meson