{"thread":{"id":"47515","subject":"Test failure for v2.16.0-rc0 on cygwin","startedAt":"2017-12-30T14:21:31Z","lastAt":"2018-01-10T23:17:45Z","messageCount":7,"participants":["Ramsay Jones","Adam Dinwoodie","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"335559","messageId":"519ac918-6b5f-bca3-05a0-0114683b9724@ramsayjones.plus.com","threadId":"47515","inReplyTo":null,"subject":"Test failure for v2.16.0-rc0 on cygwin","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2017-12-30T14:21:23Z","receivedAt":"2017-12-30T14:21:31Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Hi Junio, Adam,\n\nJust a quick note about the failure of the test-suite on cygwin.\nIn particular, test t5580-clone-push-unc.sh #3, like so:\n\n  $ ./t5580-clone-push-unc.sh -i -v\n\n  ...\n\n  ok 2 - clone\n  \n  expecting success: \n  \t(\n  \t\tcd clone &&\n  \t\tgit checkout -b to-push &&\n  \t\ttest_commit to-push &&\n  \t\tgit push origin HEAD\n  \t) &&\n  \trev=\"$(git -C clone rev-parse --verify refs/heads/to-push)\" &&\n  \ttest \"$rev\" = \"$(git rev-parse --verify refs/heads/to-push)\"\n  \n  Switched to a new branch 'to-push'\n  [to-push 0adccbe] to-push\n   Author: A U Thor <author@example.com>\n   1 file changed, 1 insertion(+)\n   create mode 100644 to-push.t\n  Counting objects: 3, done.\n  Delta compression using up to 4 threads.\n  Compressing objects: 100% (2/2), done.\n  Writing objects: 100% (3/3), 289 bytes | 289.00 KiB/s, done.\n  Total 3 (delta 0), reused 0 (delta 0)\n  error: remote unpack failed: unable to create temporary object directory\n  To file:////localhost/C$/\\cygwin64\\home\\ramsay\\git\\t\\trash directory.t5580-clone-push-unc\n   ! [remote rejected] HEAD -> to-push (unpacker error)\n  error: failed to push some refs to 'file:////localhost/C$/\\cygwin64\\home\\ramsay\\git\\t\\trash directory.t5580-clone-push-unc'\n  not ok 3 - push\n  #\t\n  #\t\t(\n  #\t\t\tcd clone &&\n  #\t\t\tgit checkout -b to-push &&\n  #\t\t\ttest_commit to-push &&\n  #\t\t\tgit push origin HEAD\n  #\t\t) &&\n  #\t\trev=\"$(git -C clone rev-parse --verify refs/heads/to-push)\" &&\n  #\t\ttest \"$rev\" = \"$(git rev-parse --verify refs/heads/to-push)\"\n  #\t\n  $ \n\nMy first, knee-jerk, reaction on seeing the backslashes in the 'local' part\nof the pathname (despite what it says in commit f21d60b429) was to replace\nthe 'cygpath -aw .' with 'cygpath -am .'. This leads to exactly the same\nerror display as above, except '\\\\' replaced by '/' in the pathname! Hmm.\n\nNote:\n\n  $ ls '//localhost/C$/\\cygwin64\\home\\ramsay\\git\\t\\trash directory.t5580-clone-push-unc'\n  clone/  initial.t\n  $ ls '//localhost/C$//cygwin64/home/ramsay/git/t/trash directory.t5580-clone-push-unc'\n  clone/  initial.t\n  $ ls //localhost/C$/\\\\cygwin64\\\\home\\\\ramsay\\\\git\\\\t\\\\trash\\ directory.t5580-clone-push-unc\n  clone/  initial.t\n  $ \n \nSo, after some debugging (using the 'cygpath -am .' version), it seems that\nthe error message is caused by the mkdtemp() call in tmp_objdir_create()\nfunction (tmp-objdir.c:123), failing with an errno of 'permission denied'. \n\nAt the time of the call to mkdtemp, the current working directory is given by\n'//localhost/C$/cygwin64/home/ramsay/git/t/trash directory.t5580-clone-push-unc/.git',\nand the parameter to mkdtemp is (for example) \"./objects/incoming-MgZCkI\".\n\n  $ cd trash\\ directory.t5580-clone-push-unc/\n  $ ls\n  clone/  initial.t\n  $ ls .git\n  branches/       config       HEAD             index  logs/     refs/\n  COMMIT_EDITMSG  description  hooks-disabled/  info/  objects/\n  $ ls .git/objects\n  24/  93/  e7/  info/  pack/\n  $ mkdir '//localhost/C$//cygwin64/home/ramsay/git/t/trash directory.t5580-clone-push-unc/.git/./objects/incoming-MgZCkI'\n  mkdir: cannot create directory ‘//localhost/C$//cygwin64/home/ramsay/git/t/trash directory.t5580-clone-push-unc/.git/./objects/incoming-MgZCkI’: Permission denied\n    $ \n\nSo, when 'doing it by hand', I get the same result. ;-)\n\nLooking at the permissions:\n\n  $ ls -ld '//localhost/C$//cygwin64/home/ramsay/git/t/trash directory.t5580-clone-push-unc/.git/./objects'\n  drwxr-xr-x+ 1 ramsay None 0 Dec 30 13:51 '//localhost/C$//cygwin64/home/ramsay/git/t/trash directory.t5580-clone-push-unc/.git/./objects'/\n\n  $ ls -ld '//localhost/C$//cygwin64/home/ramsay/git/t/trash directory.t5580-clone-push-unc/.git'\n  drwxr-xr-x+ 1 ramsay None 0 Dec 30 13:51 '//localhost/C$//cygwin64/home/ramsay/git/t/trash directory.t5580-clone-push-unc/.git'/\n\n  $ ls -ld '//localhost/C$//cygwin64/home/ramsay/git/t/trash directory.t5580-clone-push-unc'\n  drwxr-xr-x+ 1 ramsay None 0 Dec 30 13:51 '//localhost/C$//cygwin64/home/ramsay/git/t/trash directory.t5580-clone-push-unc'/\n\n  ... and so on, until:\n\n  $ ls -ld '//localhost/C$'\n  d---r-x---+ 1 TrustedInstaller TrustedInstaller 0 Oct 28 16:16 '//localhost/C$'/\n  $ \n\nDoing a quick web-search on '//localhost/C$' lead me to several posts which\nseem to suggest the problem could be related to UAC filtering on remote\nshares (and the fact that I am on Windows 10), along with a registry setting\nfor 'LocalAccountTokenFilterPolicy'. However, I have not had time to look\ninto any of that.\n\nAdam, are you running the tests on Windows 10?\n\nI have to go now, so I can't look at this further today. Just FYI.\n\nATB,\nRamsay Jones\n\n"},{"id":"335560","messageId":"20171230144019.GB29210@dinwoodie.org","threadId":"47515","inReplyTo":"519ac918-6b5f-bca3-05a0-0114683b9724@ramsayjones.plus.com","subject":"Re: Test failure for v2.16.0-rc0 on cygwin","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2017-12-30T14:40:19Z","receivedAt":"2017-12-30T14:40:29Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"On Saturday 30 December 2017 at 02:21 pm +0000, Ramsay Jones wrote:\n> Hi Junio, Adam,\n> \n> Just a quick note about the failure of the test-suite on cygwin.\n> In particular, test t5580-clone-push-unc.sh #3, like so:\n> \n> <snip>\n>\n> Adam, are you running the tests on Windows 10?\n\nI'm only routinely testing on Windows 10 x86_64, but between holidays\nvarious, I've not had the tests running for the past couple of weeks.\nI'm kicking off a build now in the name of verifying I see the same\nproblem.\n\nAdam\n"},{"id":"335613","messageId":"20180102113649.GC29210@dinwoodie.org","threadId":"47515","inReplyTo":"20171230144019.GB29210@dinwoodie.org","subject":"Re: Test failure for v2.16.0-rc0 on cygwin","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2018-01-02T11:36:49Z","receivedAt":"2018-01-02T11:36:58Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"On Saturday 30 December 2017 at 02:40 pm +0000, Adam Dinwoodie wrote:\n> On Saturday 30 December 2017 at 02:21 pm +0000, Ramsay Jones wrote:\n> > Hi Junio, Adam,\n> > \n> > Just a quick note about the failure of the test-suite on cygwin.\n> > In particular, test t5580-clone-push-unc.sh #3, like so:\n> > \n> > <snip>\n> >\n> > Adam, are you running the tests on Windows 10?\n> \n> I'm only routinely testing on Windows 10 x86_64, but between holidays\n> various, I've not had the tests running for the past couple of weeks.\n> I'm kicking off a build now in the name of verifying I see the same\n> problem.\n\nI'm not able to reproduce this: t5580 is passing on both my Windows 10\ntest systems on v2.16.0-rc0.\n\nLooking at your output, it sounds like there's something slightly odd\nwith your directory permissions.  I agree the mixed slashes look odd,\nbut given the test is passing on both my systems, I don't think that can\nbe the problem.\n\nI suspect you're going to need to do some more digging yourself given\nthis appears to be a permissions issue on your system.  For a start,\nwhen you get to the failing `mkdir` with a UNC path, are you able to\ncreate the equivalent directory using Cygwin's `mkdir` but specifying a\nregular non-UNC path, or by opening the UNC path in Explorer and\ncreating the directory there?\n\nAdam\n"},{"id":"335615","messageId":"3616d866-9a53-6e32-0a62-488342ae214f@ramsayjones.plus.com","threadId":"47515","inReplyTo":"20180102113649.GC29210@dinwoodie.org","subject":"Re: Test failure for v2.16.0-rc0 on cygwin","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2018-01-02T15:32:27Z","receivedAt":"2018-01-02T15:32:38Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 02/01/18 11:36, Adam Dinwoodie wrote:\n> On Saturday 30 December 2017 at 02:40 pm +0000, Adam Dinwoodie wrote:\n>> On Saturday 30 December 2017 at 02:21 pm +0000, Ramsay Jones wrote:\n>>> Hi Junio, Adam,\n>>>\n>>> Just a quick note about the failure of the test-suite on cygwin.\n>>> In particular, test t5580-clone-push-unc.sh #3, like so:\n>>>\n>>> <snip>\n>>>\n>>> Adam, are you running the tests on Windows 10?\n>>\n>> I'm only routinely testing on Windows 10 x86_64, but between holidays\n>> various, I've not had the tests running for the past couple of weeks.\n>> I'm kicking off a build now in the name of verifying I see the same\n>> problem.\n> \n> I'm not able to reproduce this: t5580 is passing on both my Windows 10\n> test systems on v2.16.0-rc0.\n\nHmm, interesting. BTW, I should have noted which version I'm on (just\nin case it matters): Windows 10 Home, Version 1709, OS Build 16299.125.\n\nI am reasonably up-to-date on cygwin:\n\n  $ uname -a\n  CYGWIN_NT-10.0 satellite 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin\n  $ \n\n[I only recently updated to the creator's update (I'm not signed up to\nthe 'insider program'), and so could not try out WSL until now. I would\nnot recommend it to anyone who wants to develop software - a Linux VM\nis an _order of magnitude_ faster, so ... ]\n\n> Looking at your output, it sounds like there's something slightly odd\n> with your directory permissions.  I agree the mixed slashes look odd,\n> but given the test is passing on both my systems, I don't think that can\n> be the problem.\n\nThe directory permissions look fine to me (except for //localhost/C$).\n\n> I suspect you're going to need to do some more digging yourself given\n> this appears to be a permissions issue on your system.  For a start,\n> when you get to the failing `mkdir` with a UNC path, are you able to\n> create the equivalent directory using Cygwin's `mkdir` but specifying a\n> regular non-UNC path, \n\nyes, this is not a problem.\n\n                        or by opening the UNC path in Explorer and\n> creating the directory there?\n\nI didn't get to this because ...\n\nI just tried running the test again by hand, and I can't get it to fail!\n\nHmm, I have just set off a complete test-suite run, so I won't be able\nto report on that for a while ... ;-)\n\nI have an idea: when running the failing tests the other day, I was\nremotely logged in via ssh (I have cygwin sshd running on my win10\nbox), but today I was logged in directly. The sshd daemon is run by\na privileged user, so maybe that could be related ... dunno.\n\nI will have to investigate some more. (If you have any ideas ... :-D )\n\nATB,\nRamsay Jones\n\n"},{"id":"335621","messageId":"e69657de-9455-2b97-09d7-2bd58ce513f6@ramsayjones.plus.com","threadId":"47515","inReplyTo":"3616d866-9a53-6e32-0a62-488342ae214f@ramsayjones.plus.com","subject":"Re: Test failure for v2.16.0-rc0 on cygwin","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2018-01-02T19:34:22Z","receivedAt":"2018-01-02T19:34:31Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 02/01/18 15:32, Ramsay Jones wrote:\n> On 02/01/18 11:36, Adam Dinwoodie wrote:\n>> On Saturday 30 December 2017 at 02:40 pm +0000, Adam Dinwoodie wrote:\n>>> On Saturday 30 December 2017 at 02:21 pm +0000, Ramsay Jones wrote:\n[snip]\n>> I'm not able to reproduce this: t5580 is passing on both my Windows 10\n>> test systems on v2.16.0-rc0.\n[snip]\n> I just tried running the test again by hand, and I can't get it to fail!\n> \n> Hmm, I have just set off a complete test-suite run, so I won't be able\n> to report on that for a while ... ;-)\n\nYep, as expected, the test-suite passes no problem now! ;-)\n\n> I have an idea: when running the failing tests the other day, I was\n> remotely logged in via ssh (I have cygwin sshd running on my win10\n> box), but today I was logged in directly. The sshd daemon is run by\n> a privileged user, so maybe that could be related ... dunno.\n\nAlso, when logged-in remotely it fails consistently, when logged-in\ndirectly it passes consistently. :-D\n\nATB,\nRamsay Jones\n\n\n"},{"id":"335864","messageId":"alpine.DEB.2.21.1.1801042152570.32@MININT-6BKU6QN.europe.corp.microsoft.com","threadId":"47515","inReplyTo":"e69657de-9455-2b97-09d7-2bd58ce513f6@ramsayjones.plus.com","subject":"Re: Test failure for v2.16.0-rc0 on cygwin","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-01-04T20:55:10Z","receivedAt":"2018-01-04T20:55:34Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 2 Jan 2018, Ramsay Jones wrote:\n\n> On 02/01/18 15:32, Ramsay Jones wrote:\n> > On 02/01/18 11:36, Adam Dinwoodie wrote:\n> >> On Saturday 30 December 2017 at 02:40 pm +0000, Adam Dinwoodie wrote:\n> >>> On Saturday 30 December 2017 at 02:21 pm +0000, Ramsay Jones wrote:\n> [snip]\n> >> I'm not able to reproduce this: t5580 is passing on both my Windows 10\n> >> test systems on v2.16.0-rc0.\n> [snip]\n> > I just tried running the test again by hand, and I can't get it to fail!\n> > \n> > Hmm, I have just set off a complete test-suite run, so I won't be able\n> > to report on that for a while ... ;-)\n> \n> Yep, as expected, the test-suite passes no problem now! ;-)\n> \n> > I have an idea: when running the failing tests the other day, I was\n> > remotely logged in via ssh (I have cygwin sshd running on my win10\n> > box), but today I was logged in directly. The sshd daemon is run by\n> > a privileged user, so maybe that could be related ... dunno.\n> \n> Also, when logged-in remotely it fails consistently, when logged-in\n> directly it passes consistently. :-D\n\nYou are most likely hitting cmd.exe at some point there. In cmd.exe, there\nare some restrictions that are inherited by spawned processes AFAIU. For\nexample, the current directory cannot be a UNC path.\n\nYou are most likely running the interactive Cygwin session in MinTTY? Then\nyou do not get those restrictions. If you start Cygwin in a cmd.exe\nwindow, you should see the exact same test failures again.\n\nCiao,\nDscho\n"},{"id":"336436","messageId":"87f53af7-4f5b-22a7-b950-772eb67b0151@ramsayjones.plus.com","threadId":"47515","inReplyTo":"alpine.DEB.2.21.1.1801042152570.32@MININT-6BKU6QN.europe.corp.microsoft.com","subject":"Re: Test failure for v2.16.0-rc0 on cygwin","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2018-01-10T23:17:37Z","receivedAt":"2018-01-10T23:17:45Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 04/01/18 20:55, Johannes Schindelin wrote:\n> On Tue, 2 Jan 2018, Ramsay Jones wrote:\n[snip]\n>> Also, when logged-in remotely it fails consistently, when logged-in\n>> directly it passes consistently. :-D\n> \n> You are most likely hitting cmd.exe at some point there. In cmd.exe, there\n> are some restrictions that are inherited by spawned processes AFAIU. For\n> example, the current directory cannot be a UNC path.\n> \n> You are most likely running the interactive Cygwin session in MinTTY? Then\n> you do not get those restrictions. If you start Cygwin in a cmd.exe\n> window, you should see the exact same test failures again.\n\nI actually don't see a difference when starting cygwin from a cmd.exe, it\npasses just fine. The interactive cygwin session(s), either directly, or\nmost often via the X-server (with ssh-agent in between!), all have their\nid's and group membership look like:\n\n  $ who\n  $ id\n  uid=1001(ramsay) gid=513(None) groups=513(None),545(Users),4(INTERACTIVE),66049(CONSOLE LOGON),11(Authenticated Users),15(This Organization),113(Local account),66048(LOCAL),262154(NTLM Authentication),401408(Medium Mandatory Level)\n  $\n\nHowever, when remotely logged-in over shh, it looks like:\n\n  $ who -H\n  NAME     LINE         TIME             COMMENT\n  ramsay   pty2         2018-01-02 19:48 (192.168.1.2)\n  $ id\n  uid=1001(ramsay) gid=513(None) groups=513(None),11(Authenticated Users),66048(LOCAL),66049(CONSOLE LOGON),4(INTERACTIVE),15(This Organization),545(Users),0(root),405504(High Mandatory Level)\n  $\n\nSo, when remotely logged-in, we have:\n\n  Additional groups: 0(root), 405504(High Mandatory Level)\n\n  Missing groups: 113(Local account), 262154(NTLM Authentication),\n                  401408(Medium Mandatory Level)\n\nI haven't thought too much about what that means ...\n\nAfter reading this[1], I have been meaning to try setting the\n'LocalAccountTokenFilterPolicy' registry variable mentioned in\nthat article, to see if that would make any difference. I haven't\nfound the time yet ... :-D\n\nATB,\nRamsay Jones\n\n\n[1] http://www.tomsitpro.com/articles/windows-10-administrative-shares,2-47.html\n"}]}