{"thread":{"id":"33664","subject":"consistency problem on ZFS","startedAt":"2013-04-28T19:11:25Z","lastAt":"2013-04-29T18:16:54Z","messageCount":9,"participants":["Yann Hodique","Thomas Rast","John Szakmeister","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"215800","messageId":"m2bo8yxyg2.fsf@jarvis.hodique.info","threadId":"33664","inReplyTo":null,"subject":"consistency problem on ZFS","fromName":"Yann Hodique","fromEmail":"yann.hodique@gmail.com","sentAt":"2013-04-28T19:11:25Z","receivedAt":"2013-04-28T19:11:25Z","isPatch":false,"sender":{"key":"yann.hodique@gmail.com","avatar":"https://gravatar.com/avatar/47ab8ea6d0d9ecdbe95e507dd34a1de11b75c52d9f9b095320874f24d4ac306a?d=mp&s=160"},"body":"Hi,\n\nI have a weird problem that seems to manifest itself only on ZFS\n(actually the Zevo distribution, on OSX). With git 1.8.2.1 by the way.\nI just switched to ZFS, so I can't blame that particular version of git.\n\n\"Sometimes\" (I'd say something like 10-15% of the time, fairly\nreproducible anyway), \"git diff-files\" will see changes that don't exist\nfor some time, then will catch up with the actual state of the file:\n\n$ git checkout next; git diff-files; git checkout next; git diff-files\nAlready on 'next'\n:100644 100644 bd774cccaa14e061c3c26996567ee28f4f77ec80 0000000000000000000000000000000000000000 M\tmagit.el\nAlready on 'next'\n$\n\nHere it was pretty quick, but sometimes I would see those phantom\ndiffs for more than 5 seconds.\n\nInterestingly, if I manage to run \"git diff\" during that time, this one\nreports no changes. See https://gist.github.com/sigma/5477827 for a more\ncomplex trace: \"git merge\" was complaining about changes, yet neither \"git\ndiff\" nor \"git status\" did show any. That's the scenario I tried to\nminimize to the invocation above.\n\nI'm willing to accept that the filesystem has some responsibility there,\nbut the inconsistency bothers me. Anything I can provide to help finding\nthe root cause of the issue ?\n\nThanks for any hint (and workarounds are highly welcome, as it breaks\nmany of my scripts, and magit too :))\n\nYann.\n\n-- \nA Duke must always take control of his household, for if he does not\nrule those closest to him, he cannot hope to govern a planet.\n\n  -- DUKE PAULUS ATREIDES\n"},{"id":"215804","messageId":"87k3nme9ha.fsf@hexa.v.cablecom.net","threadId":"33664","inReplyTo":"m2bo8yxyg2.fsf@jarvis.hodique.info","subject":"Re: consistency problem on ZFS","fromName":"Thomas Rast","fromEmail":"trast@inf.ethz.ch","sentAt":"2013-04-28T19:33:21Z","receivedAt":"2013-04-28T19:33:21Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Yann Hodique <yann.hodique@gmail.com> writes:\n\n> I have a weird problem that seems to manifest itself only on ZFS\n> (actually the Zevo distribution, on OSX). With git 1.8.2.1 by the way.\n> I just switched to ZFS, so I can't blame that particular version of git.\n>\n> \"Sometimes\" (I'd say something like 10-15% of the time, fairly\n> reproducible anyway), \"git diff-files\" will see changes that don't exist\n> for some time, then will catch up with the actual state of the file:\n>\n> $ git checkout next; git diff-files; git checkout next; git diff-files\n> Already on 'next'\n> :100644 100644 bd774cccaa14e061c3c26996567ee28f4f77ec80 0000000000000000000000000000000000000000 M\tmagit.el\n> Already on 'next'\n> $\n\ngit-diff-files doesn't refresh the index.  Why are you using it?  It's\nthe plumbing version of 'git diff' (without args), which does the same\nbut *does* refresh the index.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"215805","messageId":"m261z6xwwl.fsf@jarvis.hodique.info","threadId":"33664","inReplyTo":"87k3nme9ha.fsf@hexa.v.cablecom.net","subject":"Re: consistency problem on ZFS","fromName":"Yann Hodique","fromEmail":"yann.hodique@gmail.com","sentAt":"2013-04-28T19:44:42Z","receivedAt":"2013-04-28T19:44:42Z","isPatch":false,"sender":{"key":"yann.hodique@gmail.com","avatar":"https://gravatar.com/avatar/47ab8ea6d0d9ecdbe95e507dd34a1de11b75c52d9f9b095320874f24d4ac306a?d=mp&s=160"},"body":">>>>> \"Thomas\" == Thomas Rast <trast@inf.ethz.ch> writes:\n\n> Yann Hodique <yann.hodique@gmail.com> writes:\n>> I have a weird problem that seems to manifest itself only on ZFS\n>> (actually the Zevo distribution, on OSX). With git 1.8.2.1 by the way.\n>> I just switched to ZFS, so I can't blame that particular version of git.\n>> \n>> \"Sometimes\" (I'd say something like 10-15% of the time, fairly\n>> reproducible anyway), \"git diff-files\" will see changes that don't exist\n>> for some time, then will catch up with the actual state of the file:\n>> \n>> $ git checkout next; git diff-files; git checkout next; git diff-files\n>> Already on 'next'\n>> :100644 100644 bd774cccaa14e061c3c26996567ee28f4f77ec80 0000000000000000000000000000000000000000 M\tmagit.el\n>> Already on 'next'\n>> $\n\n> git-diff-files doesn't refresh the index.  Why are you using it?  It's\n> the plumbing version of 'git diff' (without args), which does the same\n> but *does* refresh the index.\n\nWell, as I said, I'm mostly trying to minimize the case here (which\nmight or might not be successful, as it's essentially guesswork). But\nwhatever git-diff-files does, it seems odd that it doesn't report the\nsame thing twice, no ?\n\nThe actual real problem I have is the one that's exposed in the longer\ntrace I posted: git merge kindly asks me to fix a problem that a)\ndoesn't exist and b) isn't reported by porcelain commands (git diff, and\ngit status), and then magically stops asking after a couple of seconds.\n\nThanks,\n\nYann.\n\n-- \nBattle?  There's always a desire for breathing space motivating it somewhere.\n\n  -- The Bashar Teg\n"},{"id":"215807","messageId":"CAEBDL5W8E_i3V1ePWkf0Ep2iTjY59abqU7Q2w4o0iA8=P_4Onw@mail.gmail.com","threadId":"33664","inReplyTo":"m2bo8yxyg2.fsf@jarvis.hodique.info","subject":"Re: consistency problem on ZFS","fromName":"John Szakmeister","fromEmail":"john@szakmeister.net","sentAt":"2013-04-28T20:12:23Z","receivedAt":"2013-04-28T20:12:23Z","isPatch":false,"sender":{"key":"john@szakmeister.net","avatar":"https://avatars.githubusercontent.com/u/448087?v=4"},"body":"On Sun, Apr 28, 2013 at 3:11 PM, Yann Hodique <yann.hodique@gmail.com> wrote:\n> Hi,\n>\n> I have a weird problem that seems to manifest itself only on ZFS\n> (actually the Zevo distribution, on OSX). With git 1.8.2.1 by the way.\n> I just switched to ZFS, so I can't blame that particular version of git.\n>\n> \"Sometimes\" (I'd say something like 10-15% of the time, fairly\n> reproducible anyway), \"git diff-files\" will see changes that don't exist\n> for some time, then will catch up with the actual state of the file:\n>\n> $ git checkout next; git diff-files; git checkout next; git diff-files\n> Already on 'next'\n> :100644 100644 bd774cccaa14e061c3c26996567ee28f4f77ec80 0000000000000000000000000000000000000000 M      magit.el\n> Already on 'next'\n> $\n\nSince you're running with Mac OS X, can I ask what version?  Have you\nseen this with the regular file system (HFS) at all?  It might be that\nyou need to disable core.trustctime.\n\n-John\n\nPS  Sorry for the repeat Yann... I forgot to CC the list.\n"},{"id":"215810","messageId":"m2zjwiwgng.fsf@jarvis.hodique.info","threadId":"33664","inReplyTo":"CAEBDL5W8E_i3V1ePWkf0Ep2iTjY59abqU7Q2w4o0iA8=P_4Onw@mail.gmail.com","subject":"Re: consistency problem on ZFS","fromName":"Yann Hodique","fromEmail":"yann.hodique@gmail.com","sentAt":"2013-04-28T20:21:07Z","receivedAt":"2013-04-28T20:21:07Z","isPatch":false,"sender":{"key":"yann.hodique@gmail.com","avatar":"https://gravatar.com/avatar/47ab8ea6d0d9ecdbe95e507dd34a1de11b75c52d9f9b095320874f24d4ac306a?d=mp&s=160"},"body":">>>>> \"John\" == John Szakmeister <john@szakmeister.net> writes:\n\n> On Sun, Apr 28, 2013 at 3:11 PM, Yann Hodique <yann.hodique@gmail.com> wrote:\n>> Hi,\n>> \n>> I have a weird problem that seems to manifest itself only on ZFS\n>> (actually the Zevo distribution, on OSX). With git 1.8.2.1 by the way.\n>> I just switched to ZFS, so I can't blame that particular version of git.\n>> \n>> \"Sometimes\" (I'd say something like 10-15% of the time, fairly\n>> reproducible anyway), \"git diff-files\" will see changes that don't exist\n>> for some time, then will catch up with the actual state of the file:\n>> \n>> $ git checkout next; git diff-files; git checkout next; git diff-files\n>> Already on 'next'\n>> :100644 100644 bd774cccaa14e061c3c26996567ee28f4f77ec80 0000000000000000000000000000000000000000 M      magit.el\n>> Already on 'next'\n>> $\n\n> Since you're running with Mac OS X, can I ask what version?  Have you\n> seen this with the regular file system (HFS) at all?  It might be that\n> you need to disable core.trustctime.\n\nSure, it's OS X 10.8.3\nAnd no, I don't see this on HFS+ at all. I've just tried numerous times\nwithout success.\n\nAnd setting core.trustctime seems to do the trick indeed. Many thanks,\nthat's helping a lot in the short term !\n\nYann.\n\n-- \nAt the age of fifteen, he had already learned silence.\n\n  -- from \"A Child's History of Muad'Dib\" by the Princess Irulan\n"},{"id":"215813","messageId":"7vk3nmpcgn.fsf@alter.siamese.dyndns.org","threadId":"33664","inReplyTo":"m2bo8yxyg2.fsf@jarvis.hodique.info","subject":"Re: consistency problem on ZFS","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-28T21:33:28Z","receivedAt":"2013-04-28T21:33:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Yann Hodique <yann.hodique@gmail.com> writes:\n\n> $ git checkout next; git diff-files; git checkout next; git diff-files\n> Already on 'next'\n> :100644 100644 bd774cccaa14e061c3c26996567ee28f4f77ec80 0000000000000000000000000000000000000000 M\tmagit.el\n> Already on 'next'\n> $\n\nIf you run \"git update-index --refresh\" between the first \"checkout\"\nand \"diff-files\", do you still see the issue?\n"},{"id":"215883","messageId":"m2haip6x1z.fsf@jarvis.hodique.info","threadId":"33664","inReplyTo":"7vk3nmpcgn.fsf@alter.siamese.dyndns.org","subject":"Re: consistency problem on ZFS","fromName":"Yann Hodique","fromEmail":"yann.hodique@gmail.com","sentAt":"2013-04-29T17:55:52Z","receivedAt":"2013-04-29T17:55:52Z","isPatch":false,"sender":{"key":"yann.hodique@gmail.com","avatar":"https://gravatar.com/avatar/47ab8ea6d0d9ecdbe95e507dd34a1de11b75c52d9f9b095320874f24d4ac306a?d=mp&s=160"},"body":">>>>> \"Junio\" == Junio C Hamano <gitster@pobox.com> writes:\n\n> Yann Hodique <yann.hodique@gmail.com> writes:\n>> $ git checkout next; git diff-files; git checkout next; git diff-files\n>> Already on 'next'\n>> :100644 100644 bd774cccaa14e061c3c26996567ee28f4f77ec80 0000000000000000000000000000000000000000 M\tmagit.el\n>> Already on 'next'\n>> $\n\n> If you run \"git update-index --refresh\" between the first \"checkout\"\n> and \"diff-files\", do you still see the issue?\n\nYes, although *way* less often. I just ran a quick experiment and have\nseen the issue 2 times in 2500 tries.\n\nThanks,\n\nYann.\n\n-- \nThere exists no separation between gods and men:\none blends softly casual into the other.\n\n  -- Proverbs of Muad'dib\n"},{"id":"215886","messageId":"7v61z5jjvx.fsf@alter.siamese.dyndns.org","threadId":"33664","inReplyTo":"m2haip6x1z.fsf@jarvis.hodique.info","subject":"Re: consistency problem on ZFS","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-29T18:01:54Z","receivedAt":"2013-04-29T18:01:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Yann Hodique <yann.hodique@gmail.com> writes:\n\n>>>>>> \"Junio\" == Junio C Hamano <gitster@pobox.com> writes:\n>\n>> Yann Hodique <yann.hodique@gmail.com> writes:\n>>> $ git checkout next; git diff-files; git checkout next; git diff-files\n>>> Already on 'next'\n>>> :100644 100644 bd774cccaa14e061c3c26996567ee28f4f77ec80 0000000000000000000000000000000000000000 M\tmagit.el\n>>> Already on 'next'\n>>> $\n>\n>> If you run \"git update-index --refresh\" between the first \"checkout\"\n>> and \"diff-files\", do you still see the issue?\n>\n> Yes, although *way* less often. I just ran a quick experiment and have\n> seen the issue 2 times in 2500 tries.\n\nHmph, that indicates somebody other than you or your Git is mucking\nwith the inodes of your working tree files and perphas affecting\nctime on them (we do not pay attention to atime because dirtying\ncached information due to somebody else reading from the file makes\nabsolutely no sense, but we do notice ctime changes).  Perhaps\nbackground virus scanner or something silly like that?\n"},{"id":"215892","messageId":"m2d2td6w2x.fsf@jarvis.hodique.info","threadId":"33664","inReplyTo":"7v61z5jjvx.fsf@alter.siamese.dyndns.org","subject":"Re: consistency problem on ZFS","fromName":"Yann Hodique","fromEmail":"yann.hodique@gmail.com","sentAt":"2013-04-29T18:16:54Z","receivedAt":"2013-04-29T18:16:54Z","isPatch":false,"sender":{"key":"yann.hodique@gmail.com","avatar":"https://gravatar.com/avatar/47ab8ea6d0d9ecdbe95e507dd34a1de11b75c52d9f9b095320874f24d4ac306a?d=mp&s=160"},"body":">>>>> \"Junio\" == Junio C Hamano <gitster@pobox.com> writes:\n\n> Yann Hodique <yann.hodique@gmail.com> writes:\n>>>>>>> \"Junio\" == Junio C Hamano <gitster@pobox.com> writes:\n>> \n>>> Yann Hodique <yann.hodique@gmail.com> writes:\n>>>> $ git checkout next; git diff-files; git checkout next; git diff-files\n>>>> Already on 'next'\n>>>> :100644 100644 bd774cccaa14e061c3c26996567ee28f4f77ec80 0000000000000000000000000000000000000000 M\tmagit.el\n>>>> Already on 'next'\n>>>> $\n>> \n>>> If you run \"git update-index --refresh\" between the first \"checkout\"\n>>> and \"diff-files\", do you still see the issue?\n>> \n>> Yes, although *way* less often. I just ran a quick experiment and have\n>> seen the issue 2 times in 2500 tries.\n\n> Hmph, that indicates somebody other than you or your Git is mucking\n> with the inodes of your working tree files and perphas affecting\n> ctime on them (we do not pay attention to atime because dirtying\n> cached information due to somebody else reading from the file makes\n> absolutely no sense, but we do notice ctime changes).  Perhaps\n> background virus scanner or something silly like that?\n\nNot that I know of. I certainly don't have any virus scanner, and I even\ndeactivated spotlight.\nIn any case, I can't think of anything that would affect that volume\nwhile leaving my HFS+ ones alone, except for zfs background\nprocesses themselves.\n\nYann.\n\n-- \nWhat senses do we lack that we cannot see or hear another world all around us?\n\n  -- The Orange Catholic Bible\n"}]}