I am encountering an issue while trying to run Celery tasks on my Mac M1 machine. The error message I'm getting is as follows:
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
[2023-11-20 15:51:19,174: ERROR/MainProcess] Process 'ForkPoolWorker-8' pid:5547 exited with 'signal 11 (SIGSEGV)'
I am using Celery for my Django app task processing, and this issue seems to be related to forking on the M2 architecture.
I initially attempted to resolve the issue by exporting OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
, which seemed to work for a brief period. However, the problem has resurfaced, and this solution no longer has any effect.
It's worth noting that I am currently running MacOS Sonama 14.2 Beta
on my machine.
Interestingly, I encountered and successfully resolved this problem once before while on the same beta program.
Any insights or suggestions on how to resolve this issue would be greatly appreciated.
Not sure if it will help in your case, but I also encountered issues using celery on my Mac with errors related to forking process
The solution that did work for me was to launch the worker with the --pool=solo option