Python 3.15rc2 on macos x86_64 creates additional thread at startup
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 36k
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 558
Descripción
Bug report
Bug description:
Python 3.15rc2 (from the official installer on macos x86_64 (rosetta emulation, not confirmed for native x86 hardware) creates a second thread at startup, causing any attempt to use os.fork with deprecation warnings enabled to emit a warning. This does not occur on arm64 builds or on non-macos platforms (tested linux and windows, x86 and arm).
Reproduction steps
- Install python 3.15rc2 from https://www.python.org/downloads/release/python-3150rc2. Tested environment: M1 Macbook Pro running macos 26.6.2. Also observed on whatever github's
macos-15runner gives you. - Run
arch -arm64 python3.15 -Werror -c 'import os; os.fork()'. See that no output is produced. - Run
arch -x86_64 python3.15 -Werror -c 'import os; os.fork()'. It prints
Traceback (most recent call last):
File "<string>", line 1, in <module>
import os; os.fork()
~~~~~~~^^
DeprecationWarning: This process (pid=98584) is multi-threaded, use of fork() may lead to deadlocks in the child.
Expected results
A freshly started interpreter should not be running more than one thread and should be able to fork without warning.
CPython versions tested on:
3.15
Operating systems tested on:
macOS
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Run the two reported arch commands with Python 3.15rc2 and compare the macOS arm64 and x86_64 behavior around os.fork(). Trace interpreter startup and thread creation on the x86_64 build; done when a fresh interpreter has no extra thread and the reported fork deprecation warning is absent.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- operating-systems
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100