From: Junio C Hamano <gitster@pobox.com>
To: <rsbecker@nexbridge.com>
Cc: "'Jeff King'" <peff@peff.net>, "'Git List'" <git@vger.kernel.org>
Subject: Re: [Bug] Test 1450.91 Fails on NonStop
Date: Wed, 15 Feb 2023 11:10:14 -0800 [thread overview]
Message-ID: <xmqqwn4iycbt.fsf@gitster.g> (raw)
In-Reply-To: <000801d9416e$4bf844b0$e3e8ce10$@nexbridge.com> (rsbecker@nexbridge.com's message of "Wed, 15 Feb 2023 13:49:50 -0500")
<rsbecker@nexbridge.com> writes:
> So, this looks like we do not have to hold the 2.39.2 release for this problem. I will run the packaging job for the platform release.
>
> + test-tool genzeros 104857601
> fatal: write(): Invalid function argument
>
> That explains it. We had to push the use of xwrite() because of
> issues associated with writing large buffers exceeding through
> write(). We could use MAX_IO_SIZE to limit the write size (at
> least on NonStop) into acceptable chunks.
True.
Curious that this use of write(2) is from late 2021 and its uses in
tests came from the same era (e.g. t1051 has two calls added in the
same timeperiod). So it is nothing new even to your platform, I
suspect.
There are a handful of raw write() in reftable implementation whose
size I am not sure about (and I am not touching), and a deliberate
use of it in trace2/tr2_dst.c that is well explained (and I do not
think touching is a good idea). Everything else looks like they are
aware that they are making a short write, but some of them might
still want to become xwrite() to benefit from auto retrying a short
write (which I didn't check).
In any case, I think the attached is a sensible first step to have.
t/helper/test-genzeros.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git c/t/helper/test-genzeros.c w/t/helper/test-genzeros.c
index 8ca988d621..9a1d3ee221 100644
--- c/t/helper/test-genzeros.c
+++ w/t/helper/test-genzeros.c
@@ -17,12 +17,12 @@ int cmd__genzeros(int argc, const char **argv)
/* Writing out individual NUL bytes is slow... */
while (count < 0)
- if (write(1, zeros, ARRAY_SIZE(zeros)) < 0)
+ if (xwrite(1, zeros, ARRAY_SIZE(zeros)) < 0)
return -1;
while (count > 0) {
- n = write(1, zeros, count < ARRAY_SIZE(zeros) ?
- count : ARRAY_SIZE(zeros));
+ n = xwrite(1, zeros, count < ARRAY_SIZE(zeros) ?
+ count : ARRAY_SIZE(zeros));
if (n < 0)
return -1;
next prev parent reply other threads:[~2023-02-15 19:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 17:44 [Bug] Test 1450.91 Fails on NonStop rsbecker
2023-02-15 17:59 ` rsbecker
2023-02-15 18:02 ` Jeff King
2023-02-15 18:49 ` rsbecker
2023-02-15 19:10 ` Junio C Hamano [this message]
2023-02-15 19:41 ` rsbecker
2023-02-15 19:59 ` Jeff King
2023-02-16 1:45 ` Junio C Hamano
2023-02-16 2:56 ` [PATCH] test-genzeros: avoid raw write(2) Junio C Hamano
2023-02-16 4:34 ` Jeff King
2023-02-16 16:09 ` Junio C Hamano
2023-02-16 16:14 ` rsbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqwn4iycbt.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=rsbecker@nexbridge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).