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

objc[28043]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. #24

Closed
hiro-v opened this issue Nov 4, 2020 · 1 comment
Assignees
Labels
wontfix This will not be worked on

Comments

@hiro-v
Copy link

hiro-v commented Nov 4, 2020

Hi there

I found a bug when running with mlchain run on my MBP (OSX 10.15.6 but I suspect this problem can be reproduced on the older versions)

  • When configure wrapper: None in mlconfig => Run mlchain run => There is no bug when calling API

  • When configure wrapper: gunicorn in mlconfig => Run mlchain run => There is 1 bug that prohibits function called:
    objc[28043]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. objc[28043]: +[__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.

The problem disappears when I run this command before mlchain run
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

As I tested:
On Windows: There is no gunicorn installed. Should find an alternative
On Linux: Everything works fine

@hiro-v hiro-v added the bug Something isn't working label Nov 4, 2020
@hiro-v hiro-v added this to To do in mlchain-core-python via automation Nov 4, 2020
@lamhoangtung
Copy link
Contributor

I was unable to reproduce this error on my own machine running MacOS Mojave 10.14.5. Everything else is the same so until we can fix it latter, just use export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES. Or put it into your .zshrc or .bashrc or .bash_profile to avoid the hassle.

Thanks !

@lamhoangtung lamhoangtung changed the title Bug relating running mlchain cli with Gunicorn wrapper on MacOS objc[28043]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. Nov 5, 2020
@lamhoangtung lamhoangtung added wontfix This will not be worked on and removed bug Something isn't working labels Nov 5, 2020
mlchain-core-python automation moved this from To do to Done Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
Development

No branches or pull requests

2 participants