git-annex/Logs
Joey Hess 65f9e7a3c7
fix deadlock in restagePointerFiles
Fix a hang that occasionally occurred during commands such as move.
(A bug introduced in 10.20220927, in
commit 6a3bd283b8)

The restage.log was kept locked while running a complex index refresh
action. In an unusual situation, that action could need to write to the
restage log, which caused a deadlock.

The solution is a two-stage process. First the restage.log is moved to a
work file, which is done with the lock held. Then the content of the work
file is read and processed, which happens without the lock being held.
This is all done in a crash-safe manner.

Note that streamRestageLog may not be fully safe to run concurrently
with itself. That's ok, because restagePointerFiles uses it with the
index lock held, so only one can be run at a time.

streamRestageLog does delete the restage.old file at the end without
locking. If a calcRestageLog is run concurrently, it will either see the
file content before it was deleted, or will see it's missing. Either is
ok, because at most this will cause calcRestageLog to report more
work remains to be done than there is.

Sponsored-by: Dartmouth College's Datalad project
2022-12-08 14:36:11 -04:00
..
Chunk update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
ContentIdentifier Fix build with attoparsec-0.14 2021-03-24 12:11:50 -04:00
Difference update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Export deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
MetaData update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
PreferredContent start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
Presence split out appending to journal from writing, high level only 2022-07-18 13:22:50 -04:00
Remote Fix build with attoparsec-0.14 2021-03-24 12:11:50 -04:00
SingleValue deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
Trust start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
Activity.hs Future proof activity log parsing 2021-06-14 14:18:19 -04:00
Chunk.hs start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
Config.hs start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
ContentIdentifier.hs start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
Difference.hs start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
Export.hs deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
File.hs fix deadlock in restagePointerFiles 2022-12-08 14:36:11 -04:00
FsckResults.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Group.hs start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
Line.hs Fix build with attoparsec-0.14 2021-03-24 12:11:50 -04:00
Location.hs handle Annex.Branch.files with read-only unmerged git-annex branches 2021-12-27 15:28:31 -04:00
MapLog.hs deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
MetaData.hs deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
Multicast.hs start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
NumCopies.hs prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
PreferredContent.hs prevent dropping required content of other file using same content 2021-05-25 11:34:06 -04:00
Presence.hs split out appending to journal from writing, high level only 2022-07-18 13:22:50 -04:00
Remote.hs start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
RemoteState.hs start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
Restage.hs fix deadlock in restagePointerFiles 2022-12-08 14:36:11 -04:00
Schedule.hs start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
SingleValue.hs deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
Smudge.hs add a finalizer to streamLogFile 2022-09-23 13:49:01 -04:00
Transfer.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Transitions.hs fix obviously wrong attoparsec parser 2022-02-07 14:15:17 -04:00
Trust.hs info: Added --autoenable option 2022-06-01 14:20:38 -04:00
Unused.hs more RawFilePath conversion 2020-10-29 12:03:50 -04:00
Upgrade.hs add annex.dbdir (WIP) 2022-08-11 16:58:53 -04:00
UUID.hs start implementing hidden git-annex repositories 2021-04-20 15:04:53 -04:00
UUIDBased.hs deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
View.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Web.hs add annex.alwayscompact 2022-07-18 16:39:19 -04:00