Bug 257353 - lang/python38: port very flaky when built under QEMU
Summary: lang/python38: port very flaky when built under QEMU
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-python (Nobody)
URL: https://portsfallout.com/fallout?port...
Depends on:
Reported: 2021-07-23 13:20 UTC by Robert Clausecker
Modified: 2021-07-23 13:20 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (python)


Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker 2021-07-23 13:20:23 UTC
When building lang/python38 with QEMU, the build usually gets stuck with an error like this:

Listing '/wrkdirs/usr/ports/lang/python38/work/stage/usr/local/lib/python3.8/xml/parsers'...
Listing '/wrkdirs/usr/ports/lang/python38/work/stage/usr/local/lib/python3.8/xml/sax'...
Listing '/wrkdirs/usr/ports/lang/python38/work/stage/usr/local/lib/python3.8/xmlrpc'...
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/python38/work/stage/usr/local/lib/python3.8/compileall.py", line 332, in <module>
    exit_status = int(not main())
  File "/wrkdirs/usr/ports/lang/python38/work/stage/usr/local/lib/python3.8/compileall.py", line 314, in main
    if not compile_dir(dest, maxlevels, args.ddir,
  File "/wrkdirs/usr/ports/lang/python38/work/stage/usr/local/lib/python3.8/compileall.py", line 93, in compile_dir
    success = min(results, default=True)
  File "/wrkdirs/usr/ports/lang/python38/work/stage/usr/local/lib/python3.8/concurrent/futures/process.py", line 484, in _chain_from_iterable_of_lists
    for element in iterable:
  File "/wrkdirs/usr/ports/lang/python38/work/stage/usr/local/lib/python3.8/concurrent/futures/_base.py", line 619, in result_iterator
    yield fs.pop().result()
  File "/wrkdirs/usr/ports/lang/python38/work/stage/usr/local/lib/python3.8/concurrent/futures/_base.py", line 444, in result
    return self.__get_result()
  File "/wrkdirs/usr/ports/lang/python38/work/stage/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

Some times it also does not fail, which leads me to believe there might be some sort of race
condition made visible by the use of emulation.

There are many ports fallouts demonstrating this issue:


Unfortunately, as the bug causes the port to get stuck, this is very annoying to deal with.
Please investigate and perhaps mark as BROKEN when QEMU_EMULATING is defined.