question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python crashes when running role

See original GitHub issue

I’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

I’m running this from MacOS 10.13.6, with Python version 2.7.15 installed from brew.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bswinnertoncommented, Sep 17, 2018

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.

1reaction
bswinnertoncommented, Sep 17, 2018

I was able to resolve this by exporting the OBJC_DISABLE_INITIALIZE_FORK_SAFETY variable to YES.

Via https://github.com/ansible/ansible/issues/31869#issuecomment-337769174.

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found