From 36ebcd94aa39d0cd66c98a86f9e915d94eb38d35 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2020 14:36:36 -0400 Subject: [PATCH] fix confirmed --- ...__git-annex__47__locales__47____96___dirs.mdwn | 2 ++ ...nt_4_5c2c6003b45d78b9e0bee95f5a12c48c._comment | 15 ++++++++------- ...nt_5_57834ef04f206e1b351b36ba32ce447f._comment | 12 ++++++++++++ 3 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 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 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.mdwn b/doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs.mdwn index dfb1ed6389..e8cb4517f1 100644 --- a/doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs.mdwn +++ b/doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs.mdwn @@ -32,3 +32,5 @@ I also wonder if it is possible to avoid dealing with locales upon **every** inv [[!meta author=yoh]] [[!tag projects/datalad]] + +> [[fixed|done]] --[[Joey]] 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_4_5c2c6003b45d78b9e0bee95f5a12c48c._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_4_5c2c6003b45d78b9e0bee95f5a12c48c._comment index 8e59c3c287..540552786d 100644 --- a/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 +++ b/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 @@ -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 index 0000000000..dc491776c1 --- /dev/null +++ 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 @@ -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. +"""]] -- 2.30.2