Commit graph

41118 commits

Author SHA1 Message Date
yarikoptic
d88a52886d removed 2021-12-02 20:41:37 +00:00
yarikoptic
33c36ef5cb initial follow up on the read-only mode issue 2021-12-02 20:39:39 +00:00
yarikoptic
937b9de516 Added a comment: automate + extend 2021-12-02 20:34:55 +00:00
yarikoptic
9c0f3d1de8 Added a comment 2021-12-02 13:05:55 +00:00
Joey Hess
ed0afbc36b
avoid concurrent threads trying to take pid lock at same time
Seem there are several races that happen when 2 threads run PidLock.tryLock
at the same time. One involves checkSaneLock of the side lock file, which may
be deleted by another process that is dropping the lock, causing checkSaneLock
to fail. And even with the deletion disabled, it can still fail, Probably due
to linkToLock failing when a second thread overwrites the lock file.

The same can happen when 2 processes do, but then one process just fails
to take the lock, which is fine. But with 2 threads, some actions where failing
even though the process as a whole had the pid lock held.

Utility.LockPool.PidLock already maintains a STM lock, and since it uses
LockShared, 2 threads can hold the pidlock at the same time, and when
the first thread drops the lock, it will remain held by the second
thread, and so the pid lock file should not get deleted until the last
thread to hold it drops the lock. Which is the right behavior, and why a
LockShared STM lock is used in the first place.

The problem is that each time it takes the STM lock, it then also calls
PidLock.tryLock. So that was getting called repeatedly and concurrently.

Fixed by noticing when the shared lock is already held, and stop calling
PidLock.tryLock again, just use the pid lock that already exists then.

Also, LockFile.PidLock.tryLock was deleting the pid lock when it failed
to take the lock, which was entirely wrong. It should only drop the side
lock.

Sponsored-by: Dartmouth College's Datalad project
2021-12-01 17:14:39 -04:00
Joey Hess
66b2536ea0
fix too early close of shared lock file
This fixes a reversion introduced in commit
ac56a5c2a0.

I didn't notice there that it was handling the case of a shared lock
file that was still open elsewhere by not running the close action.

This was especially deadly when annex.pidlock is set, as it caused early
deletion of the pid lock file.

Sponsored-by: Dartmouth College's Datalad project
2021-12-01 17:06:28 -04:00
Joey Hess
f50de2455f
retitle 2021-12-01 14:35:31 -04:00
Joey Hess
54a4ca9e3c
comment 2021-12-01 14:10:39 -04:00
Joey Hess
d4e99d902b
analysis 2021-12-01 13:38:47 -04:00
Joey Hess
b7976e08f0
comment 2021-12-01 13:03:05 -04:00
Joey Hess
e11ca04e28
comment 2021-12-01 12:46:07 -04:00
yarikoptic
7ca799efed initial report on needing more thorough retries when downloading from S3 2021-12-01 15:41:13 +00:00
account@dc612ad075297e574ebc3eb9a5b8ab6e753510dc
30c55f8940 Added a comment: Further fix attempts 2021-12-01 03:25:35 +00:00
adina.wagner@2a4cac6443aada2bd2a329b8a33f4a7b87cc8eff
a5b635af20 Added a comment: A few Windows benchmarks 2021-11-29 22:17:39 +00:00
Joey Hess
a6699be79d
catch error statting pid lock file if it somehow does not exist
It ought to exist, since linkToLock has just created it. However,
Lustre seems to have a rather probabilisitic view of the contents of a
directory, so catching the error if it somehow does not exist and
running the same code path that would be ran if linkToLock failed
might avoid this fun Lustre failure.

Sponsored-by: Dartmouth College's Datalad project
2021-11-29 14:53:07 -04:00
Joey Hess
567f63ba47
export: Avoid unncessarily re-exporting non-annexed files that were already exported
Commit b6e4ed9aa7 made non-annexed files
be re-uploaded every time, since they're not tracked in the location log,
and it made it check the location log. Don't do that for non-annexed files.

