summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--open_issues/git-core-2.mdwn54
-rw-r--r--open_issues/git_duplicated_content.mdwn6
2 files changed, 57 insertions, 3 deletions
diff --git a/open_issues/git-core-2.mdwn b/open_issues/git-core-2.mdwn
index acd82442..2d8ad96b 100644
--- a/open_issues/git-core-2.mdwn
+++ b/open_issues/git-core-2.mdwn
@@ -13,6 +13,13 @@ License|/fdl]]."]]"""]]
[[!tag open_issue_porting]]
+[[!toc]]
+
+
+# Log
+
+December, 2008.
+
On the otherwise-idle flubber:
$ git clone git://sources.redhat.com/git/glibc.git
@@ -134,9 +141,50 @@ starting from an empty working directory (after an external `git push`):
# On branch master
nothing to commit (working directory clean)
----
+
+# Analysis
2011-06-13
-This seems to be fixed after a rebuild of the Debian git 1.7.5.3-1 with a
-recent toolchain.
+Running `git checkout -f` under GDB:
+
+ error: git checkout-index: unable to create file gas/testsuite/gas/cris/string-1.s (File exists)
+ error: git checkout-index: unable to create file gas/testsuite/gas/i386/x86-64-sse-check.d (File exists)
+ error: git checkout-index: unable to create file gas/testsuite/gas/i386/x86-64-sse4_1.d (File exists)
+ error: git checkout-index: unable to create file gas/testsuite/gas/ppc/astest.d (File exists)
+ error: git checkout-index: unable to create file gas/testsuite/gas/tic6x/reloc-bad-4.s (File exists)
+ warning: unable to unlink include/cgen: Operation not permitted
+ fatal: cannot create directory at 'include/cgen': Operation not permitted
+
+Again:
+
+ error: git checkout-index: unable to create file gas/config/te-vxworks.h (File exists)
+ error: git checkout-index: unable to create file gas/testsuite/gas/cris/string-1.s (File exists)
+ error: git checkout-index: unable to create file gas/testsuite/gas/d10v/warning-019.s (File exists)
+ error: git checkout-index: unable to create file gas/testsuite/gas/i860/dual03.s (File exists)
+ error: git checkout-index: unable to create file ld/testsuite/ld-mmix/sec-7a.s (File exists)
+ warning: unable to unlink ld/testsuite/ld-powerpc: Operation not permitted
+ fatal: cannot create directory at 'ld/testsuite/ld-powerpc': Operation not permitted
+
+And: [[git_duplicated_content]].
+
+All these (very likely) have the same root cause: `SA_RESTART` restarting too
+much.
+
+With `git checkout`, Git uses in progress.c a SIGALRM handler (`SA_RESTART`;
+invoked every second via `setitimer(ITIMER_REAL)`) to display status messages:
+*x % already checked out*.
+
+To avoid the status update signals every second, in
+`[git]/progress.c:start_progress_delay` we can just return `NULL` (manually in
+GDB, for example), then both the *error: git checkout-index* and the
+[[duplicated content|git_duplicated_content]] issues go away.
+
+I'm guessing that when returning from a `SA_RESTART` signal handler, too much
+of the \`\`syscall''s is being restarted. For example, if a file has already
+been created, the restarted creation attempt would fail: *File exists*. If
+data has been written, it might get written again (duplication issue). Then,
+there are cases where `unlink` apparently returns EINTR, which is not kosher
+either. Etc.
+
+Do we have problems with `SA_RESTART` vs. the atomicity of our syscall-alikes?
diff --git a/open_issues/git_duplicated_content.mdwn b/open_issues/git_duplicated_content.mdwn
index 3b4bc44b..cbc171a7 100644
--- a/open_issues/git_duplicated_content.mdwn
+++ b/open_issues/git_duplicated_content.mdwn
@@ -123,3 +123,9 @@ No further difference.
$ rm -rf ar_master* && (cd git/ && git archive master) | (mkdir ar_master && cd ar_master/ && tar -x) && diff -x .git -ru tar_master/ ar_master/ > ar_master.diff; ls -l ar_master.diff
$ (cd git/ && git archive master) | md5sum
+
+---
+
+2011-06-13
+
+-> [[git-core-2]]