Bug 2350289 - xpra fails to build from source with Python 3.14: RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase.
Summary: xpra fails to build from source with Python 3.14: RuntimeError: An attempt ha...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xpra
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Antonio T. sagitter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2372242 (view as bug list)
Depends On:
Blocks: PYTHON3.14 F43FTBFS F43FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2025-03-06 09:58 UTC by Karolina Surma
Modified: 2025-06-13 20:29 UTC (History)
2 users (show)

Fixed In Version: xpra-5.1-1.fc43
Clone Of:
Environment:
Last Closed: 2025-06-12 16:03:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2025-03-06 09:58:49 UTC
Please note the build is terminated after 2 days and 2 hours (the maximum that Copr allows), so I don't have the full logs, but one issue is related to Python 3.14:

Compiling xpra/net/lz4/lz4.pyx because it changed.
Traceback (most recent call last):
  File "/usr/lib64/python3.14/multiprocessing/forkserver.py", line 335, in main
    code = _serve_one(child_r, fds,
                      unused_fds,
                      old_handlers)
'nvcc --version' failed with return code 127
stderr: None
updated ./xpra/build_info.py with:
* BUILD_BIT            = 64bit
* BUILD_CPU            = Intel(R) Xeon(R) Platinum 8488C
* BUILD_DATE           = 2025-01-22
* BUILD_MACHINE        = x86_64
* BUILD_OS             = linux
* BUILD_TIME           = 00:00
* COMPILER_VERSION     = gcc (GCC) 15.0.1 20250225 (Red Hat 15.0.1-0)
* CYTHON_VERSION       = 3.0.11
* LINKER_VERSION       = GNU ld version 2.44-3.fc43
* PYTHON_VERSION       = 3.14.0
* lib_gobjectintrospection10 = 1.82.0
* lib_gtk30            = 3.24.43
* lib_gtkx1130         = 3.24.43
* lib_py3cairo         = 1.25.1
* lib_pygobject30      = 3.51.0
* lib_python3          = 3.14
* lib_vpx              = 1.15.0
* lib_x11              = 1.8.11
* lib_xcomposite       = 0.4.6
* lib_xdamage          = 1.1.6
* lib_xext             = 1.3.6
* lib_xfixes           = 6.0.1
* lib_xkbfile          = 1.1.3
* lib_xrandr           = 1.5.4
* lib_xtst             = 1.2.5
  File "/usr/lib64/python3.14/multiprocessing/forkserver.py", line 375, in _serve_one
    code = spawn._main(child_r, parent_sentinel)
  File "/usr/lib64/python3.14/multiprocessing/spawn.py", line 131, in _main
    prepare(preparation_data)
    ~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/spawn.py", line 246, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/spawn.py", line 297, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
                                  run_name="__mp_main__")
  File "<frozen runpy>", line 287, in run_path
  File "<frozen runpy>", line 98, in _run_module_code
  File "<frozen runpy>", line 88, in _run_code
  File "/builddir/build/BUILD/xpra-5.0.10-build/xpra-5.0.10/setup.py", line 2502, in <module>
    setup_options["ext_modules"] = cythonize(ext_modules,
                                   ~~~~~~~~~^^^^^^^^^^^^^
                                             nthreads=nthreads,
                                             ^^^^^^^^^^^^^^^^^^
                                             gdb_debug=debug_ENABLED,
                                             ^^^^^^^^^^^^^^^^^^^^^^^^
                                             compiler_directives=compiler_directives,
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                             )
                                             ^
  File "/usr/lib64/python3.14/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
    pool = multiprocessing.Pool(
        nthreads, initializer=_init_multiprocessing_helper)
  File "/usr/lib64/python3.14/multiprocessing/context.py", line 119, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild,
                context=self.get_context())
  File "/usr/lib64/python3.14/multiprocessing/pool.py", line 215, in __init__
    self._repopulate_pool()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.14/multiprocessing/pool.py", line 306, in _repopulate_pool
    return self._repopulate_pool_static(self._ctx, self.Process,
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
                                        self._processes,
                                        ^^^^^^^^^^^^^^^^
    ...<3 lines>...
                                        self._maxtasksperchild,
                                        ^^^^^^^^^^^^^^^^^^^^^^^
                                        self._wrap_exception)
                                        ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/pool.py", line 329, in _repopulate_pool_static
    w.start()
    ~~~~~~~^^
  File "/usr/lib64/python3.14/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
                  ~~~~~~~~~~~^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/context.py", line 300, in _Popen
    return Popen(process_obj)
  File "/usr/lib64/python3.14/multiprocessing/popen_forkserver.py", line 35, in __init__
    super().__init__(process_obj)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/popen_fork.py", line 20, in __init__
    self._launch(process_obj)
    ~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/multiprocessing/popen_forkserver.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/usr/lib64/python3.14/multiprocessing/spawn.py", line 164, in get_preparation_data
    _check_not_importing_main()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.14/multiprocessing/spawn.py", line 140, in _check_not_importing_main
    raise RuntimeError('''
    ...<16 lines>...
    ''')
RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

        To fix this issue, refer to the "Safe importing of main module"
        section in https://docs.python.org/3/library/multiprocessing.html
        
'nvcc --version' failed with return code 127

From https://docs.python.org/dev/whatsnew/3.14.html#incompatible-changes:
On platforms other than macOS and Windows, the default start method for multiprocessing and ProcessPoolExecutor switches from fork to forkserver.

The testing takes place in Copr, where you can see the logs from the latest build:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/xpra/

Reproducible: Always

Comment 1 Karolina Surma 2025-06-11 16:07:18 UTC
*** Bug 2372242 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Update System 2025-06-13 20:25:31 UTC
FEDORA-2025-b3525fe496 (xpra-5.1-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-b3525fe496

Comment 3 Fedora Update System 2025-06-13 20:29:00 UTC
FEDORA-2025-b3525fe496 (xpra-5.1-1.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.