Sponsored-by: Brock Spratlen on Patreon
2021-11-29 14:02:38 -04:00
Joey Hess
05d79b26d8
clarify 2021-11-29 14:00:32 -04:00
Joey Hess
28cca9b9ff
comment 2021-11-29 13:32:12 -04:00
Joey Hess
357760cacf
comment 2021-11-29 13:16:52 -04:00
Joey Hess
b141b8a009
comment 2021-11-29 13:02:15 -04:00
Joey Hess
01a5ee6998
addurl, youtube-dl: When --check-raw prevents downloading an url, still continue with any downloads that come after it, rather than erroring out
Sponsored-By: Mark Reidenbach on Patreon
2021-11-28 19:40:06 -04:00
Joey Hess
9a1f14e6f0
Merge branch 'master' of ssh://git-annex.branchable.com 2021-11-26 10:32:22 -04:00
mih
02e3756bd7 Added a comment: Even more impact on real systems 2021-11-26 14:23:34 +00:00
Atemu
0f48796532 Added a comment 2021-11-25 19:23:46 +00:00
mih
120a94bcb8 Added a comment: More statistics 2021-11-25 13:09:11 +00:00
Rémi
0b2314ffe0 bug on export tree remote. 2021-11-25 10:15:49 +00:00
mih
fe143b2cb9 Added a comment: Translates to Windows! 2021-11-25 07:34:49 +00:00
dev@c1c358f0d3c8563701193b66791eb1bc57a25ac9
5aca043296 2021-11-24 21:01:41 +00:00
yarikoptic
e83c07427a 2021-11-24 14:13:20 +00:00
yarikoptic
574938c234 Added a comment 2021-11-23 23:22:36 +00:00
yarikoptic
65494a9f81 Added a comment 2021-11-23 23:12:47 +00:00
jkniiv
6d59508f02 Added a comment 2021-11-23 21:46:43 +00:00
Joey Hess
4703ad3e7f
remove unused import 2021-11-23 16:15:57 -04:00
Joey Hess
1d513540e9
Fix build with old versions of feed library 2021-11-23 16:06:51 -04:00
Joey Hess
95f78cc1ce
add news item for git-annex 8.20211123 2021-11-23 15:20:58 -04:00
Joey Hess
74fcc389d8
releasing package git-annex version 8.20211123 2021-11-23 15:20:24 -04:00
Joey Hess
d7dfb99b16
comment 2021-11-23 15:19:11 -04:00
yarikoptic
23ee488980 initial report 2021-11-23 15:41:45 +00:00
yarikoptic
019564c52f initial report on tests exit code 124 2021-11-23 14:40:35 +00:00
m15
2e2d35869c Added a comment: new problem on reinject 2021-11-23 00:53:37 +00:00
Joey Hess
5a7f253974
support git 2.34.0's handling of merge conflict between annexed and non-annexed file
This version of git -- or its new default "ort" resolver -- handles such
a conflict by staging two files, one with the original name and the other
named file~ref. Use unmergedSiblingFile when the latter is detected.

(It doesn't do that when the conflict is between a directory and a file
or symlink though, so see previous commit for how that case is handled.)

The sibling file has to be deleted separately, because cleanConflictCruft
may not delete it -- that only handles files that are annex links,
but the sibling file may be the non-annexed file side of the conflict.

The graftin code had assumed that, when the other side of a conclict
is a symlink, the file in the work tree will contain the non-annexed
content that we want it to contain. But that is not the case with the new
git; the file may be the annex link and needs to be replaced with the
content, while the annex link will be written as a -variant file.

(The weird doesDirectoryExist check in graftin turns out to still be
needed, test suite failed when I tried to remove it.)

Test suite passes with new git with ort resolver default. Have not tried it
with old git or other defaults.

Sponsored-by: Noam Kremen on Patreon
2021-11-22 16:10:24 -04:00
Joey Hess
c49787824c
fix test failure with git version 2.34.0
The new "ort" resolver uses different filenames than what the test suite
accepted when resolving a conflict between a directory an an annexed
file. Make the test looser in what it accepts, so it will work with old
and new git.

Other tests still look for "conflictor.variant" as a prefix,
because when eg resolving a conflicted merge of 2 annexed files,
the filename is not changed by the ort resolver, and I didn't want to
unncessarily loosen the test.

Also I'm not entirely happy with the filenames used by the ort resolver,
see comment.

There's still another test failure caused by that resolver that is not
fixed yet.
2021-11-22 13:30:03 -04:00
kyle
e2da89ba49 Added a comment: re: git 2.34: some conflict resolution unit tests fail 2021-11-21 21:41:36 +00:00
jkniiv
a0e9a059ab issue, presumably git 2.34 new merge strategy to blame 2021-11-21 18:49:02 +00:00
Joey Hess
0f9e5ada82
idea 2021-11-21 11:19:47 -04:00
yarikoptic
e1f38b9dd7 Added a comment 2021-11-19 17:44:22 +00:00
Joey Hess
766720d093
soften language in changelog
This bug mostly would happen when the downloads ran very fast or were
all failing (how I reproduced it), because there have to be two
downloads that finish very close to the same time to trigger the race.

So most users of -J probably would not see much impact from the bug.
2021-11-19 12:52:22 -04:00
Joey Hess
623a775609
fix cat-file leak in get with -J
Bugfix: When -J was enabled, getting files leaked a ever-growing number of
git cat-file processes.

(Since commit dd39e9e255)

The leak happened when mergeState called stopNonConcurrentSafeCoProcesses.
While stopNonConcurrentSafeCoProcesses usually manages to stop everything,
there was a race condition where cat-file processes were leaked. Because
catFileStop modifies Annex.catfilehandles in a non-concurrency safe way,
and could clobber modifications made in between. Which should have been ok,
since originally catFileStop was only used at shutdown.

Note the comment on catFileStop saying it should only be used when nothing
else is using the handles. It would be possible to make catFileStop
race-safe, but it should just not be used in a situation where a race is
possible. So I didn't bother.

Instead, the fix is just not to stop any processes in mergeState. Because
in order for mergeState to be called, dupState must have been run, and it
enables concurrency mode, stops any non-concurrent processes, and so all
processes that are running are concurrency safea. So there is no need to
stop them when merging state. Indeed, stopping them would be extra work,
even if there was not this bug.

Sponsored-by: Dartmouth College's Datalad project
2021-11-19 12:51:08 -04:00
Joey Hess
2d3e8718e6
reproduced 2021-11-19 12:05:19 -04:00
Joey Hess
15d617f7e1
have setConcurrency stop any running git coprocesses
When non-concurrent git coprocesses have been started, setConcurrency
used to not stop them, and so could leak processes when enabling
concurrency, eg when forkState is called.

I do not think that ever actually happened, given where setConcurrency
is called. And it probably would only leak one of each process, since it
never downgrades from concurrent to non-concurrent.
2021-11-19 12:00:39 -04:00