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

macOS: [__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. #941

Open
moreati opened this issue Jul 17, 2022 · 1 comment
Labels
affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome ci Issues related to CI in either Travis or Azure

Comments

@moreati
Copy link
Member

moreati commented Jul 17, 2022

Seen on macOS 10.15 builds with Ansible 2.10 and Ansible 3; after configuring

[defaults]
force_valid_group_names = ignore
PLAY [integration/ssh/variables.yml] *******************************************

TASK [ansible_ssh_user _raw_params=ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_SSH_ARGS="" ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets -e ansible_ssh_user=mitogen__has_sudo -e ansible_ssh_pass=has_sudo_password
, chdir=../..] ***
changed: [target]

TASK [shell _raw_params=ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_SSH_ARGS="" ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets -e ansible_ssh_user=mitogen__has_sudo -e ansible_ssh_pass=wrong_password
, chdir=../..] ***
fatal: [target]: FAILED! => changed=true 
  ansible_facts:
    discovered_interpreter_python: /usr/bin/python
  cmd: |-
    ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_SSH_ARGS="" ansible -m shell -a whoami -i "/Users/runner/work/1/s/tests/ansible/hosts" test-targets -e ansible_ssh_user=mitogen__has_sudo -e ansible_ssh_pass=wrong_password
  delta: '0:01:27.893248'
  end: '2022-07-16 16:53:27.319507'
  msg: non-zero return code
  rc: 1
  start: '2022-07-16 16:51:59.426259'
  stderr: |-
    /Users/runner/work/1/s/.tox/py27-mode_localhost-ansible3/lib/python2.7/site-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
      from cryptography.exceptions import InvalidSignature
    objc[15264]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
    objc[15264]: +[__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.
    Fatal Python error: Aborted

e.g. from https://dev.azure.com/mitogen-hq/mitogen/_build/results?buildId=377&view=results
py27-mode_localhost-ansible2.10-macos1015.log

I don't recall seeing it with Mitogen alone, on Mitogen + Ansible and purportedly Vanilla Ansible jobs. However I'm suspicious of the so-called vanilla ones, they should be skipping this task, based on when: is_mitogen.

Low priority for now because macOS 10.15 build images are being removed by Azure shortly (#939).

The error message may point to wider problem on macOS, with Mitogen using fork()/exec(). Or it might be an Ansible problem, or an ANsible+Mitogen interaction.

Further reading

@moreati moreati added bug Code feature that hinders desired execution outcome ci Issues related to CI in either Travis or Azure affects-0.3 Issues related to 0.3.X Mitogen releases labels Jul 17, 2022
@moreati
Copy link
Member Author

moreati commented Jul 17, 2022

There are probably other incidental changes (to Python, Ansible, Mitogen, or macOS) that would trigger the same error or similar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome ci Issues related to CI in either Travis or Azure
Projects
None yet
Development

No branches or pull requests

1 participant