From 1cc4f789bb83cec5c8139da75d799b136a8441b5 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 10 Jun 2011 12:37:36 +0200 Subject: open_issues/nightly_builds: Hudson is now Jenkins, or similar. --- open_issues/nightly_builds.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'open_issues') diff --git a/open_issues/nightly_builds.mdwn b/open_issues/nightly_builds.mdwn index 5d1257fb..6eef7d19 100644 --- a/open_issues/nightly_builds.mdwn +++ b/open_issues/nightly_builds.mdwn @@ -20,7 +20,7 @@ Resources: * As reported in the [[news/2010-05-31]] news, there's Hydra doing nightly builds / Nix packages. - * + * , * -- cgit v1.2.3 From 21f7f80cd190b56a14e1faf2ba24c7137d3faef5 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 10 Jun 2011 18:47:19 +0200 Subject: More Git fun. --- open_issues/git-core-2.mdwn | 37 ++++++++++++++++++++++++++++++++- open_issues/git_nfs_mmap.mdwn | 48 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 open_issues/git_nfs_mmap.mdwn (limited to 'open_issues') diff --git a/open_issues/git-core-2.mdwn b/open_issues/git-core-2.mdwn index 2cac56f2..a1fdbac1 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 @@ -98,3 +98,38 @@ 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 ..." to update what will be committed) + # (use "git checkout -- ..." 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) diff --git a/open_issues/git_nfs_mmap.mdwn b/open_issues/git_nfs_mmap.mdwn new file mode 100644 index 00000000..b7e86491 --- /dev/null +++ b/open_issues/git_nfs_mmap.mdwn @@ -0,0 +1,48 @@ +[[!meta copyright="Copyright © 2011 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag open_issue_hurd open_issue_porting]] + + $ git-new-workdir /media/kepler-data/home/thomas/tmp/source/binutils/git master master + fatal: Out of memory? mmap failed: No such device + $ echo $? + 128 + $ showtrans /media/kepler-data + /hurd/nfs kepler.schwinge.homeip.net:/media/data + +With `sh -x`: + + [...] + + ln -s /media/kepler-data/home/thomas/tmp/source/binutils/git/.git/remotes master/.git/remotes + + ln -s /media/kepler-data/home/thomas/tmp/source/binutils/git/.git/rr-cache master/.git/rr-cache + + ln -s /media/kepler-data/home/thomas/tmp/source/binutils/git/.git/svn master/.git/svn + + cd master + + cp /media/kepler-data/home/thomas/tmp/source/binutils/git/.git/HEAD .git/HEAD + + git checkout -f master + fatal: Out of memory? mmap failed: No such device + +As one can easily guess (and confirm with [[hurd/debugging/rpctrace]]), `git` +tries to [[glibc/mmap]] a file via the [[hurd/translator/nfs]] translator, this +fails, and it isn't prepared to cope with that: + + [...] + 88->dir_lookup (".git/objects/pack/pack-37ca560e7877fa0cc6e5ddcd556aa73e5a3e3f40.idx" 2049 0) = 0 3 "/media/kepler-data/home/thomas/tmp/source/binutils/git/.git/objects/pack/pack-37" (null) + 62->dir_lookup ("media/kepler-data/home/thomas/tmp/source/binutils/git/.git/objects/pack/pack-37c" 2049 0) = 0 1 "/home/thomas/tmp/source/binutils/git/.git/objects/pack/pack-37ca560e7877fa0cc6e5" 61 + 61->dir_lookup ("home/thomas/tmp/source/binutils/git/.git/objects/pack/pack-37ca560e7877fa0cc6e5d" 2049 0) = 0 1 "" 84 + task3741-> 3206 (pn{ 33}) = 0 + 84->term_getctty () = 0xfffffed1 ((ipc/mig) bad request message ID) + 84->io_stat_request () = 0 {1 704 0 36308992 0 0 -1 33060 1 1000 1000 4712 0 1307711395 0 1307657003 0 1307657003 0 4096 16 0 1000 0 0 100663296 1836017780 29537 0 0 0 0} + 84->io_map_request () = 0x4000002d (Operation not supported) + 84->io_map_request () = 0x4000002d (Operation not supported) + 76->io_write_request ("fatal: Out of memory? mmap failed: No such device + " -1) = 0 50 + 64->proc_mark_exit_request (32768 0) = 0 + task3741-> 2008 () = 0 + Child 3741 exited with 128 -- cgit v1.2.3 From 3a7f9cfe8334a67de82935865c78fad451cd7bcd Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 10 Jun 2011 23:29:54 +0200 Subject: open_issues/ext2fs_file_corruption: New. --- open_issues/ext2fs_file_corruption.mdwn | 199 ++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 open_issues/ext2fs_file_corruption.mdwn (limited to 'open_issues') diff --git a/open_issues/ext2fs_file_corruption.mdwn b/open_issues/ext2fs_file_corruption.mdwn new file mode 100644 index 00000000..2af35bb5 --- /dev/null +++ b/open_issues/ext2fs_file_corruption.mdwn @@ -0,0 +1,199 @@ +[[!meta copyright="Copyright © 2011 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag open_issue_hurd]] + +[[!toc]] + + +# Log + +Create two 5 GiB partitions. + + # # Would default to 256 byte inodes otherwise. + # mke2fs -I 128 -o linux /dev/hd1s1 + [...] + # mke2fs -o hurd /dev/hd1s2 + [...] + +The only difference (apart from UUID, time stamps, hash seeds) in ext2 file +system meta data, according to `dumpe2fs -h`: + + [...] + -Filesystem features: ext_attr resize_inode dir_index filetype sparse_super large_file + +Filesystem features: ext_attr resize_inode dir_index sparse_super large_file + Filesystem flags: signed_directory_hash + Default mount options: (none) + Filesystem state: clean + Errors behavior: Continue + -Filesystem OS type: Linux + +Filesystem OS type: Hurd + [...] + +According to *mke2fs(8)*: + +> *filetype* +> Store file type information in directory entries. + + # settrans -c /media/hd1s1 /hurd/ext2fs /dev/hd1s1 + # settrans -c /media/hd1s2 /hurd/ext2fs /dev/hd1s2 + # mkdir /media/hd1s{1,2}/tmp + # chmod 1777 /media/hd1s{1,2}/tmp + + $ git-new-workdir ~/tmp/binutils/git /media/hd1s1/tmp/master master + error: unable to create file gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d (Interrupted system call) + Checking out files: 100% (12315/12315), done. + Already on 'master' + $ cd /media/hd1s1/tmp/master + $ git status + # On branch master + # Changes not staged for commit: + # (use "git add ..." to update what will be committed) + # (use "git checkout -- ..." to discard changes in working directory) + # + # modified: gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d + # + no changes added to commit (use "git add" and/or "git commit -a") + $ git checkout -f + $ git status + # On branch master + nothing to commit (working directory clean) + +([[Git issue|git-core-2]] is known.) + + $ git-new-workdir ~/tmp/binutils/git /media/hd1s2/tmp/master master + error: unable to create file bfd/elf32-dlx.c (Interrupted system call) + error: unable to create file bfd/sunos.c (Interrupted system call) + error: unable to create file gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d (Interrupted system call) + error: unable to create file gas/testsuite/gas/mmix/regx-op.d (Interrupted system call) + error: unable to create file gas/testsuite/gas/tic6x/reloc-bad-4.s (Interrupted system call) + error: unable to create file gold/testsuite/script_test_2.t (Interrupted system call) + error: unable to create file ld/testsuite/ld-mmix/loc7m.d (Interrupted system call) + error: unable to create file ld/testsuite/ld-powerpc/tlsexe.g (Interrupted system call) + Checking out files: 100% (12315/12315), done. + Already on 'master' + $ cd /media/hd1s2/tmp/master + $ git status + # On branch master + # Changes not staged for commit: + # (use "git add ..." to update what will be committed) + # (use "git checkout -- ..." to discard changes in working directory) + # + # modified: bfd/elf32-dlx.c + # modified: bfd/sunos.c + # modified: gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d + # modified: gas/testsuite/gas/mmix/regx-op.d + # modified: gas/testsuite/gas/tic6x/reloc-bad-4.s + # modified: gold/testsuite/script_test_2.t + # modified: ld/testsuite/ld-mmix/loc7m.d + # modified: ld/testsuite/ld-powerpc/tlsexe.g + # + no changes added to commit (use "git add" and/or "git commit -a") + $ git checkout -f + $ git status + # On branch master + nothing to commit (working directory clean) + +Now you'd expect these directories to have identical content, but: + + $ diff -x .git -ru /media/hd1s{1,2}/tmp/master/ > /tmp/diff + $ ls -l /tmp/diff + -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:12 /tmp/diff + $ grep '^[^ @+-]' < /tmp/diff + diff -x .git -ru /media/hd1s1/tmp/master//ld/configure /media/hd1s2/tmp/master//ld/configure + +(Note that this isn't a file that Git had issues with.) + +Try again: + + $ diff -x .git -ru /media/hd1s{1,2}/tmp/master/ > /tmp/diff_ + $ ls -l /tmp/diff* + -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:12 /tmp/diff + -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:17 /tmp/diff_ + $ cmp /tmp/diff{,_}; echo $? + 0 + +At least it's consistent. Force a reload: + + # settrans -ag /media/hd1s1 + # settrans -ag /media/hd1s2 + +Try again: + + $ diff -x .git -ru /media/hd1s{1,2}/tmp/master/ > /tmp/diff__ + $ ls -l /tmp/diff* + -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:12 /tmp/diff + -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:17 /tmp/diff_ + -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:30 /tmp/diff__ + $ cmp /tmp/diff{,__}; echo $? + 0 + +Consistent; thus very likely corrupt on-disk. + +After a few tries, the pattern generally is that for the files where there are +differences, once the file regularely ends, its content appears once more. +That is, the files' content appears once (regularely), and then the same again. +From three retries, I've seen this only ever happen on the `-o +linux`/`filetype` option file system. + +Some more copying: + + $ (cd /media/hd1s1/tmp/ && cp -a master master_) + $ (cd /media/hd1s2/tmp/ && cp -a master master_) + $ diff -x .git -ru /media/hd1s1/tmp/master{,_}/ > /tmp/diff1 + $ diff -x .git -ru /media/hd1s2/tmp/master{,_}/ > /tmp/diff2 + $ ls -l /tmp/diff{1,2} + -rw-r--r-- 1 thomas thomas 0 10. Jun 19:46 /tmp/diff1 + -rw-r--r-- 1 thomas thomas 0 10. Jun 19:46 /tmp/diff2 + +No further difference. + + +# Conclusion? + +The ext2 `filetype` option, as used for Linux-type file systems by default, +might cause some confusion inside [[hurd/translator/ext2fs]]? + +[[!tag open_issue_documentation]] The strange thing is that in +`[hurd]/ext2fs/dir.c` the `EXT2_FEATURE_INCOMPAT_FILETYPE` is generally masked +out (is not even considered) when adding a node to a directory in +`diskfs_direnter_hard` and when reading in `diskfs_get_directs`, so unless +setting this file system flag has some other effects on the meta data (which it +doesn't seem to have according to the Linux kernel source code), it shouldn't +make any difference. Also, this information would only be used for setting +directory listing's informational `d_type` field (`readdir`, etc.). Hrm. +Perhaps only a red herring? + + +## `e2fsck` + +Running `e2fsck` on a file system with the `filetypes` option, there are +messages that the `filetype` for a lot of files is set (to either 1 (regular +file, `EXT2_FT_REG_FILE`), or 2 (directory, `EXT2_FT_DIR`)). The Hurd's ext2fs +should unconditionally set this field to 0 (`EXT2_FT_UNKNOWN`). + + +# Next + +Start over with the `filetype` option reversed: + + # mke2fs -I 128 -o linux -O ^filetype /dev/hd1s1 + # mke2fs -o hurd -O filetype /dev/hd1s2 + +In fact, for `-o hurd`, `-O filetype` doesn't have any effect (according to +`dumpe2fs -h`), so the meta data now only differs in *Filesystem OS type*. + +Invoke `git-new-workdir` once more (for each). + +Now there is corruption in files on the `-o hurd -O filetype` file system. But +this time not caused by `git-new-workdir`, but instead when copying a binutils +checkout to a new directory. Huh. Does `-O filetype` in fact have any effect +with `-o hurd`? The `e2fsprogs` source code should tell, but is not available +right now. -- cgit v1.2.3 From 40fce0b2c547fe7a73267f5285fb1f596f8ff947 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 13 Jun 2011 16:44:12 +0200 Subject: open_issues/git_duplicated_content: Progress? --- hurd/translator/ext2fs.mdwn | 16 ++- hurd/translator/ext2fs/filetype.mdwn | 33 ++++++ open_issues/ext2fs_file_corruption.mdwn | 199 -------------------------------- open_issues/git-core-2.mdwn | 7 ++ open_issues/git_duplicated_content.mdwn | 125 ++++++++++++++++++++ 5 files changed, 177 insertions(+), 203 deletions(-) create mode 100644 hurd/translator/ext2fs/filetype.mdwn delete mode 100644 open_issues/ext2fs_file_corruption.mdwn create mode 100644 open_issues/git_duplicated_content.mdwn (limited to 'open_issues') diff --git a/hurd/translator/ext2fs.mdwn b/hurd/translator/ext2fs.mdwn index 305576b8..fff2e74b 100644 --- a/hurd/translator/ext2fs.mdwn +++ b/hurd/translator/ext2fs.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2007, 2008, 2010 Free Software Foundation, +[[!meta copyright="Copyright © 2007, 2008, 2010, 2011 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable @@ -9,14 +9,20 @@ Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] -# Large Stores +# Implementation + + * [[filetype]] option + + +## Large Stores The `ext2fs` translator from the upstream Hurd code base can only handle file systems with sizes of less than roughly 2 GiB. [[!tag open_issue_hurd]] -## Ognyan's Work + +### Ognyan's Work * Ognyan Kulev, [[*Supporting Large ext2 File Systems in the Hurd*|ogi-fosdem2005.mgp]], 2005, at FOSDEM @@ -34,4 +40,6 @@ small backend stores, like floppy devices. # Documentation - + * + + * diff --git a/hurd/translator/ext2fs/filetype.mdwn b/hurd/translator/ext2fs/filetype.mdwn new file mode 100644 index 00000000..5d85bac9 --- /dev/null +++ b/hurd/translator/ext2fs/filetype.mdwn @@ -0,0 +1,33 @@ +[[!meta copyright="Copyright © 2011 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +The *ext2fs* translator doesn't support the ext2 format's *filetype* option. + +According to *mke2fs(8)*: + +> **filetype**: Store file type information in directory entries. + +By setting directory listings' informational `d_type` field (`readdir`, etc.), +this may avoid the need for subsequent `stat` calls. + +Not all file systems can support this option. + +In `[hurd]/ext2fs/dir.c` the `EXT2_FEATURE_INCOMPAT_FILETYPE` is generally +masked out (is not even considered) when adding a node to a directory in +`diskfs_direnter_hard` and when reading in `diskfs_get_directs`. The Hurd's +ext2fs unconditionally sets this field to 0 (`EXT2_FT_UNKNOWN`). + + +# `e2fsck` + +Running `e2fsck` on a file system with the *filetype* option, will correct the +*filetype* for a lot of files (all `EXT2_FT_UNKNOWN`?) to either 1 (regular +file, `EXT2_FT_REG_FILE`), or 2 (directory, `EXT2_FT_DIR`), and likely others. +The Hurd's ext2fs will again ignore these fields, of course. diff --git a/open_issues/ext2fs_file_corruption.mdwn b/open_issues/ext2fs_file_corruption.mdwn deleted file mode 100644 index 2af35bb5..00000000 --- a/open_issues/ext2fs_file_corruption.mdwn +++ /dev/null @@ -1,199 +0,0 @@ -[[!meta copyright="Copyright © 2011 Free Software Foundation, Inc."]] - -[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable -id="license" text="Permission is granted to copy, distribute and/or modify this -document under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with no Invariant -Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license -is included in the section entitled [[GNU Free Documentation -License|/fdl]]."]]"""]] - -[[!tag open_issue_hurd]] - -[[!toc]] - - -# Log - -Create two 5 GiB partitions. - - # # Would default to 256 byte inodes otherwise. - # mke2fs -I 128 -o linux /dev/hd1s1 - [...] - # mke2fs -o hurd /dev/hd1s2 - [...] - -The only difference (apart from UUID, time stamps, hash seeds) in ext2 file -system meta data, according to `dumpe2fs -h`: - - [...] - -Filesystem features: ext_attr resize_inode dir_index filetype sparse_super large_file - +Filesystem features: ext_attr resize_inode dir_index sparse_super large_file - Filesystem flags: signed_directory_hash - Default mount options: (none) - Filesystem state: clean - Errors behavior: Continue - -Filesystem OS type: Linux - +Filesystem OS type: Hurd - [...] - -According to *mke2fs(8)*: - -> *filetype* -> Store file type information in directory entries. - - # settrans -c /media/hd1s1 /hurd/ext2fs /dev/hd1s1 - # settrans -c /media/hd1s2 /hurd/ext2fs /dev/hd1s2 - # mkdir /media/hd1s{1,2}/tmp - # chmod 1777 /media/hd1s{1,2}/tmp - - $ git-new-workdir ~/tmp/binutils/git /media/hd1s1/tmp/master master - error: unable to create file gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d (Interrupted system call) - Checking out files: 100% (12315/12315), done. - Already on 'master' - $ cd /media/hd1s1/tmp/master - $ git status - # On branch master - # Changes not staged for commit: - # (use "git add ..." to update what will be committed) - # (use "git checkout -- ..." to discard changes in working directory) - # - # modified: gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d - # - no changes added to commit (use "git add" and/or "git commit -a") - $ git checkout -f - $ git status - # On branch master - nothing to commit (working directory clean) - -([[Git issue|git-core-2]] is known.) - - $ git-new-workdir ~/tmp/binutils/git /media/hd1s2/tmp/master master - error: unable to create file bfd/elf32-dlx.c (Interrupted system call) - error: unable to create file bfd/sunos.c (Interrupted system call) - error: unable to create file gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d (Interrupted system call) - error: unable to create file gas/testsuite/gas/mmix/regx-op.d (Interrupted system call) - error: unable to create file gas/testsuite/gas/tic6x/reloc-bad-4.s (Interrupted system call) - error: unable to create file gold/testsuite/script_test_2.t (Interrupted system call) - error: unable to create file ld/testsuite/ld-mmix/loc7m.d (Interrupted system call) - error: unable to create file ld/testsuite/ld-powerpc/tlsexe.g (Interrupted system call) - Checking out files: 100% (12315/12315), done. - Already on 'master' - $ cd /media/hd1s2/tmp/master - $ git status - # On branch master - # Changes not staged for commit: - # (use "git add ..." to update what will be committed) - # (use "git checkout -- ..." to discard changes in working directory) - # - # modified: bfd/elf32-dlx.c - # modified: bfd/sunos.c - # modified: gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d - # modified: gas/testsuite/gas/mmix/regx-op.d - # modified: gas/testsuite/gas/tic6x/reloc-bad-4.s - # modified: gold/testsuite/script_test_2.t - # modified: ld/testsuite/ld-mmix/loc7m.d - # modified: ld/testsuite/ld-powerpc/tlsexe.g - # - no changes added to commit (use "git add" and/or "git commit -a") - $ git checkout -f - $ git status - # On branch master - nothing to commit (working directory clean) - -Now you'd expect these directories to have identical content, but: - - $ diff -x .git -ru /media/hd1s{1,2}/tmp/master/ > /tmp/diff - $ ls -l /tmp/diff - -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:12 /tmp/diff - $ grep '^[^ @+-]' < /tmp/diff - diff -x .git -ru /media/hd1s1/tmp/master//ld/configure /media/hd1s2/tmp/master//ld/configure - -(Note that this isn't a file that Git had issues with.) - -Try again: - - $ diff -x .git -ru /media/hd1s{1,2}/tmp/master/ > /tmp/diff_ - $ ls -l /tmp/diff* - -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:12 /tmp/diff - -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:17 /tmp/diff_ - $ cmp /tmp/diff{,_}; echo $? - 0 - -At least it's consistent. Force a reload: - - # settrans -ag /media/hd1s1 - # settrans -ag /media/hd1s2 - -Try again: - - $ diff -x .git -ru /media/hd1s{1,2}/tmp/master/ > /tmp/diff__ - $ ls -l /tmp/diff* - -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:12 /tmp/diff - -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:17 /tmp/diff_ - -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:30 /tmp/diff__ - $ cmp /tmp/diff{,__}; echo $? - 0 - -Consistent; thus very likely corrupt on-disk. - -After a few tries, the pattern generally is that for the files where there are -differences, once the file regularely ends, its content appears once more. -That is, the files' content appears once (regularely), and then the same again. -From three retries, I've seen this only ever happen on the `-o -linux`/`filetype` option file system. - -Some more copying: - - $ (cd /media/hd1s1/tmp/ && cp -a master master_) - $ (cd /media/hd1s2/tmp/ && cp -a master master_) - $ diff -x .git -ru /media/hd1s1/tmp/master{,_}/ > /tmp/diff1 - $ diff -x .git -ru /media/hd1s2/tmp/master{,_}/ > /tmp/diff2 - $ ls -l /tmp/diff{1,2} - -rw-r--r-- 1 thomas thomas 0 10. Jun 19:46 /tmp/diff1 - -rw-r--r-- 1 thomas thomas 0 10. Jun 19:46 /tmp/diff2 - -No further difference. - - -# Conclusion? - -The ext2 `filetype` option, as used for Linux-type file systems by default, -might cause some confusion inside [[hurd/translator/ext2fs]]? - -[[!tag open_issue_documentation]] The strange thing is that in -`[hurd]/ext2fs/dir.c` the `EXT2_FEATURE_INCOMPAT_FILETYPE` is generally masked -out (is not even considered) when adding a node to a directory in -`diskfs_direnter_hard` and when reading in `diskfs_get_directs`, so unless -setting this file system flag has some other effects on the meta data (which it -doesn't seem to have according to the Linux kernel source code), it shouldn't -make any difference. Also, this information would only be used for setting -directory listing's informational `d_type` field (`readdir`, etc.). Hrm. -Perhaps only a red herring? - - -## `e2fsck` - -Running `e2fsck` on a file system with the `filetypes` option, there are -messages that the `filetype` for a lot of files is set (to either 1 (regular -file, `EXT2_FT_REG_FILE`), or 2 (directory, `EXT2_FT_DIR`)). The Hurd's ext2fs -should unconditionally set this field to 0 (`EXT2_FT_UNKNOWN`). - - -# Next - -Start over with the `filetype` option reversed: - - # mke2fs -I 128 -o linux -O ^filetype /dev/hd1s1 - # mke2fs -o hurd -O filetype /dev/hd1s2 - -In fact, for `-o hurd`, `-O filetype` doesn't have any effect (according to -`dumpe2fs -h`), so the meta data now only differs in *Filesystem OS type*. - -Invoke `git-new-workdir` once more (for each). - -Now there is corruption in files on the `-o hurd -O filetype` file system. But -this time not caused by `git-new-workdir`, but instead when copying a binutils -checkout to a new directory. Huh. Does `-O filetype` in fact have any effect -with `-o hurd`? The `e2fsprogs` source code should tell, but is not available -right now. diff --git a/open_issues/git-core-2.mdwn b/open_issues/git-core-2.mdwn index a1fdbac1..acd82442 100644 --- a/open_issues/git-core-2.mdwn +++ b/open_issues/git-core-2.mdwn @@ -133,3 +133,10 @@ starting from an empty working directory (after an external `git push`): $ git status # On branch master nothing to commit (working directory clean) + +--- + +2011-06-13 + +This seems to be fixed after a rebuild of the Debian git 1.7.5.3-1 with a +recent toolchain. diff --git a/open_issues/git_duplicated_content.mdwn b/open_issues/git_duplicated_content.mdwn new file mode 100644 index 00000000..3b4bc44b --- /dev/null +++ b/open_issues/git_duplicated_content.mdwn @@ -0,0 +1,125 @@ +[[!meta copyright="Copyright © 2011 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag open_issue_porting]] + + $ git-new-workdir ~/tmp/binutils/git /media/hd1s1/tmp/master master + error: unable to create file gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d (Interrupted system call) + Checking out files: 100% (12315/12315), done. + Already on 'master' + $ cd /media/hd1s1/tmp/master + $ git status + # On branch master + # Changes not staged for commit: + # (use "git add ..." to update what will be committed) + # (use "git checkout -- ..." to discard changes in working directory) + # + # modified: gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d + # + no changes added to commit (use "git add" and/or "git commit -a") + $ git checkout -f + $ git status + # On branch master + nothing to commit (working directory clean) + +([[Git issue|git-core-2]] is known.) + + $ git-new-workdir ~/tmp/binutils/git /media/hd1s2/tmp/master master + error: unable to create file bfd/elf32-dlx.c (Interrupted system call) + error: unable to create file bfd/sunos.c (Interrupted system call) + error: unable to create file gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d (Interrupted system call) + error: unable to create file gas/testsuite/gas/mmix/regx-op.d (Interrupted system call) + error: unable to create file gas/testsuite/gas/tic6x/reloc-bad-4.s (Interrupted system call) + error: unable to create file gold/testsuite/script_test_2.t (Interrupted system call) + error: unable to create file ld/testsuite/ld-mmix/loc7m.d (Interrupted system call) + error: unable to create file ld/testsuite/ld-powerpc/tlsexe.g (Interrupted system call) + Checking out files: 100% (12315/12315), done. + Already on 'master' + $ cd /media/hd1s2/tmp/master + $ git status + # On branch master + # Changes not staged for commit: + # (use "git add ..." to update what will be committed) + # (use "git checkout -- ..." to discard changes in working directory) + # + # modified: bfd/elf32-dlx.c + # modified: bfd/sunos.c + # modified: gas/testsuite/gas/arm/attr-mfpu-vfpv3-d16.d + # modified: gas/testsuite/gas/mmix/regx-op.d + # modified: gas/testsuite/gas/tic6x/reloc-bad-4.s + # modified: gold/testsuite/script_test_2.t + # modified: ld/testsuite/ld-mmix/loc7m.d + # modified: ld/testsuite/ld-powerpc/tlsexe.g + # + no changes added to commit (use "git add" and/or "git commit -a") + $ git checkout -f + $ git status + # On branch master + nothing to commit (working directory clean) + +Now you'd expect these directories to have identical content, but: + + $ diff -x .git -ru /media/hd1s{1,2}/tmp/master/ > /tmp/diff + $ ls -l /tmp/diff + -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:12 /tmp/diff + $ grep '^[^ @+-]' < /tmp/diff + diff -x .git -ru /media/hd1s1/tmp/master//ld/configure /media/hd1s2/tmp/master//ld/configure + +(Note that this isn't a file that Git had issues with.) + +Try again: + + $ diff -x .git -ru /media/hd1s{1,2}/tmp/master/ > /tmp/diff_ + $ ls -l /tmp/diff* + -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:12 /tmp/diff + -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:17 /tmp/diff_ + $ cmp /tmp/diff{,_}; echo $? + 0 + +At least it's consistent. Force a reload: + + # settrans -ag /media/hd1s1 + # settrans -ag /media/hd1s2 + +Try again: + + $ diff -x .git -ru /media/hd1s{1,2}/tmp/master/ > /tmp/diff__ + $ ls -l /tmp/diff* + -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:12 /tmp/diff + -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:17 /tmp/diff_ + -rw-r--r-- 1 thomas thomas 613677 10. Jun 19:30 /tmp/diff__ + $ cmp /tmp/diff{,__}; echo $? + 0 + +Consistent; thus very likely corrupt on-disk. + +After a few tries, the pattern generally is that for the files where there are +differences, once the file regularely ends, its content appears once more. +That is, the files' content appears once (regularely), and then the same again. + +Some more copying: + + $ (cd /media/hd1s1/tmp/ && cp -a master master_) + $ (cd /media/hd1s2/tmp/ && cp -a master master_) + $ diff -x .git -ru /media/hd1s1/tmp/master{,_}/ > /tmp/diff1 + $ diff -x .git -ru /media/hd1s2/tmp/master{,_}/ > /tmp/diff2 + $ ls -l /tmp/diff{1,2} + -rw-r--r-- 1 thomas thomas 0 10. Jun 19:46 /tmp/diff1 + -rw-r--r-- 1 thomas thomas 0 10. Jun 19:46 /tmp/diff2 + +No further difference. + +--- + + $ git-new-workdir git master master + $ diff -x .git -ur tar_master/ master/ > master.diff + + $ 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 -- cgit v1.2.3 From 6a05a26aafa04e07c97d0c134a08ce75b3410252 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 13 Jun 2011 21:51:59 +0200 Subject: open_issues/git-core-2: SA_RESTART? --- open_issues/git-core-2.mdwn | 54 +++++++++++++++++++++++++++++++-- open_issues/git_duplicated_content.mdwn | 6 ++++ 2 files changed, 57 insertions(+), 3 deletions(-) (limited to 'open_issues') 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]] -- cgit v1.2.3