Commit 7b886cf
committed
gvfs-helper: prevent and/or give advice on repeated downloads to shared object cache (git-for-windows#840)
There have been a number of customer-reported problems with errors of
the form
```
error: inflate: data stream error (unknown compression method)
error: unable to unpack a163b1302d4729ebdb0a12d3876ca5bca4e1a8c3 header
error: files 'D:/.scalarCache/id_49b0c9f4-555f-4624-8157-a57e6df513b3/pack/tempPacks/t-20260106-014520-049919-0001.temp' and 'D:/.scalarCache/id_49b0c9f4-555f-4624-8157-a57e6df513b3/a1/63b1302d4729ebdb0a12d3876ca5bca4e1a8c3' differ in contents
error: gvfs-helper error: 'could not install loose object 'D:/.scalarCache/id_49b0c9f4-555f-4624-8157-a57e6df513b3/a1/63b1302d4729ebdb0a12d3876ca5bca4e1a8c3': from GET a163b1302d4729ebdb0a12d3876ca5bca4e1a8c3'
```
or
```
Receiving packfile 1/1 with 1 objects (bytes received): 17367934, done.
Receiving packfile 1/1 with 1 objects [retry 1/6] (bytes received): 17367934, done.
Waiting to retry after network error (sec): 100% (8/8), done.
Receiving packfile 1/1 with 1 objects [retry 2/6] (bytes received): 17367934, done.
Waiting to retry after network error (sec): 100% (16/16), done.
Receiving packfile 1/1 with 1 objects [retry 3/6] (bytes received): 17367934, done.
```
These are not actually due to network issues, but they look like it
based on the stack that is doing retries. Instead, these actually have
problems when installing the loose object or packfile into the shared
object cache.
The loose objects are hitting issues when installing and the target
loose object is corrupt in some way, such as all NUL bytes because the
disk wasn't flushed when the machine shut down. The error results
because we are doing a collision check without confirming that the
existing contents are valid.
The packfiles may be hitting similar comparison cases, but it is less
likely. We update these packfile installations to also skip the
collision check.
In both cases, if we have a transient network error, we add a new advice
message that helps users with the two most common workarounds:
1. Your disk may be full. Make room.
2. Your shared object cache may be corrupt. Push all branches, delete
it, and fetch to refill it.
I make special note of when the shared object cache doesn't exist and
point that it probably should so the whole repo is suspect at that
point.
* [X] This change only applies to interactions with Azure DevOps and the
GVFS Protocol.
Resolves git-for-windows#837.3 files changed
+59
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
258 | 259 | | |
259 | 260 | | |
260 | 261 | | |
| |||
1939 | 1940 | | |
1940 | 1941 | | |
1941 | 1942 | | |
1942 | | - | |
| 1943 | + | |
1943 | 1944 | | |
1944 | 1945 | | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
1945 | 1951 | | |
1946 | | - | |
1947 | | - | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
1948 | 1958 | | |
1949 | 1959 | | |
1950 | 1960 | | |
| |||
2459 | 2469 | | |
2460 | 2470 | | |
2461 | 2471 | | |
2462 | | - | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
2463 | 2482 | | |
2464 | 2483 | | |
2465 | 2484 | | |
| |||
3007 | 3026 | | |
3008 | 3027 | | |
3009 | 3028 | | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
| 3049 | + | |
| 3050 | + | |
| 3051 | + | |
| 3052 | + | |
| 3053 | + | |
| 3054 | + | |
3010 | 3055 | | |
3011 | 3056 | | |
3012 | 3057 | | |
| |||
3049 | 3094 | | |
3050 | 3095 | | |
3051 | 3096 | | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
3052 | 3101 | | |
3053 | 3102 | | |
3054 | 3103 | | |
| |||
0 commit comments