ashb commented on code in PR #45124:
URL: https://github.com/apache/airflow/pull/45124#discussion_r1895730265
##########
airflow/dag_processing/manager.py:
##########
@@ -181,7 +180,15 @@ def _run_processor_manager(
# to iterate the child processes
set_new_process_group()
- setproctitle("airflow scheduler -- DagFileProcessorManager")
+
+ # setproctitle causes issue on Mac OS:
https://github.com/benoitc/gunicorn/issues/3021
+ os_type = sys.platform
+ if os_type == "darwin":
+ log.info("Mac OS detected, skipping setproctitle")
+ else:
+ from setproctitle import setproctitle
+ setproctitle("airflow scheduler -- DagFileProcessorManager")
Review Comment:
```
task_sdk/tests/execution_time/test_supervisor.py::TestWatchedSubprocess::test_supervise_handles_deferred_task
Fatal Python error: Segmentation fault
Current thread 0x00000001fb058f40 (most recent call first):
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/setproctitle/__init__.py",
line 57 in <module>
File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 995 in exec_module
File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
File
"/Users/ash/code/airflow/airflow/task_sdk/src/airflow/sdk/execution_time/task_runner.py",
line 217 in startup
File
"/Users/ash/code/airflow/airflow/task_sdk/src/airflow/sdk/execution_time/task_runner.py",
line 339 in main
File
"/Users/ash/code/airflow/airflow/task_sdk/src/airflow/sdk/execution_time/supervisor.py",
line 135 in _subprocess_main
File
"/Users/ash/code/airflow/airflow/task_sdk/src/airflow/sdk/execution_time/supervisor.py",
line 256 in _fork_main
File
"/Users/ash/code/airflow/airflow/task_sdk/src/airflow/sdk/execution_time/supervisor.py",
line 349 in start
File
"/Users/ash/code/airflow/airflow/task_sdk/src/airflow/sdk/execution_time/supervisor.py",
line 899 in supervise
File
"/Users/ash/code/airflow/airflow/task_sdk/tests/execution_time/test_supervisor.py",
line 295 in test_supervise_handles_deferred_task
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/python.py",
line 159 in pytest_pyfunc_call
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_callers.py",
line 103 in _multicall
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_manager.py",
line 120 in _hookexec
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_hooks.py",
line 513 in __call__
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/python.py",
line 1627 in runtest
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/runner.py",
line 174 in pytest_runtest_call
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_callers.py",
line 103 in _multicall
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_manager.py",
line 120 in _hookexec
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_hooks.py",
line 513 in __call__
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/runner.py",
line 242 in <lambda>
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/runner.py",
line 341 in from_call
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/runner.py",
line 241 in call_and_report
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/runner.py",
line 132 in runtestprotocol
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/runner.py",
line 113 in pytest_runtest_protocol
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_callers.py",
line 103 in _multicall
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_manager.py",
line 120 in _hookexec
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_hooks.py",
line 513 in __call__
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/main.py",
line 362 in pytest_runtestloop
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_callers.py",
line 103 in _multicall
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_manager.py",
line 120 in _hookexec
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_hooks.py",
line 513 in __call__
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/main.py",
line 337 in _main
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/main.py",
line 283 in wrap_session
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/main.py",
line 330 in pytest_cmdline_main
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_callers.py",
line 103 in _multicall
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_manager.py",
line 120 in _hookexec
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/pluggy/_hooks.py",
line 513 in __call__
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/config/__init__.py",
line 175 in main
File
"/Users/ash/code/airflow/airflow/.venv/lib/python3.12/site-packages/_pytest/config/__init__.py",
line 201 in console_main
File "/Users/ash/code/airflow/airflow/.venv/bin/pytest", line 8 in <module>
Extension modules: _time_machine, charset_normalizer.md,
requests.packages.charset_normalizer.md, requests.packages.chardet.md,
sqlalchemy.cimmutabledict, sqlalchemy.cprocessors, sqlalchemy.cresultproxy,
yaml._yaml, _cffi_backend, lazy_object_proxy.cext, markupsafe._speedups,
psutil._psutil_osx, psutil._psutil_posix, msgspec._core, psycopg2._psycopg,
multidict._multidict, yarl._quoting_c, propcache._helpers_c, aiohttp._helpers,
aiohttp._http_writer, aiohttp._http_parser, aiohttp._websocket,
frozenlist._frozenlist, setproctitle._setproctitle (total: 24)
FAILED
```
One such error
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]