fix confirmed
authorJoey Hess <joeyh@joeyh.name>
Mon, 5 Oct 2020 18:36:36 +0000 (14:36 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 5 Oct 2020 18:36:36 +0000 (14:36 -0400)
doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs.mdwn
doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs/comment_4_5c2c6003b45d78b9e0bee95f5a12c48c._comment
doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs/comment_5_57834ef04f206e1b351b36ba32ce447f._comment [new file with mode: 0644]

index 8e59c3c28751a9098999875c21f896209316169a..540552786dc172bcc634ceddff40207ded94c147 100644 (file)
@@ -12,13 +12,14 @@ eventually gets cleaned up in all circumstances.
        rm: cannot remove '/home/yoh/.cache/git-annex/locales/bb375eb6ec0d2706f1723307f068911a': Directory not empty
 
 I think what happened there is, the first process created
-that cache directory, but had not yet written the base file
-when the second process ran. So the second process sees what looks like a
-cache directory with no base file, so it decides to clean it up. In the
-meantime the first process has written base and other files and so the rm
-fails. Also, the first process may succeed and end up running git-annex
-with some locale files missing (if the rm happened to delete those),
-resulting in incompatable system locales being used.
+that cache directory, and was in the middle of writing/overwriting the
+base file when the second process ran. So the second process sees what
+looks like a cache directory with a missing or empty base file, so it
+decides to clean it up. In the meantime the first process has written
+base and other files and so the rm fails. Also, the first process may
+succeed and end up running git-annex with some locale files missing
+(if the rm happened to delete those), resulting in incompatable
+system locales being used.
 
 So, it ought to defer cleaning up old caches until after it's made sure its
 current cache is all set up. Then that race goes away.
diff --git a/doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs/comment_5_57834ef04f206e1b351b36ba32ce447f._comment b/doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs/comment_5_57834ef04f206e1b351b36ba32ce447f._comment
new file mode 100644 (file)
index 0000000..dc49177
--- /dev/null
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 5"""
+ date="2020-10-05T18:31:26Z"
+ content="""
+The test case works a bit inconsistently, I had the best luck 
+first removing ~/.cache/git-annex/locales/ and the running the test case 
+twice in a row, which made it reliably reproduce that error on the second
+run.
+
+After the above fixes, the test case no longer reproduces the problem.
+"""]]