summaryrefslogtreecommitdiff
path: root/open_issues/git-core-2.mdwn
diff options
context:
space:
mode:
Diffstat (limited to 'open_issues/git-core-2.mdwn')
-rw-r--r--open_issues/git-core-2.mdwn92
1 files changed, 91 insertions, 1 deletions
diff --git a/open_issues/git-core-2.mdwn b/open_issues/git-core-2.mdwn
index 2cac56f2..2d8ad96b 100644
--- a/open_issues/git-core-2.mdwn
+++ b/open_issues/git-core-2.mdwn
@@ -1,4 +1,4 @@
-[[!meta copyright="Copyright © 2008, 2009, 2010 Free Software Foundation,
+[[!meta copyright="Copyright © 2008, 2009, 2010, 2011 Free Software Foundation,
Inc."]]
[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
@@ -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
@@ -98,3 +105,86 @@ differences to HEAD.
fatal: cannot pread pack file: Interrupted system call
fatal: index-pack failed
error: Could not fetch savannah
+
+---
+
+2011-06-10, coulomb.SCHWINGE, checking out [[binutils]]' master branch,
+starting from an empty working directory (after an external `git push`):
+
+ $ git checkout -f
+ fatal: cannot create directory at 'gas/testsuite/gas/bfin': Interrupted system call
+ $ git checkout -f
+ error: unable to create file gas/testsuite/gas/i386/ilp32/x86-64-sse4_1-intel.d (File exists)
+ warning: unable to unlink gas/testsuite/gas/m68k-coff: Operation not permitted
+ fatal: cannot create directory at 'gas/testsuite/gas/m68k-coff': Operation not permitted
+ $ git checkout -f
+ error: unable to create file gas/testsuite/gas/h8300/h8300.exp (File exists)
+ error: unable to create file gas/testsuite/gas/i386/x86-64-addr32-intel.d (File exists)
+ error: unable to create file gas/testsuite/gas/ia64/secname.d (File exists)
+ error: unable to create file gas/testsuite/gas/m68k/pr11676.s (File exists)
+ Checking out files: 100% (12315/12315), done.
+ $ git status
+ # On branch master
+ # Changes not staged for commit:
+ # (use "git add <file>..." to update what will be committed)
+ # (use "git checkout -- <file>..." to discard changes in working directory)
+ #
+ # modified: gas/testsuite/gas/h8300/h8300.exp
+ # modified: gas/testsuite/gas/i386/x86-64-addr32-intel.d
+ # modified: gas/testsuite/gas/ia64/secname.d
+ # modified: gas/testsuite/gas/m68k/pr11676.s
+ #
+ no changes added to commit (use "git add" and/or "git commit -a")
+ $ rm gas/testsuite/gas/h8300/h8300.exp gas/testsuite/gas/i386/x86-64-addr32-intel.d gas/testsuite/gas/ia64/secname.d gas/testsuite/gas/m68k/pr11676.s
+ $ git checkout -f
+ $ git status
+ # On branch master
+ nothing to commit (working directory clean)
+
+
+# Analysis
+
+2011-06-13
+
+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?