ashb commented on code in PR #45124:
URL: https://github.com/apache/airflow/pull/45124#discussion_r1906949527


##########
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:
   So this one is slightly odd. It's def triggerable 100% of the time for me.
   
   Acording to python `threading` module there is only a single thread at the 
point of calling `os.fork`.
   
   The odd thing here is that if I import `setproctitle` eagerly before fork, 
then the SIGSEGV goes away, but Py 3.12 now starts complaining about "This 
process (pid=96305) is multi-threaded, use of fork() may lead to deadlocks in 
the child."



-- 
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]

Reply via email to