You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jobs@airflow.apache.org by GitBox <gi...@apache.org> on 2026/04/08 00:39:26 UTC
[GH] (airflow/fix/macos-fork-exec-supervisor): Workflow run "Tests" failed!
The GitHub Actions job "Tests" on airflow.git/fix/macos-fork-exec-supervisor has failed.
Run started by GitHub user kaxil (triggered by kaxil).
Head commit for run:
d04287a46fe8b0633e4b69421a5e1f70cfbcc852 / Kaxil Naik <ka...@gmail.com>
Fix macOS SIGSEGV in task execution by using fork+exec
On macOS, the task supervisor's bare os.fork() copies the parent's
Objective-C runtime state into the child process. When the child
later triggers ObjC class initialization (e.g. socket.getaddrinfo ->
system DNS resolver -> Security.framework -> +[NSNumber initialize]),
the runtime detects the corrupted state and crashes with SIGABRT/SIGSEGV.
This is a well-documented macOS platform limitation -- Apple's ObjC
runtime, CoreFoundation, and libdispatch are not fork-safe. CPython
changed multiprocessing's default start method to "spawn" on macOS in
3.8 for this reason, but Airflow's TaskSDK supervisor uses os.fork()
directly.
The fix: on macOS, immediately call os.execv() after os.fork() for
task execution subprocesses. The exec replaces the child's address
space, giving it clean ObjC state. The socketpair FDs survive across
exec (marked inheritable) and the child reads their numbers from an
environment variable.
Only task execution (target=_subprocess_main) uses fork+exec. DAG
processor and triggerer pass different targets and keep bare fork --
they don't make network calls that trigger the macOS crash.
References:
- https://github.com/python/cpython/issues/105912
- https://github.com/python/cpython/issues/58037
- https://github.com/apache/airflow/discussions/24463
Report URL: https://github.com/apache/airflow/actions/runs/24109243274
With regards,
GitHub Actions via GitBox
---------------------------------------------------------------------
To unsubscribe, e-mail: jobs-unsubscribe@airflow.apache.org
For additional commands, e-mail: jobs-help@airflow.apache.org