Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible fork error on macOS running Python 3.9 #543

Closed
ghost opened this issue Nov 3, 2020 · 2 comments
Closed

Ansible fork error on macOS running Python 3.9 #543

ghost opened this issue Nov 3, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 3, 2020

  • Operating System Version: 10.15.7
  • Deploying via (VirtualBox/VMWare/AWS/Azure/ESXi): Azure
  • Vagrant Version (if applicable): Not applicable

Description of the issue:

While attempting to provision the Windows hosts via Ansible I got the following error:

TASK [Gathering Facts] **************************************************************************************************************************************************************************************************************** objc[21451]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. objc[21451]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug. ERROR! A worker was found in a dead state

I came across this blog post which solved the issue for me:
https://rafpe.ninja/2018/02/24/ansible-error-nsplaceholderdate-initialize-may-have-been-in-progress-in-another-thread-when-fork-was-called/

Adding the following command before running the Ansible playbooks solved the issue

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

You may want to add this to your build documentation

@clong
Copy link
Owner

clong commented Nov 3, 2020

Ah yes, I've run into the same issue but forgot to document it. Thanks for the reminder!

clong added a commit that referenced this issue Nov 3, 2020
Note about MacOS Ansible fork() error from #543
@clong
Copy link
Owner

clong commented Nov 3, 2020

Done! c68da5c

Also updated detectionlab.network site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant