-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Daemon fails when dvc
is called via a wrapper script.
#4206
Labels
Comments
Hi @danfischetti ! The argv[0] issue is #4165 . Updater related to #1894 , might've been a good enough workaround if we had it, but we don't 🙁 We'll take a closer look ASAP and will get back to you. Thanks for the feedback! |
efiop
added a commit
to efiop/dvc
that referenced
this issue
Jul 23, 2020
We used `Popen` just to provide a general way of launching our daemons on both Windows and *nix, but it is causing us issues when dvc is launched from some exotic places (like nix package) or through `main()` helper from a script that is not dvc. This patch makes us just use `main()` directly in our double-forked process. Windows implementation has to use the `Popen` mechanism, because this is the only way to daemonize a process on Windows. This means that dvc on Windows is still susceptible to this problem, but there is nothing we can do about it right now :( Fixes iterative#4206 Fixes iterative#4165
efiop
added a commit
that referenced
this issue
Jul 23, 2020
We used `Popen` just to provide a general way of launching our daemons on both Windows and *nix, but it is causing us issues when dvc is launched from some exotic places (like nix package) or through `main()` helper from a script that is not dvc. This patch makes us just use `main()` directly in our double-forked process. Windows implementation has to use the `Popen` mechanism, because this is the only way to daemonize a process on Windows. This means that dvc on Windows is still susceptible to this problem, but there is nothing we can do about it right now :( Fixes #4206 Fixes #4165
@danfischetti 1.2.0 is out with the fix. Please give it a shot and let us know how it goes 🙂 Thanks for the feedback! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug Report
Currently, our build system is managed with nix , which stores python packages in a non-standard directory structure. To manage this, as part of the installation process, nix will wrap any executables provided by a package in a wrapper script which sets up the proper environment for that script.
The issue is that the daemon (which is trying to start the updater process on every command) tries to execute sys.argv[0] as a python script, even though it's a shell script, leading to a syntax error.
Here are the lines in question.
dvc/dvc/daemon.py
Lines 90 to 93 in c1b04b8
Here's what our wrapper script looks like
and the resulting syntax error that shows up for every command
Please provide information about your setup
Output of
dvc version
:Additional Information (if any):
If applicable, please also provide a
--verbose
output of the command, eg:dvc add --verbose
.The text was updated successfully, but these errors were encountered: