Python crashes when running role
See original GitHub issueI’m not sure if this is related to this particular role, or perhaps Python, but I thought it would be a good idea to document the bug in the event anyone else runs into this, and perhaps the maintainers of this repository have recommendations on how to debug this.
I installed this role by doing the following:
requirements.yml
ansible-galaxy install -r requirements.yml
site.yml
- name: Install node_exporter on all bare-metal hosts
hosts: bare-metal
roles:
- cloudalchemy.node-exporter
And then attempted to do a dry run with:
ansible-playbook -i ansible/hosts.yml --ask-become-pass --check ansible/site.yml
The output looks like this:
PLAY [Install node_exporter on all bare-metal hosts] ******************************************************************************************************************
TASK [Gathering Facts] ************************************************************************************************************************************************
ok: [nuc7i5b.brooks.network]
ok: [nuc7i5a.brooks.network]
ok: [pi.brooks.network]
TASK [cloudalchemy.node-exporter : Gather variables for each operating system] ****************************************************************************************
fatal: [nuc7i5a.brooks.network]: FAILED! => {"msg": "No file was found when using with_first_found. Use the 'skip: true' option to allow this task to be skipped if no files are found"}
fatal: [nuc7i5b.brooks.network]: FAILED! => {"msg": "No file was found when using with_first_found. Use the 'skip: true' option to allow this task to be skipped if no files are found"}
ok: [pi.brooks.network] => (item=/Users/brooks/.ansible/roles/cloudalchemy.node-exporter/vars/debian.yml)
TASK [cloudalchemy.node-exporter : Naive assertion of proper listen address] ******************************************************************************************
ok: [pi.brooks.network] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [cloudalchemy.node-exporter : Fail on unsupported init systems] **************************************************************************************************
skipping: [pi.brooks.network]
TASK [cloudalchemy.node-exporter : Check collectors] ******************************************************************************************************************
TASK [cloudalchemy.node-exporter : Get checksum list from github] *****************************************************************************************************
objc[93522]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[93522]: +[__NSPlaceholderDate 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.
And I get this from OSX:
![screen shot 2018-09-17 at 4 00 02 pm](https://user-images.githubusercontent.com/934497/45647472-f1884a80-ba93-11e8-93eb-712630c51bdf.png)
I’m running this from MacOS 10.13.6, with Python version 2.7.15
installed from brew.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
python crashes when running code - DigitalOcean
so i was making a gui for a calculator app. ok so when i run the code it opens up python and in...
Read more >debugging - Python crashes in rare cases when running code
PyObject_ClearWeakRefs is in the python interpreter itself. But if it only happens in a small number of runs, it could be hardware related....
Read more >Dying, fast and slow: out-of-memory crashes in Python
Crashing is just one symptom of running out of memory. Your process might instead just run very slowly, your computer or VM might...
Read more >Slicer often crashes when running with python-script in loading
Actual behavior: crashes almost always. import os import sys from DICOMLib import DICOMUtils import DICOMScalarVolumePlugin def importDicomDir(dicomDataDir): ...
Read more >How do I troubleshoot a MATLAB crash when trying to use the ...
Whenever I try to use some Python functions in MATLAB using the Python interface, ... This runs the Python commands in a separate...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sure! I use node_exporter to monitor the hosts in my home lab. I’m starting to migrate over to Ansible as a configuration management tool and wanted to avoid re-inventing the wheel, so I came across this role.
I was able to resolve this by exporting the
OBJC_DISABLE_INITIALIZE_FORK_SAFETY
variable toYES
.Via https://github.com/ansible/ansible/issues/31869#issuecomment-337769174.