{"thread":{"id":"47588","subject":"[BUG] Breakage in t5509 # 2 from read(stdin) EINVAL","startedAt":"2018-01-10T18:36:16Z","lastAt":"2018-01-10T18:36:16Z","messageCount":1,"participants":["Randall S. Becker"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"336405","messageId":"00e601d38a41$e25a1c60$a70e5520$@nexbridge.com","threadId":"47588","inReplyTo":null,"subject":"[BUG] Breakage in t5509 # 2 from read(stdin) EINVAL","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2018-01-10T18:36:04Z","receivedAt":"2018-01-10T18:36:16Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"Hi All,\n\nHeres the situation. In the NonStop port, since time immemorial, weve had\na breakage in 5509 that Ive finally had the chance to track down. The error\nreport at the breakage is:\n\n./trash directory.t5509-fetch-push-namespaces/original: GIT_TRACE=true\nGIT_PACKET_TRACE=true GIT_TRANSLOOP_DEBUG=true git push pushee-namespaced\nmaster\n11:55:02.512020 trace: built-in: git 'push' 'pushee-namespaced' 'master'\n11:55:02.600895 trace: run_command: 'git-remote-ext' 'pushee-namespaced'\n'git --namespace=namespace %s ../pushee'\n11:55:02.610439 trace: built-in: git 'remote-ext' 'pushee-namespaced' 'git\n--namespace=namespace %s ../pushee'\n11:55:02.612643 trace: run_command: 'git' '--namespace=namespace'\n'receive-pack' '../pushee'\n11:55:02.622553 trace: built-in: git 'receive-pack' '../pushee'\nTransfer loop debugging: stdin is readable\nerror: read(stdin) failed: Invalid function argument\nTransfer loop debugging: remote input is readable\nerror: read(remote input) failed: Invalid function argument\nerror: Git to program copy process failed\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n\ntransport-helper.c uses read instead of wrapper.cs xread to do its work. It\nlooks like when the buffer size calculation is done passed into read, were\ngetting a very large value, more than SSIZE_MAX. In udt_do_read:\n\nbytes = read(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse);\n\ngenerates EINVAL. This may be because unidirectional_transfer.bufuse is\nsize_t instead of ssize_t. I can try to fix this a number of ways, but it\nseems that xread is likely the way to go. udt_do_write already uses xwrite.\n\nIm looking to fix on or after 2.13.5 (7234152).\n\nOpinions?\n\nThanks,\nRandall\n\n-- Brief whoami:\n  NonStop developer since approximately NonStop(211288444200000000)\n  UNIX developer since approximately 421664400\n-- In my real life, I talk too much.\n\n\n\n"}]}