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 using this Plugin in OSX High Sierra

See original GitHub issue

Summary: Attempting to use this plugin on High Sierra is causing a python crash. Reproduced on both Python 2.7.14 and 3.6.2 (installed with brew). Unable to reproduce with other lookup plugins.

Reproduction: A simple playbook with a debug step will do:

- hosts: localhost
  tasks:
    - debug:
        msg: "{{ lookup('vault', 'secret/dev/test', 'hello') }}"

Symptoms: In the terminal which executes this playbook, the output looks like:

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [debug] *******************************************************************
objc[34976]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[34976]: +[__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.

Additional notes: This appears to be due to some low-level objective-C changes introduced in High Sierra. This article (http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html) has more details. It also provides a workaround: Setting the environment variable OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES. Setting this before running ansible provides successful results.

I’ll be honest, I have no clue what the “correct” fix is here, or even if it can be made in this plugin (as opposed to ansible or python itself). Mostly I’m documenting this here in case others come across this issue - I hope someone finds this useful. I’m content with using the environment variable for the time being.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:15
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
snobycommented, Feb 5, 2018

I would also mention that you need to export no_proxy='*' as found on this webpage. Otherwise you will get messages like ERROR! A worker was found in a dead state. I’m running in macOS 10.13.3 , a python virtualenv with python version 2.7.10 and tip of master.

2reactions
ajrgrubbscommented, Jan 10, 2018

@mikedlr unfortunately no longer have the means to retest - traded the mac for a PC since I created this issue. My apologies!

Read more comments on GitHub >

github_iconTop Results From Across the Web

vim with python plugins crashes on macOS high sierra
After upgrading to macOS high sierra, vim began to crash with the plugins need python. I am getting the below error whenever i...
Read more >
M1 native Python is crashing.
I am running macOS Big Sur 11.6. As a remedy I am now running the same code on Anaconda (Rosetta) and it is...
Read more >
Issue 33725: Python crashes on macOS after fork with no exec
msg318352 ‑ (view) Author: Kapil Thangavelu (kapilt) Date: 2018‑06‑01 00:53 msg318361 ‑ (view) Author: Ronald Oussoren (ronaldoussoren) * Date: 2018‑06‑01 05:51 msg318396 ‑ (view) Author:...
Read more >
Speed punk makes glyphs quit immediately - #20 by GeorgSeifert
I'm on Glyphs 3.02 and running with OS High Sierra (10.13.6). ... There was a bug in the plugins that could cause crashes....
Read more >
Mac OS X: Studio One Crashing
Please consult with your plugin manufacturers to make sure that you have the 64-bit versions of your plugins installed on your Mac. If...
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