{"thread":{"id":"27258","subject":"t5541: Bad file descriptor","startedAt":"2011-05-05T04:49:19Z","lastAt":"2011-05-09T14:50:01Z","messageCount":11,"participants":["Brian Gernhardt","Junio C Hamano","Jeff King","Sverre Rabbelier","Avery Pennarun","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"167070","messageId":"3340686A-18D8-4279-87F0-580262DD4DFA@gernhardtsoftware.com","threadId":"27258","inReplyTo":null,"subject":"t5541: Bad file descriptor","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2011-05-05T04:49:19Z","receivedAt":"2011-05-05T04:49:19Z","isPatch":false,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"I haven't had a lot of time to track down it down until today, but I've been getting failures in t5541-http-push-.sh.  Several tests fail with the error \"fatal: write error: Bad file descriptor\".\n\nI have bisected this to \"73776dc: \nMerge branch 'js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix' into js/maint-send-pack-stateless-rpc-deadlock-fix\"\n\nFull test output follows:\n\n$ ./t5541-http-push.sh -v\nInitialized empty Git repository in /Users/brian/dev/git/t/trash directory.t5541-http-push/.git/\nexpecting success: \n\tcd \"$ROOT_PATH\" &&\n\tmkdir test_repo &&\n\tcd test_repo &&\n\tgit init &&\n\t: >path1 &&\n\tgit add path1 &&\n\ttest_tick &&\n\tgit commit -m initial &&\n\tcd - &&\n\tgit clone --bare test_repo test_repo.git &&\n\tcd test_repo.git &&\n\tgit config http.receivepack true &&\n\tORIG_HEAD=$(git rev-parse --verify HEAD) &&\n\tcd - &&\n\tmv test_repo.git \"$HTTPD_DOCUMENT_ROOT_PATH\"\n\nInitialized empty Git repository in /Users/brian/dev/git/t/trash directory.t5541-http-push/test_repo/.git/\n[master (root-commit) 0c973ae] initial\n Author: A U Thor <author@example.com>\n 0 files changed, 0 insertions(+), 0 deletions(-)\n create mode 100644 path1\n/Users/brian/dev/git/t/trash directory.t5541-http-push\nCloning into bare repository test_repo.git...\ndone.\n/Users/brian/dev/git/t/trash directory.t5541-http-push\nok 1 - setup remote repository\n\nexpecting success: \n\t# In the URL, add a trailing slash, and see if git appends yet another\n\t# slash.\n\tcd \"$ROOT_PATH\" &&\n\tgit clone $HTTPD_URL/smart/test_repo.git/ test_repo_clone &&\n\n\tsed -e \"\n\t\ts/^.* \\\"//\n\t\ts/\\\"//\n\t\ts/ [1-9][0-9]*\\$//\n\t\ts/^GET /GET  /\n\t\" >act <\"$HTTPD_ROOT_PATH\"/access.log &&\n\n\t# Clear the log, so that it does not affect the \"used receive-pack\n\t# service\" test which reads the log too.\n\t#\n\t# We do this before the actual comparison to ensure the log is cleared.\n\techo > \"$HTTPD_ROOT_PATH\"/access.log &&\n\n\ttest_cmp exp act\n\nCloning into test_repo_clone...\nremote: Counting objects: 3, done.        \nremote: Total 3 (delta 0), reused 0 (delta 0)        \nUnpacking objects: 100% (3/3), done.\nok 2 - no empty path components\n\nexpecting success: \n\trm -rf test_repo_clone &&\n\tgit clone $HTTPD_URL/smart/test_repo.git test_repo_clone\n\nCloning into test_repo_clone...\nremote: Counting objects: 3, done.        \nremote: Total 3 (delta 0), reused 0 (delta 0)        \nUnpacking objects: 100% (3/3), done.\nok 3 - clone remote repository\n\nexpecting success: \n\tcd \"$ROOT_PATH\"/test_repo_clone &&\n\t: >path2 &&\n\tgit add path2 &&\n\ttest_tick &&\n\tgit commit -m path2 &&\n\tHEAD=$(git rev-parse --verify HEAD) &&\n\tgit push &&\n\t(cd \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git &&\n\t test $HEAD = $(git rev-parse --verify HEAD))\n\n[master 9d498b0] path2\n Author: A U Thor <author@example.com>\n 0 files changed, 0 insertions(+), 0 deletions(-)\n create mode 100644 path2\nCounting objects: 3, done.\nDelta compression using up to 2 threads.\nCompressing objects: 100% (2/2), done.\nWriting objects: 100% (2/2), 240 bytes, done.\nTotal 2 (delta 0), reused 0 (delta 0)\nfatal: write error: Bad file descriptor\nfatal: The remote end hung up unexpectedly\nnot ok - 4 push to remote repository\n#\t\n#\t\tcd \"$ROOT_PATH\"/test_repo_clone &&\n#\t\t: >path2 &&\n#\t\tgit add path2 &&\n#\t\ttest_tick &&\n#\t\tgit commit -m path2 &&\n#\t\tHEAD=$(git rev-parse --verify HEAD) &&\n#\t\tgit push &&\n#\t\t(cd \"$HTTPD_DOCUMENT_ROOT_PATH\"/test_repo.git &&\n#\t\t test $HEAD = $(git rev-parse --verify HEAD))\n#\t\n\nexpecting success: \n\tgit push\n\nCounting objects: 3, done.\nDelta compression using up to 2 threads.\nCompressing objects: 100% (2/2), done.\nWriting objects: 100% (2/2), 240 bytes, done.\nTotal 2 (delta 0), reused 0 (delta 0)\nfatal: write error: Bad file descriptor\nfatal: The remote end hung up unexpectedly\nnot ok - 5 push already up-to-date\n#\t\n#\t\tgit push\n#\t\n\nexpecting success: \n\tcd \"$ROOT_PATH\"/test_repo_clone &&\n\tgit checkout -b dev &&\n\t: >path3 &&\n\tgit add path3 &&\n\ttest_tick &&\n\tgit commit -m dev &&\n\tgit push origin dev &&\n\tgit push origin :dev &&\n\ttest_must_fail git show-ref --verify refs/remotes/origin/dev\n\nSwitched to a new branch 'dev'\n[dev 3ea4fbb] dev\n Author: A U Thor <author@example.com>\n 0 files changed, 0 insertions(+), 0 deletions(-)\n create mode 100644 path3\nCounting objects: 5, done.\nDelta compression using up to 2 threads.\nCompressing objects: 100% (4/4), done.\nWriting objects: 100% (4/4), 414 bytes, done.\nTotal 4 (delta 1), reused 0 (delta 0)\nfatal: The remote end hung up unexpectedly\nfatal: write error: Bad file descriptor\nnot ok - 6 create and delete remote branch\n#\t\n#\t\tcd \"$ROOT_PATH\"/test_repo_clone &&\n#\t\tgit checkout -b dev &&\n#\t\t: >path3 &&\n#\t\tgit add path3 &&\n#\t\ttest_tick &&\n#\t\tgit commit -m dev &&\n#\t\tgit push origin dev &&\n#\t\tgit push origin :dev &&\n#\t\ttest_must_fail git show-ref --verify refs/remotes/origin/dev\n#\t\n\nexpecting success: \n\tsed -e \"\n\t\ts/^.* \\\"//\n\t\ts/\\\"//\n\t\ts/ [1-9][0-9]*\\$//\n\t\ts/^GET /GET  /\n\t\" >act <\"$HTTPD_ROOT_PATH\"/access.log &&\n\ttest_cmp exp act\n\n--- exp\t2011-05-05 04:48:00.000000000 +0000\n+++ act\t2011-05-05 04:48:00.000000000 +0000\n@@ -2,9 +2,5 @@\n GET  /smart/test_repo.git/info/refs?service=git-upload-pack HTTP/1.1 200\n POST /smart/test_repo.git/git-upload-pack HTTP/1.1 200\n GET  /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200\n-POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200\n GET  /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200\n GET  /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200\n-POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200\n-GET  /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200\n-POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200\nnot ok - 7 used receive-pack service\n#\t\n#\t\tsed -e \"\n#\t\t\ts/^.* \\\"//\n#\t\t\ts/\\\"//\n#\t\t\ts/ [1-9][0-9]*\\$//\n#\t\t\ts/^GET /GET  /\n#\t\t\" >act <\"$HTTPD_ROOT_PATH\"/access.log &&\n#\t\ttest_cmp exp act\n#\t\n\nexpecting success: \n\t\tcd \"$REMOTE_REPO\" &&\n\t\tHEAD=$(git rev-parse --verify HEAD) &&\n\n\t\tcd \"$LOCAL_REPO\" &&\n\t\tgit checkout $BRANCH &&\n\t\techo \"changed\" > path2 &&\n\t\tgit commit -a -m path2 --amend &&\n\n\t\ttest_must_fail git push -v origin >output 2>&1 &&\n\t\t(cd \"$REMOTE_REPO\" &&\n\t\t test $HEAD = $(git rev-parse --verify HEAD))\n\t\nSwitched to branch 'master'\nYour branch is ahead of 'origin/master' by 1 commit.\n[master 910616f] path2\n Author: A U Thor <author@example.com>\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 path2\nok 8 - non-fast-forward push fails\n\nexpecting success: \n\t\tgrep \"^ ! \\[rejected\\][ ]*$BRANCH -> $BRANCH (non-fast-forward)$\" output\n\t\nnot ok - 9 non-fast-forward push show ref status\n#\t\n#\t\t\tgrep \"^ ! \\[rejected\\][ ]*$BRANCH -> $BRANCH (non-fast-forward)$\" output\n#\t\t\n\nexpecting success: \n\t\ttest_i18ngrep \"To prevent you from losing history, non-fast-forward updates were rejected\" output\n\t\nnot ok - 10 non-fast-forward push shows help message\n#\t\n#\t\t\ttest_i18ngrep \"To prevent you from losing history, non-fast-forward updates were rejected\" output\n#\t\t\n\nexpecting success: \n\t# create a dissimilarly-named remote ref so that git is unable to match the\n\t# two refs (viz. local, remote) unless an explicit refspec is provided.\n\tgit push origin master:retsam\n\n\techo \"change changed\" > path2 &&\n\tgit commit -a -m path2 --amend &&\n\n\t# push master too; this ensures there is at least one 'push' command to\n\t# the remote helper and triggers interaction with the helper.\n\ttest_must_fail git push -v origin +master master:retsam >output 2>&1\nCounting objects: 4, done.\nDelta compression using up to 2 threads.\nCompressing objects: 100% (2/2), done.\nWriting objects: 100% (3/3), 279 bytes, done.\nTotal 3 (delta 0), reused 0 (delta 0)\nfatal: write error: Bad file descriptor\nfatal: The remote end hung up unexpectedly\n[master 6773b42] path2\n Author: A U Thor <author@example.com>\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 path2\nok 11 - push fails for non-fast-forward refs unmatched by remote helper\n\nexpecting success: \n\tgrep \"^ + [a-f0-9]*\\.\\.\\.[a-f0-9]* *master -> master (forced update)$\" output &&\n\tgrep \"^ ! \\[rejected\\] *master -> retsam (non-fast-forward)$\" output\n\nnot ok - 12 push fails for non-fast-forward refs unmatched by remote helper: remote output\n#\t\n#\t\tgrep \"^ + [a-f0-9]*\\.\\.\\.[a-f0-9]* *master -> master (forced update)$\" output &&\n#\t\tgrep \"^ ! \\[rejected\\] *master -> retsam (non-fast-forward)$\" output\n#\t\n\nexpecting success: \n\ttest_i18ngrep \"To prevent you from losing history, non-fast-forward updates were rejected\" \\\n\t\toutput\n\nnot ok - 13 push fails for non-fast-forward refs unmatched by remote helper: our output\n#\t\n#\t\ttest_i18ngrep \"To prevent you from losing history, non-fast-forward updates were rejected\" \\\n#\t\t\toutput\n#\t\n\n# failed 8 among 13 test(s)\n1..13\n"},{"id":"167072","messageId":"7voc3hbtgu.fsf@alter.siamese.dyndns.org","threadId":"27258","inReplyTo":"3340686A-18D8-4279-87F0-580262DD4DFA@gernhardtsoftware.com","subject":"Re: t5541: Bad file descriptor","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-05T05:35:13Z","receivedAt":"2011-05-05T05:35:13Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brian Gernhardt <brian@gernhardtsoftware.com> writes:\n\n> I haven't had a lot of time to track down it down until today, but I've\n> been getting failures in t5541-http-push-.sh.  Several tests fail with\n> the error \"fatal: write error: Bad file descriptor\".\n\nA wild guess.\n\nDoes it help if you cherry-picked 1e41827 (http: clear POSTFIELDS when\ninitializing a slot, 2011-04-26) on top of the faulty commit?\n"},{"id":"167074","messageId":"20110505054611.GA29033@sigill.intra.peff.net","threadId":"27258","inReplyTo":"7voc3hbtgu.fsf@alter.siamese.dyndns.org","subject":"Re: t5541: Bad file descriptor","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-05-05T05:46:11Z","receivedAt":"2011-05-05T05:46:11Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, May 04, 2011 at 10:35:13PM -0700, Junio C Hamano wrote:\n\n> Brian Gernhardt <brian@gernhardtsoftware.com> writes:\n> \n> > I haven't had a lot of time to track down it down until today, but I've\n> > been getting failures in t5541-http-push-.sh.  Several tests fail with\n> > the error \"fatal: write error: Bad file descriptor\".\n> \n> A wild guess.\n> \n> Does it help if you cherry-picked 1e41827 (http: clear POSTFIELDS when\n> initializing a slot, 2011-04-26) on top of the faulty commit?\n\nI think that 09c9957 (send-pack: avoid deadlock when pack-object dies\nearly, 2011-04-25) is totally broken.\n\nLooking back at my tests, I only tested the case where pack-objects\nfails. And it seems we totally broke the case where the push is supposed\nto succeed.\n\nStill investigating...\n\n-Peff\n"},{"id":"167077","messageId":"20110505061634.GB29033@sigill.intra.peff.net","threadId":"27258","inReplyTo":"20110505054611.GA29033@sigill.intra.peff.net","subject":"Re: t5541: Bad file descriptor","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-05-05T06:16:34Z","receivedAt":"2011-05-05T06:16:34Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 05, 2011 at 01:46:11AM -0400, Jeff King wrote:\n\n> On Wed, May 04, 2011 at 10:35:13PM -0700, Junio C Hamano wrote:\n> \n> > Brian Gernhardt <brian@gernhardtsoftware.com> writes:\n> > \n> > > I haven't had a lot of time to track down it down until today, but I've\n> > > been getting failures in t5541-http-push-.sh.  Several tests fail with\n> > > the error \"fatal: write error: Bad file descriptor\".\n> > \n> > A wild guess.\n> > \n> > Does it help if you cherry-picked 1e41827 (http: clear POSTFIELDS when\n> > initializing a slot, 2011-04-26) on top of the faulty commit?\n> \n> I think that 09c9957 (send-pack: avoid deadlock when pack-object dies\n> early, 2011-04-25) is totally broken.\n> \n> Looking back at my tests, I only tested the case where pack-objects\n> fails. And it seems we totally broke the case where the push is supposed\n> to succeed.\n> \n> Still investigating...\n\nOK, embarrassing. 09c9957 completely breaks smart http pushing. My\ntesting of Johannes' patch was completely focused on the error case, and\nI didn't have a single test for the non-error case. And on top of that,\nwe _have_ nice tests in the test suite to catch this, but obviously\nneither I, nor Johannes, nor Junio were running them (because they need\napache installed and GIT_TEST_HTTPD set).\n\nUgh.\n\nThis patch on top of 09c9957 should fix it.\n\n-- >8 --\nSubject: [PATCH] send-pack: unbreak push over stateless rpc\n\nCommit 09c9957 (send-pack: avoid deadlock when pack-object\ndies early, 2011-04-25) attempted to fix a hang in the\nstateless rpc case by closing a file descriptor early, but\nwe still need that descriptor.\n\nBasically the deadlock can happen when pack-objects fails,\nand the descriptor to upstream is left open. We never send\nthe pack, so the upstream is left waiting for us to say\nsomething, and we are left waiting for upstream to close the\nconnection.\n\nIn the non-rpc case, our descriptor points straight to the\nupstream. We hand it off to run-command, which takes\nownership and closes the descriptor after pack-objects\nfinishes (whether it succeeds or not).\n\nCommit 09c9957 tried to emulate that in the rpc case. That\nisn't right, though. We actually have a descriptor going\nback to the remote-helper, and we need to keep using it\nafter pack-objects is finished. Closing it early completely\nbreaks pushing via smart-http.\n\nWe still need to do something on error to signal the\nremote-helper that we won't be sending any pack data\n(otherwise we get the deadlock).  In an ideal world, we\nwould send a special packet back that says \"Sorry, there was\nan error\". But the remote-helper doesn't understand any such\npacket, so the best we can do is close the descriptor and\nlet it report that we hung up unexpectedly.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n builtin-send-pack.c |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-send-pack.c b/builtin-send-pack.c\nindex 6516288..3e70795 100644\n--- a/builtin-send-pack.c\n+++ b/builtin-send-pack.c\n@@ -97,7 +97,6 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext\n \t\tfree(buf);\n \t\tclose(po.out);\n \t\tpo.out = -1;\n-\t\tclose(fd);\n \t}\n \n \tif (finish_command(&po))\n@@ -519,6 +518,8 @@ int send_pack(struct send_pack_args *args,\n \t\tif (pack_objects(out, remote_refs, extra_have, args) < 0) {\n \t\t\tfor (ref = remote_refs; ref; ref = ref->next)\n \t\t\t\tref->status = REF_STATUS_NONE;\n+\t\t\tif (args->stateless_rpc)\n+\t\t\t\tclose(out);\n \t\t\tif (use_sideband)\n \t\t\t\tfinish_async(&demux);\n \t\t\treturn -1;\n-- \n1.7.5.406.gfbb2\n"},{"id":"167078","messageId":"20110505061845.GC29033@sigill.intra.peff.net","threadId":"27258","inReplyTo":"20110505054611.GA29033@sigill.intra.peff.net","subject":"Re: t5541: Bad file descriptor","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-05-05T06:18:45Z","receivedAt":"2011-05-05T06:18:45Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"[argh, resend, I meant to cc Johannes Sixt]\n\nOn Thu, May 05, 2011 at 01:46:11AM -0400, Jeff King wrote:\n\n> On Wed, May 04, 2011 at 10:35:13PM -0700, Junio C Hamano wrote:\n> \n> > Brian Gernhardt <brian@gernhardtsoftware.com> writes:\n> > \n> > > I haven't had a lot of time to track down it down until today, but I've\n> > > been getting failures in t5541-http-push-.sh.  Several tests fail with\n> > > the error \"fatal: write error: Bad file descriptor\".\n> > \n> > A wild guess.\n> > \n> > Does it help if you cherry-picked 1e41827 (http: clear POSTFIELDS when\n> > initializing a slot, 2011-04-26) on top of the faulty commit?\n> \n> I think that 09c9957 (send-pack: avoid deadlock when pack-object dies\n> early, 2011-04-25) is totally broken.\n> \n> Looking back at my tests, I only tested the case where pack-objects\n> fails. And it seems we totally broke the case where the push is supposed\n> to succeed.\n> \n> Still investigating...\n\nOK, embarrassing. 09c9957 completely breaks smart http pushing. My\ntesting of Johannes' patch was completely focused on the error case, and\nI didn't have a single test for the non-error case. And on top of that,\nwe _have_ nice tests in the test suite to catch this, but obviously\nneither I, nor Johannes, nor Junio were running them (because they need\napache installed and GIT_TEST_HTTPD set).\n\nUgh.\n\nThis patch on top of 09c9957 should fix it.\n\n-- >8 --\nSubject: [PATCH] send-pack: unbreak push over stateless rpc\n\nCommit 09c9957 (send-pack: avoid deadlock when pack-object\ndies early, 2011-04-25) attempted to fix a hang in the\nstateless rpc case by closing a file descriptor early, but\nwe still need that descriptor.\n\nBasically the deadlock can happen when pack-objects fails,\nand the descriptor to upstream is left open. We never send\nthe pack, so the upstream is left waiting for us to say\nsomething, and we are left waiting for upstream to close the\nconnection.\n\nIn the non-rpc case, our descriptor points straight to the\nupstream. We hand it off to run-command, which takes\nownership and closes the descriptor after pack-objects\nfinishes (whether it succeeds or not).\n\nCommit 09c9957 tried to emulate that in the rpc case. That\nisn't right, though. We actually have a descriptor going\nback to the remote-helper, and we need to keep using it\nafter pack-objects is finished. Closing it early completely\nbreaks pushing via smart-http.\n\nWe still need to do something on error to signal the\nremote-helper that we won't be sending any pack data\n(otherwise we get the deadlock).  In an ideal world, we\nwould send a special packet back that says \"Sorry, there was\nan error\". But the remote-helper doesn't understand any such\npacket, so the best we can do is close the descriptor and\nlet it report that we hung up unexpectedly.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n builtin-send-pack.c |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-send-pack.c b/builtin-send-pack.c\nindex 6516288..3e70795 100644\n--- a/builtin-send-pack.c\n+++ b/builtin-send-pack.c\n@@ -97,7 +97,6 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext\n \t\tfree(buf);\n \t\tclose(po.out);\n \t\tpo.out = -1;\n-\t\tclose(fd);\n \t}\n \n \tif (finish_command(&po))\n@@ -519,6 +518,8 @@ int send_pack(struct send_pack_args *args,\n \t\tif (pack_objects(out, remote_refs, extra_have, args) < 0) {\n \t\t\tfor (ref = remote_refs; ref; ref = ref->next)\n \t\t\t\tref->status = REF_STATUS_NONE;\n+\t\t\tif (args->stateless_rpc)\n+\t\t\t\tclose(out);\n \t\t\tif (use_sideband)\n \t\t\t\tfinish_async(&demux);\n \t\t\treturn -1;\n-- \n1.7.5.406.gfbb2\n\n"},{"id":"167085","messageId":"6F83A7A8-F4D7-4E1B-B6F4-03AE004C5726@gernhardtsoftware.com","threadId":"27258","inReplyTo":"20110505061845.GC29033@sigill.intra.peff.net","subject":"Re: t5541: Bad file descriptor","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2011-05-05T06:57:20Z","receivedAt":"2011-05-05T06:57:20Z","isPatch":false,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"\nOn May 5, 2011, at 2:18 AM, Jeff King wrote:\n\n> OK, embarrassing. 09c9957 completely breaks smart http pushing. My\n> testing of Johannes' patch was completely focused on the error case, and\n> I didn't have a single test for the non-error case. And on top of that,\n> we _have_ nice tests in the test suite to catch this, but obviously\n> neither I, nor Johannes, nor Junio were running them (because they need\n> apache installed and GIT_TEST_HTTPD set).\n> \n> Ugh.\n> \n> This patch on top of 09c9957 should fix it.\n> \n> -- >8 --\n> Subject: [PATCH] send-pack: unbreak push over stateless rpc\n\nWhile I could not get the patch to apply as-is (git apply complained of trailing whitespace), I performed the changes by hand and t5541 passed once more.\n\n~~ Brian\n"},{"id":"167105","messageId":"BANLkTin8YUwoMmxXLske=5nuvW+idBOuig@mail.gmail.com","threadId":"27258","inReplyTo":"20110505061634.GB29033@sigill.intra.peff.net","subject":"Re: t5541: Bad file descriptor","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2011-05-05T11:18:28Z","receivedAt":"2011-05-05T11:18:28Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Thu, May 5, 2011 at 08:16, Jeff King <peff@peff.net> wrote:\n> OK, embarrassing. 09c9957 completely breaks smart http pushing. My\n> testing of Johannes' patch was completely focused on the error case, and\n> I didn't have a single test for the non-error case. And on top of that,\n> we _have_ nice tests in the test suite to catch this, but obviously\n> neither I, nor Johannes, nor Junio were running them (because they need\n> apache installed and GIT_TEST_HTTPD set).\n\nWasn't someone, I _think_ Ævar, or maybe Avery, (I could be totally\nwrong) running a buildbot of git.git on various platforms? If so,\nmaybe they can turn on these tests since they aren't often run?\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"167137","messageId":"BANLkTi=y+34s+yO9LVuiUxB5Xz3v7Pc2Mw@mail.gmail.com","threadId":"27258","inReplyTo":"BANLkTin8YUwoMmxXLske=5nuvW+idBOuig@mail.gmail.com","subject":"Re: t5541: Bad file descriptor","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2011-05-05T17:59:36Z","receivedAt":"2011-05-05T17:59:36Z","isPatch":false,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Thu, May 5, 2011 at 7:18 AM, Sverre Rabbelier <srabbelier@gmail.com> wrote:\n> On Thu, May 5, 2011 at 08:16, Jeff King <peff@peff.net> wrote:\n>> OK, embarrassing. 09c9957 completely breaks smart http pushing. My\n>> testing of Johannes' patch was completely focused on the error case, and\n>> I didn't have a single test for the non-error case. And on top of that,\n>> we _have_ nice tests in the test suite to catch this, but obviously\n>> neither I, nor Johannes, nor Junio were running them (because they need\n>> apache installed and GIT_TEST_HTTPD set).\n>\n> Wasn't someone, I _think_ Ævar, or maybe Avery, (I could be totally\n> wrong) running a buildbot of git.git on various platforms? If so,\n> maybe they can turn on these tests since they aren't often run?\n\nI was running one, didn't think anybody cared about it though.  Please\npoint me at the necessary docs for this test and I can set up a new\none in my copious spare time (tm).  I can't promise to monitor it\nthough, so that might be more of a problem :)  gitbuilder does produce\nrss feeds that are easy to track.\n\nHave fun,\n\nAvery\n"},{"id":"167153","messageId":"BANLkTin82XVOQaE4i9BJu3Eyr5v_8MOaOg@mail.gmail.com","threadId":"27258","inReplyTo":"BANLkTi=y+34s+yO9LVuiUxB5Xz3v7Pc2Mw@mail.gmail.com","subject":"Re: t5541: Bad file descriptor","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2011-05-05T18:51:29Z","receivedAt":"2011-05-05T18:51:29Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Thu, May 5, 2011 at 19:59, Avery Pennarun <apenwarr@gmail.com> wrote:\n> I was running one, didn't think anybody cared about it though.  Please\n> point me at the necessary docs for this test and I can set up a new\n> one in my copious spare time (tm).  I can't promise to monitor it\n> though, so that might be more of a problem :)  gitbuilder does produce\n> rss feeds that are easy to track.\n\nI don't think there are any docs as such, but see t/lib-httpd.sh.\nShould be easy enough to deduce which variables to set to what from\nthat.\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"167186","messageId":"4DC30BAF.2060009@kdbg.org","threadId":"27258","inReplyTo":"20110505061845.GC29033@sigill.intra.peff.net","subject":"Re: t5541: Bad file descriptor","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2011-05-05T20:42:23Z","receivedAt":"2011-05-05T20:42:23Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 05.05.2011 08:18, schrieb Jeff King:\n> OK, embarrassing. 09c9957 completely breaks smart http pushing. My\n> testing of Johannes' patch was completely focused on the error case, and\n> I didn't have a single test for the non-error case. And on top of that,\n> we _have_ nice tests in the test suite to catch this, but obviously\n> neither I, nor Johannes, nor Junio were running them (because they need\n> apache installed and GIT_TEST_HTTPD set).\n> \n> Ugh.\n> \n> This patch on top of 09c9957 should fix it.\n\nVery embarassing! Thanks for fixing up my mess. The patch looks good.\n\n-- Hannes\n"},{"id":"167502","messageId":"20110509145001.GB11362@sigill.intra.peff.net","threadId":"27258","inReplyTo":"BANLkTin82XVOQaE4i9BJu3Eyr5v_8MOaOg@mail.gmail.com","subject":"Re: t5541: Bad file descriptor","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-05-09T14:50:01Z","receivedAt":"2011-05-09T14:50:01Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 05, 2011 at 08:51:29PM +0200, Sverre Rabbelier wrote:\n\n> Heya,\n> \n> On Thu, May 5, 2011 at 19:59, Avery Pennarun <apenwarr@gmail.com> wrote:\n> > I was running one, didn't think anybody cared about it though.  Please\n> > point me at the necessary docs for this test and I can set up a new\n> > one in my copious spare time (tm).  I can't promise to monitor it\n> > though, so that might be more of a problem :)  gitbuilder does produce\n> > rss feeds that are easy to track.\n> \n> I don't think there are any docs as such, but see t/lib-httpd.sh.\n> Should be easy enough to deduce which variables to set to what from\n> that.\n\nJust setting GIT_TEST_HTTPD=1 in the environment would turn on those\ntests. But you need apache installed, too. The scripts should take care\nof any config.\n\n-Peff\n"}]}