Skip to content

3.11 beta 1: _posixsubprocess.fork_exec fails with TypeError: expected bytes, str found #93327

Closed
@arcivanov

Description

@arcivanov

Bug report

On Linux 3.11 beta 1 there is a novel failure in MP-driven code that is not present in 3.10 - 3.6

Found as part of experimental build failures in PyBuilder (pybuilder/pybuilder#856) via GHA: https://github.com/pybuilder/pybuilder/runs/6638546599

File "/home/runner/work/pybuilder/pybuilder/src/main/python/pybuilder/plugins/python/remote_tools/__init__.py", line 48, in start_tool
    proc.start()
    ^^^^^^^^^^^^
  File "/home/runner/work/pybuilder/pybuilder/src/main/python/pybuilder/remote/__init__.py", line 136, in start
    return self.proc.start()
           ^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.0-beta.1/x64/lib/python3.11/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
                  ^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.0-beta.1/x64/lib/python3.11/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
           ^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.0-beta.1/x64/lib/python3.11/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.0-beta.1/x64/lib/python3.11/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.0-beta.1/x64/lib/python3.11/multiprocessing/popen_spawn_posix.py", line 58, in _launch
    self.pid = util.spawnv_passfds(spawn.get_executable(),
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.0-beta.1/x64/lib/python3.11/multiprocessing/util.py", line 453, in spawnv_passfds
    return _posixsubprocess.fork_exec(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected bytes, str found

Your environment

  • CPython versions tested on: 3.11 beta 1, 3.10 - 3.6
  • Operating system and architecture: Linux x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixestype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions