Commit graph

41118 commits

Author SHA1 Message Date
Joey Hess
130427fa09
comment 2021-12-09 15:01:54 -04:00
Joey Hess
3d7b5f442a
comment 2021-12-09 14:59:36 -04:00
Joey Hess
b69f354a87
comment 2021-12-09 14:43:10 -04:00
Joey Hess
dbba231e06
Improve error message display when autoinit fails
Due to eg, a permissions problem.
2021-12-09 14:38:12 -04:00
Joey Hess
a62f2e141b
convert some error to giveup
error has a backtrace, but these are non-internal errors, so a backtrace
is unlikely to be useful
2021-12-09 14:36:54 -04:00
Joey Hess
ab3c13c021
comment 2021-12-09 13:57:25 -04:00
Joey Hess
975ddae967
comment 2021-12-09 13:51:03 -04:00
Joey Hess
61b48b69ba
fix build on windows 2021-12-09 13:39:16 -04:00
Joey Hess
5f1f6d0cec
Merge branch 'master' of ssh://git-annex.branchable.com 2021-12-09 13:38:32 -04:00
yarikoptic
68e8ed5acb add more lines for more informative extract 2021-12-09 16:32:03 +00:00
yarikoptic
918b28b6dc Initial report details from Manish on Windows 2021-12-09 16:30:44 +00:00
jasonb@ab4484d9961a46440958fa1a528e0fc435599057
f1516579ce Added a comment 2021-12-09 16:20:48 +00:00
jwodder
4b0af2f27b 2021-12-09 14:13:54 +00:00
Joey Hess
2a5f0d70e2
Merge branch 'master' of ssh://git-annex.branchable.com 2021-12-09 09:52:29 -04:00
Joey Hess
bba74a2b84
improve comments 2021-12-08 18:59:22 -04:00
alt
7eef6ac703 Added a comment 2021-12-08 20:01:33 +00:00
Joey Hess
4a1758fccf
Merge branch 'master' of ssh://git-annex.branchable.com 2021-12-08 15:38:23 -04:00
Joey Hess
b865ae6b38
comment 2021-12-08 15:20:36 -04:00
Joey Hess
4b19626a36
Fix build with ghc 9.0.1
Continuing along the same lines as commit
2739adc258, it seems that
while Remote -> Retriever expands to the same data type this changes
it to, ghc 9.0.1 refuses to consider them equiviant. I guess it has
something to do with the forall?

The rest of the build all succeeds, although the stack build then crashes:
Linking .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.4.0.0/build/git-annex/git-annex ...
Completed 233 action(s).
Prelude.chr: bad argument: 2214592520
This issue seems likely to be about it:
https://github.com/commercialhaskell/stack/pull/5508
I'm building with stack from debian, version 2.3.3, so a newer stack
probably avoids that. Anyway, despite that stack problem,
the git-annex binary is built, and works.

The stack.yaml I used for this build was patched as follows:

diff --git a/stack.yaml b/stack.yaml
index 8dac87c15..62c4b5b9d 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,6 +1,6 @@
 flags:
   git-annex:
-    production: true
+    production: false
     assistant: true
     pairing: true
     torrentparser: true
@@ -14,7 +14,7 @@ flags:
     httpclientrestricted: true
 packages:
 - '.'
-resolver: lts-18.13
+resolver: nightly-2021-09-07
 extra-deps:
 - IfElse-0.85
 - aws-0.22

