From: <rsbecker@nexbridge.com>
To: "'Junio C Hamano'" <gitster@pobox.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 14:41:43 -0500 [thread overview]
Message-ID: <001301d94175$8baf97a0$a30ec6e0$@nexbridge.com> (raw)
In-Reply-To: <xmqqwn4iycbt.fsf@gitster.g>
On Wednesday, February 15, 2023 2:10 PM, Junio C Hamano wrote:
><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.
I have been looking at the past log (pre-2.39) and this test has not failed
previously - although git blame on t1450 shows 6-Feb-2023, so that might be
why I've not seen this previously. It is possible test-genzeros was not used
in this way previously.
>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).
I would not want to touch those either, although I do keep an eye out for
new write() usage and whine about it if I notice. ;-)
>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;
This works well as a fix. Please go with it with my blessing.
--Randall
next prev parent reply other threads:[~2023-02-15 19:42 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
2023-02-15 19:41 ` rsbecker [this message]
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='001301d94175$8baf97a0$a30ec6e0$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).