git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [BUG] Breakage in t5509 # 2 from read(stdin) EINVAL
@ 2018-01-10 18:36 Randall S. Becker
  0 siblings, 0 replies; only message in thread
From: Randall S. Becker @ 2018-01-10 18:36 UTC (permalink / raw)
  To: 'git mailing list'

Hi All,

Here’s the situation. In the NonStop port, since time immemorial, we’ve had
a breakage in 5509 that I’ve finally had the chance to track down. The error
report at the breakage is:

./trash directory.t5509-fetch-push-namespaces/original: GIT_TRACE=true
GIT_PACKET_TRACE=true GIT_TRANSLOOP_DEBUG=true git push pushee-namespaced
master
11:55:02.512020 trace: built-in: git 'push' 'pushee-namespaced' 'master'
11:55:02.600895 trace: run_command: 'git-remote-ext' 'pushee-namespaced'
'git --namespace=namespace %s ../pushee'
11:55:02.610439 trace: built-in: git 'remote-ext' 'pushee-namespaced' 'git
--namespace=namespace %s ../pushee'
11:55:02.612643 trace: run_command: 'git' '--namespace=namespace'
'receive-pack' '../pushee'
11:55:02.622553 trace: built-in: git 'receive-pack' '../pushee'
Transfer loop debugging: stdin is readable
error: read(stdin) failed: Invalid function argument
Transfer loop debugging: remote input is readable
error: read(remote input) failed: Invalid function argument
error: Git to program copy process failed
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

transport-helper.c uses read instead of wrapper.c’s xread to do its work. It
looks like when the buffer size calculation is done passed into read, we’re
getting a very large value, more than SSIZE_MAX. In udt_do_read:

bytes = read(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse);

generates EINVAL. This may be because unidirectional_transfer.bufuse is
size_t instead of ssize_t. I can try to fix this a number of ways, but it
seems that xread is likely the way to go. udt_do_write already uses xwrite.

I’m looking to fix on or after 2.13.5 (7234152).

Opinions?

Thanks,
Randall

-- Brief whoami:
  NonStop developer since approximately NonStop(211288444200000000)
  UNIX developer since approximately 421664400
-- In my real life, I talk too much.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-10 18:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-10 18:36 [BUG] Breakage in t5509 # 2 from read(stdin) EINVAL Randall S. Becker

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git