Sponsored-by: Graham Spencer on Patreon
2021-12-08 15:08:02 -04:00
yarikoptic
d56267f0cc Added a comment 2021-12-08 18:56:51 +00:00
yarikoptic
c5a415191d initial report on crash on readonly non-inited annex 2021-12-08 18:56:14 +00:00
Joey Hess
0139b4fa82
comment 2021-12-08 13:42:36 -04:00
Joey Hess
b060d99fe0
comment 2021-12-08 13:18:13 -04:00
Joey Hess
b8f4f2fb89
comment 2021-12-08 12:47:34 -04:00
jasonb@ab4484d9961a46440958fa1a528e0fc435599057
d45e4ea685 Added a comment 2021-12-08 16:25:32 +00:00
jasonb@ab4484d9961a46440958fa1a528e0fc435599057
2eeb379e4d Added a comment 2021-12-08 00:46:40 +00:00
yarikoptic
2719170575 initial todo on more flexible credentials management mechanism 2021-12-07 18:34:58 +00:00
Joey Hess
a7a5915cda
comment 2021-12-07 13:03:45 -04:00
Joey Hess
af236a7c6f
Merge branch 'master' of ssh://git-annex.branchable.com 2021-12-07 13:00:47 -04:00
Joey Hess
58460ac3e4
comment 2021-12-07 13:00:28 -04:00
jasonb@ab4484d9961a46440958fa1a528e0fc435599057
e2c7a130ec 2021-12-07 03:32:41 +00:00
Joey Hess
756768a6a4
fixed 2021-12-06 15:44:14 -04:00
Joey Hess
d4665731d9
remove last trailing unresolved bit
I think the lock file probing stuff is ok as it is for pid locks.
If not, let's wait until we have a test case, it would be easy to subtly
break it.
2021-12-06 15:34:56 -04:00
Joey Hess
a91c4d945e
comment 2021-12-06 15:13:54 -04:00
Joey Hess
ef3ab0769e
close pid lock only once no threads use it
This fixes a FD leak when annex.pidlock is set and -J is used. Also, it
fixes bugs where the pid lock file got deleted because one thread was
done with it, while another thread was still holding it open.

The LockPool now has two distinct types of resources,
one is per-LockHandle and is used for file Handles, which get closed
when the associated LockHandle is closed. The other one is per lock
file, and gets closed when no more LockHandles use that lock file,
including other shared locks of the same file.

That latter kind is used for the pid lock file, so it's opened by the
first thread to use a lock, and closed when the last thread closes a lock.

In practice, this means that eg git-annex get of several files opens and
closes the pidlock file a few times per file. While with -J5 it will open
the pidlock file, process a number of files, until all the threads happen to
finish together, at which point the pidlock file gets closed, and then
that repeats. So in either case, another process still gets a chance to
take the pidlock.

registerPostRelease has a rather intricate dance, there are fine-grained
STM locks, a STM lock of the pidfile itself, and the actual pidlock file
on disk that are all resolved in stages by it.

Sponsored-by: Dartmouth College's Datalad project
2021-12-06 15:01:39 -04:00
Joey Hess
774c7dab2f
Merge branch 'master' into pidlockfinegrained 2021-12-06 13:00:40 -04:00
Joey Hess
7c78fae463
Merge branch 'master' of ssh://git-annex.branchable.com 2021-12-06 12:53:43 -04:00
Joey Hess
ae4c56b28a
Revert "fix too early close of shared lock file"
This reverts commit 66b2536ea0.

I misunderstood commit ac56a5c2a0
and caused a FD leak when pid locking is not used.

A LockHandle contains an action that will close the underlying lock
file, and that action is run when it is closed. In the case of a shared
lock, the lock file is opened once for each LockHandle, and only
the one for the LockHandle that is being closed will be closed.
2021-12-06 12:51:28 -04:00
alt
371238eca3 2021-12-06 15:56:56 +00:00
jasonb@ab4484d9961a46440958fa1a528e0fc435599057
a8ff96864e 2021-12-05 20:37:48 +00:00
Joey Hess
00625caf87
update 2021-12-05 08:11:41 -04:00
Joey Hess
490689f122
Merge branch 'master' of ssh://git-annex.branchable.com 2021-12-03 18:42:05 -04:00
Joey Hess
e464ffd641
update comment to current status 2021-12-03 18:41:51 -04:00
Joey Hess
9d3dce94f0
comment 2021-12-03 18:41:34 -04:00
yarikoptic
8a3b6f46c8 Added a comment 2021-12-03 21:41:53 +00:00
Joey Hess
e5ca67ea1c
fine-grained locking when annex.pidlock is enabled
This locking has been missing from the beginning of annex.pidlock.
It used to be possble, when two threads are doing conflicting things,
for both to run at the same time despite using locking. Seems likely
that nothing actually had a problem, but it was possible, and this
eliminates that possible source of failure.

Sponsored-by: Dartmouth College's Datalad project
2021-12-03 17:20:21 -04:00
Joey Hess
a5fcc03595
comment 2021-12-03 16:40:58 -04:00
Joey Hess
6988c2e740
fix build on windows
broken by ed0afbc36b

Sponsored-by: Dartmouth College's Datalad project
2021-12-03 14:08:12 -04:00
ashton@37fa3fec6d2eef022a3491c85362a34141fbf0db
5d9cc3e5af 2021-12-02 23:36:10 +00:00
yarikoptic
3205686faf Added a comment 2021-12-02 20:42:37 +00:00