Skip to content

macOS: analytics daemon crashes due to fork related error #4294

Closed
@pmrowla

Description

@pmrowla

After the daemon changes introduced in #4262 (f799e1e), DVC on macOS crashes when we try to spawn the analytics daemon.

dvc git:f799e1e3 ✩  py:dvc ❯ dvc version
WARNING: Unable to detect supported link types, as cache directory '.dvc/cache' doesn't exist. It is usually auto-created by commands such as `dvc add/fetch/pull/run/import`, but you could create it manually to enable this check.
DVC version: 1.1.11+f799e1
Python version: 3.8.5
Platform: macOS-10.15.6-x86_64-i386-64bit
Binary: False
Package: None
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Repo: dvc, git
Filesystem type (workspace): ('apfs', '/dev/disk1s1')
objc[34576]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[34576]: +[__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.

Screen Shot 2020-07-28 at 4 37 51 PM

Disabling analytics avoids the crash

dvc git:f799e1e3 ✩  py:dvc ❯ dvc config --local core.analytics false
dvc git:f799e1e3 ✩  py:dvc ❯ dvc version
WARNING: Unable to detect supported link types, as cache directory '.dvc/cache' doesn't exist. It is usually auto-created by commands such as `dvc add/fetch/pull/run/import`, but you could create it manually to enable this check.
DVC version: 1.1.11+f799e1
Python version: 3.8.5
Platform: macOS-10.15.6-x86_64-i386-64bit
Binary: False
Package: None
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Repo: dvc, git
Filesystem type (workspace): ('apfs', '/dev/disk1s1')

This problem appears to be related to fork being unsafe in macOS

See related Python issue: https://bugs.python.org/issue33725 and Python 3.8 multiprocessing docs

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions