Commit graph

47,223 commits

Author SHA1 Message Date
Joey Hess
eae2e3cbbc
Merge branch 'master' of ssh://git-annex.branchable.com 2025-11-07 16:49:26 -04:00
Joey Hess
8ff95d7714
status update 2025-11-07 16:49:00 -04:00
Joey Hess
c872bd9040
p2phttp: Added the --lockedfiles option
This prevents serveLockContent from starting an unbounded number of
threads.

Note that, when it goes over this limit, git-annex is still able to drop
from the local repository in most situations, it just falls back to
checking content presence and is still able to prove the drop is safe.
But of course there are some cases where an active lock is needed in order to
drop.

The ugly getTimestamp hack works around a bug in the server. I suspect that
bug is also responsible for what happens if git-annex drop is interrupted
at the wrong time when checking the lock on the server -- as well as
leaving the lock fd open, the annex worker is not released to the pool,
so later connections to the server stall out. This needs to be
investigated, and the hack removed.
2025-11-07 16:37:20 -04:00
Joey Hess
757b6c12b7
p2phttp: Fix server stall when there are too many concurrent clients
A deadlock eventually occurred when there were more concurent clients
than the size of the annex worker pool.

A test case for the deadlock is multiple clients all running
git-annex get; git-annex drop in a loop. With more clients than the
server's -J, this tended to lock up the server fairly quickly.

The problem was that inAnnexWorker is run twice per request, once for
the P2P protocol handling thread, and once for the P2P protocol
generating thread. Those two threads were started concurrently. Which,
when the worker pool is close to full, is equivilant to two locks being
taken, in potentially two different orders, and so could deadlock.

Fixed by making P2P.Http.Server use handleRequestAnnex instead of
inAnnexWorker. That forks off a new Annex state, runs the action in it,
and merges it back in.

Also, made getP2PConnection wait until the inAnnexWorker action has
started to return. When there are more incoming requests than the size
of the worker pool, this prevents request handers from starting
handleRequestAnnex until after getP2PConnection has started, so avoiding
running more annex actions than the -J level.

While before the server needed 2 jobs per request, so would handle
concurrent requests up to 1/2 of the -J level maximum, now it matches
the -J level. Updated docs accordingly.

Note that serveLockContent starts a thread which keeps running after the
request finishes. Before, that still consumed a worker. Which was also
probably a way for the worker pool to get full. Now, it does not.
So, lots of calls to serveLockContent can result in lots of threads,
which are lightweight though since they only keep a lock held.
Considering this as a new DOS attack, the server would run out of FDs
before it runs out of memory. I'll address this in the next commit.
2025-11-07 16:24:52 -04:00
Joey Hess
f22180cabd
added dupState' 2025-11-07 13:58:20 -04:00
Joey Hess
b063aafae9
p2phttp: Fix a file descriptor leak caused by a race condition
When multiple clients drop the same key at the same time, or potentially in
other situations where the content directory gets frozen at the wrong time,
writeContentRetentionTimestamp threw an exception which left the lock file
descriptor open, but locking failed so it was never closed.
2025-11-07 13:57:50 -04:00
matrss
b2cfa60c13 Added a comment 2025-11-07 09:12:13 +00:00
rubiqube
39ed58e394 ask about S3 DEEP_ARCHIVE and the glacier special remote 2025-11-06 23:18:06 +00:00
Joey Hess
75808f0a7e
comment 2025-11-06 16:28:52 -04:00
Joey Hess
be96838508
clarify comment 2025-11-06 10:07:07 -04:00
Joey Hess
501a6f4727
correct -J documentation 2025-11-05 16:45:50 -04:00
Joey Hess
45c63931ca
Merge branch 'master' of ssh://git-annex.branchable.com 2025-11-05 16:41:35 -04:00
Joey Hess
249ed07ea7
comment 2025-11-05 16:41:21 -04:00
Joey Hess
5ce74748ed
analysis 2025-11-05 14:04:20 -04:00
cjmarkie
e0c6656ffd Add openneuro tag 2025-11-04 18:04:59 +00:00
Joey Hess
23f760cd69
fix address example 2025-11-03 15:48:02 -04:00
Joey Hess
0801b75173
remove now-obsolate warnings 2025-11-03 15:46:29 -04:00
Joey Hess
74b0cbae20
git-annex version for p2p --pair fix for iroh 2025-11-03 15:37:41 -04:00
Joey Hess
f51fcafca6
dumbpipe versioning 2025-11-03 15:34:08 -04:00
Joey Hess
2820c5a4a6
Merge branch 'master' of ssh://git-annex.branchable.com 2025-11-03 15:29:49 -04:00
Joey Hess
ea86699bc5
add iroh tip
Adapted from the tor tip.

Also, removed some out of date stuff from the tor tip.
2025-11-03 15:29:18 -04:00
Joey Hess
6392fa0dc2
avoid EOF error in --debug
When the peer hangs up the connection, avoid displaying an error about
the EOF. It was only displayed with --debug anyway.
2025-11-03 15:06:54 -04:00
Joey Hess
3d959f4776
remotedaemon: Avoid crashing when run with --debug
/dev/null was opened for reading, so writing to it would error out...
oops!

But, with --debug, we want to see the debug output. So avoid
/dev/nulling it.
2025-11-03 15:02:14 -04:00
Joey Hess
34ffda2c6f
p2p --pair: Fix to work with external P2P networks
When storing a P2P authtoken, it needs to have our local address, not the
address of the peer.
2025-11-03 14:03:57 -04:00
nellh@380042d7938c4cc270905b24e15d4a682e23e15d
50cca2f46b 2025-11-03 00:00:05 +00:00
hatzka
59ec3e1739 removed 2025-11-01 23:04:43 +00:00
hatzka
3af4ba53a0 Added a comment: a potentially bad idea 2025-10-31 00:20:54 +00:00
matrss
c816610229 2025-10-30 15:39:53 +00:00
matrss
1253929874 2025-10-30 15:28:00 +00:00
Joey Hess
f3b37d467a
Merge branch 'master' of ssh://git-annex.branchable.com 2025-10-29 14:30:05 -04:00
Joey Hess
687205f934
typo 2025-10-29 14:29:46 -04:00
matrss
dbd4c8ae68 Added a comment 2025-10-29 17:38:12 +00:00
matrss
43d61078f1 2025-10-29 17:33:34 +00:00
matrss
4a4384579b 2025-10-29 17:31:27 +00:00
matrss
51daa979ca 2025-10-29 17:30:57 +00:00
Joey Hess
f977a77a42
fix 2025-10-29 13:19:31 -04:00
Joey Hess
30613295e6
fix 2025-10-29 13:18:41 -04:00
Joey Hess
dc618d1f79
fix 2025-10-29 13:16:10 -04:00
Joey Hess
ef20f0005f
add ICE4 page, as a redirect 2025-10-29 13:13:43 -04:00
Joey Hess
6ef64e30cb
rename project page (left a redirect) 2025-10-29 13:12:29 -04:00
Joey Hess
3b3a282b82
add news item for git-annex 10.20251029 2025-10-29 10:05:37 -04:00
Joey Hess
d3e491a2dd
releasing package git-annex version 10.20251029 2025-10-29 10:05:27 -04:00
matrss
2a4eef3538 Added a comment 2025-10-26 11:55:55 +00:00
Joey Hess
af653bbf31
bug 2025-10-25 12:42:26 -04:00
mih
13dcc3dd49 Propose emphemeral special remotes 2025-10-25 13:47:57 +00:00
cjmarkie
c0bc81891c 2025-10-25 13:47:47 +00:00
cjmarkie
293339e1fc Initiate request for request redirection 2025-10-25 13:24:47 +00:00
Joey Hess
00c703e4ef
assistant: Fix reversion that caused files to be added locked by default.
92c4a34414 added a new config, but used an
existing config, which defaults to true. Oops!
2025-10-25 09:17:57 -04:00
Joey Hess
5ce5ab1b1d
remove redundant comment 2025-10-25 06:12:50 -04:00
Joey Hess
8f2d30860c
add 2025-10-25 06:00:54 -04:00