-
Notifications
You must be signed in to change notification settings - Fork 41
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
git-lfs fetch fails ~50% of the time when using helper mode (macos, linux) #853
Comments
This seems to pretty reliably toggle between a good-state and a bad state. Any kart command toggles this between good and bad state: it is not necessary that the command calls git-lfs. So, for instance, it is possible to reliably run Killing the kart-helper process moves it into a bad state: the next command will always fail. This is definitely related to #854: |
Definitely something similar is happening on linux, where using the helper causes subprocesses to fail but only exactly half the time. I was struggling to exercise this bug properly on my linux VM: man wasn't working, my SSH config wasn't working - so I wrote an ext-run script. The following script works half the time for me, on macos or linux:
From here I discovered that if you explicitly set the following: Ordinarily, setting stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr would have no effect when running a subprocess - those are the default values. However, in helper mode, the values of sys.stdin, sys.stdout, sys.stderr change often. Presumably, failing to set the keyword-args means they take some default value, but not the latest, correct value. Or to put it another way: Python's "default-stdin-when-calling-a-subprocess" ends up out of sync with "sys.stdin", and sys.stdin has the value we want. Basically the fix is setting these values everywhere. This also (I think, I need to do further testing) even fixes interactive editors - the tty-capability of these streams is still working. But, I have some decisions about how to fix them:
|
git-lfs fetch
can be called bykart clone
,kart checkout
,kart lfs+ fetch
when working with tile-based datasets (point clouds, rasters). Of thesekart clone
is the most reliable way to reproduce since the lfs-cache is guaranteed to be empty at this point.The crash is characterised by these two lines:
fatal error: signal_recv: inconsistent state
at the top of the crashError: There was a problem with git-lfs fetch: Command '['git-lfs', 'fetch', 'origin', '<GIT_SHA>']' returned non-zero exit status 2.
at the bottom of the crashRe-running the command often succeeds.
Re-running the command with KART_USE_HELPER=0 always succeeds.
Since this git-lfs command shouldn't need to worry about if it's connected to a tty, or need to read from stdin, it's not clear what's going wrong with helper mode that's breaking git-lfs.
The text was updated successfully, but these errors were encountered: