* [PATCH v2 0/2] Change xwrite() to write_in_full() in builtins.
@ 2024-02-27 15:09 Randall S. Becker
2024-02-27 15:09 ` [PATCH v2 1/3] builtin/repack.c: change xwrite to write_in_full and report errors Randall S. Becker
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Randall S. Becker @ 2024-02-27 15:09 UTC (permalink / raw)
To: git; +Cc: Randall S. Becker
From: "Randall S. Becker" <rsbecker@nexbridge.com>
This series replaces xwrite to write_in_full in builtins/. The change is
required to fix critical problems that prevent full writes to be
processed by on platforms where xwrite may be limited to a platform size
limit. Further changes outside of builtins/ may be required but do not
appear to be as urgent as this change, which causes test breakage in
t7704. A separate series will be contributed for changes outside of
builtins/ at a later date.
The change in unpack-objects.c is necessary as len is being passed into
xwrite that exceeds the size supported by the limit in that method
(56Kb on NonStop ia64).
Randall S. Becker (3):
builtin/repack.c: change xwrite to write_in_full and report errors.
builtin/receive-pack.c: change xwrite to write_in_full.
builtin/unpack-objects.c: change xwrite to write_in_full avoid
truncation.
builtin/receive-pack.c | 2 +-
builtin/repack.c | 9 +++++++--
builtin/unpack-objects.c | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)
--
2.42.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 1/3] builtin/repack.c: change xwrite to write_in_full and report errors.
2024-02-27 15:09 [PATCH v2 0/2] Change xwrite() to write_in_full() in builtins Randall S. Becker
@ 2024-02-27 15:09 ` Randall S. Becker
2024-02-27 18:49 ` Junio C Hamano
2024-02-27 15:09 ` [PATCH v2 2/3] builtin/receive-pack.c: change xwrite to write_in_full Randall S. Becker
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Randall S. Becker @ 2024-02-27 15:09 UTC (permalink / raw)
To: git; +Cc: Randall S. Becker
From: "Randall S. Becker" <rsbecker@nexbridge.com>
This change is required because some platforms do not support file writes of
arbitrary sizes (e.g, NonStop). xwrite ends up truncating the output to the
maximum single I/O size possible for the destination device. The result of
write_in_full() is also passed to the caller, which was previously ignored.
Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
---
builtin/repack.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/builtin/repack.c b/builtin/repack.c
index ede36328a3..932d24c60b 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -307,6 +307,7 @@ static int write_oid(const struct object_id *oid,
struct packed_git *pack UNUSED,
uint32_t pos UNUSED, void *data)
{
+ int err;
struct child_process *cmd = data;
if (cmd->in == -1) {
@@ -314,8 +315,12 @@ static int write_oid(const struct object_id *oid,
die(_("could not start pack-objects to repack promisor objects"));
}
- xwrite(cmd->in, oid_to_hex(oid), the_hash_algo->hexsz);
- xwrite(cmd->in, "\n", 1);
+ err = write_in_full(cmd->in, oid_to_hex(oid), the_hash_algo->hexsz);
+ if (err <= 0)
+ return err;
+ err = write_in_full(cmd->in, "\n", 1);
+ if (err <= 0)
+ return err;
return 0;
}
--
2.42.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 2/3] builtin/receive-pack.c: change xwrite to write_in_full.
2024-02-27 15:09 [PATCH v2 0/2] Change xwrite() to write_in_full() in builtins Randall S. Becker
2024-02-27 15:09 ` [PATCH v2 1/3] builtin/repack.c: change xwrite to write_in_full and report errors Randall S. Becker
@ 2024-02-27 15:09 ` Randall S. Becker
2024-02-27 19:00 ` Junio C Hamano
2024-02-27 15:09 ` [PATCH v2 3/3] builtin/unpack-objects.c: change xwrite to write_in_full avoid truncation Randall S. Becker
2024-02-27 21:11 ` [PATCH v2 0/2] Change xwrite() to write_in_full() in builtins rsbecker
3 siblings, 1 reply; 12+ messages in thread
From: Randall S. Becker @ 2024-02-27 15:09 UTC (permalink / raw)
To: git; +Cc: Randall S. Becker
From: "Randall S. Becker" <rsbecker@nexbridge.com>
This change is required because some platforms do not support file writes of arbitrary sizes (e.g, NonStop). xwrite ends up truncating the output to the
maximum single I/O size possible for the destination device.
Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
---
builtin/receive-pack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index db65607485..4277c63d08 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -456,7 +456,7 @@ static void report_message(const char *prefix, const char *err, va_list params)
if (use_sideband)
send_sideband(1, 2, msg, sz, use_sideband);
else
- xwrite(2, msg, sz);
+ write_in_full(2, msg, sz);
}
__attribute__((format (printf, 1, 2)))
--
2.42.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 3/3] builtin/unpack-objects.c: change xwrite to write_in_full avoid truncation.
2024-02-27 15:09 [PATCH v2 0/2] Change xwrite() to write_in_full() in builtins Randall S. Becker
2024-02-27 15:09 ` [PATCH v2 1/3] builtin/repack.c: change xwrite to write_in_full and report errors Randall S. Becker
2024-02-27 15:09 ` [PATCH v2 2/3] builtin/receive-pack.c: change xwrite to write_in_full Randall S. Becker
@ 2024-02-27 15:09 ` Randall S. Becker
2024-02-27 18:58 ` Junio C Hamano
2024-02-27 21:11 ` [PATCH v2 0/2] Change xwrite() to write_in_full() in builtins rsbecker
3 siblings, 1 reply; 12+ messages in thread
From: Randall S. Becker @ 2024-02-27 15:09 UTC (permalink / raw)
To: git; +Cc: Randall S. Becker
From: "Randall S. Becker" <rsbecker@nexbridge.com>
This change is required because some platforms do not support file writes of
arbitrary sizes (e.g, NonStop). xwrite ends up truncating the output to the
maximum single I/O size possible for the destination device if the supplied
len value exceeds the supported value. Replacing xwrite with write_in_full
corrects this problem. Future optimisations could remove the loop in favour
of just calling write_in_full.
Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
---
builtin/unpack-objects.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index e0a701f2b3..6935c4574e 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -680,7 +680,7 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix UNUSED)
/* Write the last part of the buffer to stdout */
while (len) {
- int ret = xwrite(1, buffer + offset, len);
+ int ret = write_in_full(1, buffer + offset, len);
if (ret <= 0)
break;
len -= ret;
--
2.42.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/3] builtin/repack.c: change xwrite to write_in_full and report errors.
2024-02-27 15:09 ` [PATCH v2 1/3] builtin/repack.c: change xwrite to write_in_full and report errors Randall S. Becker
@ 2024-02-27 18:49 ` Junio C Hamano
0 siblings, 0 replies; 12+ messages in thread
From: Junio C Hamano @ 2024-02-27 18:49 UTC (permalink / raw)
To: Randall S. Becker; +Cc: git, Randall S. Becker
"Randall S. Becker" <the.n.e.key@gmail.com> writes:
> From: "Randall S. Becker" <rsbecker@nexbridge.com>
>
> This change is required because some platforms do not support file writes of
> arbitrary sizes (e.g, NonStop). xwrite ends up truncating the output to the
> maximum single I/O size possible for the destination device. The result of
> write_in_full() is also passed to the caller, which was previously ignored.
This misleads readers to think that maximum single I/O size is
smaller than a single write of oid_to_hex() string on some
platforms. I somehow do not think that is why we want to make this
change.
Rather, the use of these xwrites() are simply wrong regardless of
maximum I/O size of the platforms, as this caller is not prepared to
see xwrite() result in a short write(2), and we do want to write all
bytes we have even in such a case.
You're right to also point out that we attempt to propagate the errors
to the caller (but see below).
> Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
> ---
> builtin/repack.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/repack.c b/builtin/repack.c
> index ede36328a3..932d24c60b 100644
> --- a/builtin/repack.c
> +++ b/builtin/repack.c
> @@ -307,6 +307,7 @@ static int write_oid(const struct object_id *oid,
> struct packed_git *pack UNUSED,
> uint32_t pos UNUSED, void *data)
> {
> + int err;
> struct child_process *cmd = data;
>
> if (cmd->in == -1) {
> @@ -314,8 +315,12 @@ static int write_oid(const struct object_id *oid,
> die(_("could not start pack-objects to repack promisor objects"));
> }
>
> - xwrite(cmd->in, oid_to_hex(oid), the_hash_algo->hexsz);
> - xwrite(cmd->in, "\n", 1);
> + err = write_in_full(cmd->in, oid_to_hex(oid), the_hash_algo->hexsz);
> + if (err <= 0)
> + return err;
> + err = write_in_full(cmd->in, "\n", 1);
> + if (err <= 0)
> + return err;
> return 0;
> }
I think this has already been brought up, but the caller of this
helper does not make such an error stand out enough and instead
makes the resulting repack silently produce wrong result, which
is not an improvement. Perhaps
if (write_in_full(...) ||
write_in_full(...))
die(_("failed to list promisor objects to repack"));
or something?
Thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 3/3] builtin/unpack-objects.c: change xwrite to write_in_full avoid truncation.
2024-02-27 15:09 ` [PATCH v2 3/3] builtin/unpack-objects.c: change xwrite to write_in_full avoid truncation Randall S. Becker
@ 2024-02-27 18:58 ` Junio C Hamano
2024-02-27 19:04 ` rsbecker
0 siblings, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2024-02-27 18:58 UTC (permalink / raw)
To: Randall S. Becker; +Cc: git, Randall S. Becker
"Randall S. Becker" <the.n.e.key@gmail.com> writes:
> From: "Randall S. Becker" <rsbecker@nexbridge.com>
>
> This change is required because some platforms do not support file writes of
> arbitrary sizes (e.g, NonStop). xwrite ends up truncating the output to the
> maximum single I/O size possible for the destination device if the supplied
> len value exceeds the supported value. Replacing xwrite with write_in_full
> corrects this problem. Future optimisations could remove the loop in favour
> of just calling write_in_full.
>
> Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
> ---
> builtin/unpack-objects.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
> index e0a701f2b3..6935c4574e 100644
> --- a/builtin/unpack-objects.c
> +++ b/builtin/unpack-objects.c
> @@ -680,7 +680,7 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix UNUSED)
>
> /* Write the last part of the buffer to stdout */
> while (len) {
> - int ret = xwrite(1, buffer + offset, len);
> + int ret = write_in_full(1, buffer + offset, len);
> if (ret <= 0)
> break;
> len -= ret;
Why do we need this with a retry loop that is prepared for short
write(2) specifically like this?
If xwrite() calls underlying write(2) with too large a value, then
your MAX_IO_SIZE is misconfigured, and the fix should go there, not
here in a loop that expects a working xwrite() that is allowed to
return on short write(2), I would think.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/3] builtin/receive-pack.c: change xwrite to write_in_full.
2024-02-27 15:09 ` [PATCH v2 2/3] builtin/receive-pack.c: change xwrite to write_in_full Randall S. Becker
@ 2024-02-27 19:00 ` Junio C Hamano
0 siblings, 0 replies; 12+ messages in thread
From: Junio C Hamano @ 2024-02-27 19:00 UTC (permalink / raw)
To: Randall S. Becker; +Cc: git, Randall S. Becker
"Randall S. Becker" <the.n.e.key@gmail.com> writes:
> From: "Randall S. Becker" <rsbecker@nexbridge.com>
>
> This change is required because some platforms do not support file writes of arbitrary sizes (e.g, NonStop). xwrite ends up truncating the output to the
> maximum single I/O size possible for the destination device.
>
> Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
> ---
> builtin/receive-pack.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
> index db65607485..4277c63d08 100644
> --- a/builtin/receive-pack.c
> +++ b/builtin/receive-pack.c
> @@ -456,7 +456,7 @@ static void report_message(const char *prefix, const char *err, va_list params)
> if (use_sideband)
> send_sideband(1, 2, msg, sz, use_sideband);
> else
> - xwrite(2, msg, sz);
> + write_in_full(2, msg, sz);
> }
This change does make sense, as we can see a short write(2) from
xwrite() and this caller is not repeating the call to flush the
remainder after a short write.
>
> __attribute__((format (printf, 1, 2)))
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH v2 3/3] builtin/unpack-objects.c: change xwrite to write_in_full avoid truncation.
2024-02-27 18:58 ` Junio C Hamano
@ 2024-02-27 19:04 ` rsbecker
2024-02-27 19:25 ` Jeff King
0 siblings, 1 reply; 12+ messages in thread
From: rsbecker @ 2024-02-27 19:04 UTC (permalink / raw)
To: 'Junio C Hamano', 'Randall S. Becker'; +Cc: git
On Tuesday, February 27, 2024 1:59 PM, Junio C Hamano wrote:
>"Randall S. Becker" <the.n.e.key@gmail.com> writes:
>
>> From: "Randall S. Becker" <rsbecker@nexbridge.com>
>>
>> This change is required because some platforms do not support file
>> writes of arbitrary sizes (e.g, NonStop). xwrite ends up truncating
>> the output to the maximum single I/O size possible for the destination
>> device if the supplied len value exceeds the supported value.
>> Replacing xwrite with write_in_full corrects this problem. Future
>> optimisations could remove the loop in favour of just calling
write_in_full.
>>
>> Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
>> ---
>> builtin/unpack-objects.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index
>> e0a701f2b3..6935c4574e 100644
>> --- a/builtin/unpack-objects.c
>> +++ b/builtin/unpack-objects.c
>> @@ -680,7 +680,7 @@ int cmd_unpack_objects(int argc, const char
>> **argv, const char *prefix UNUSED)
>>
>> /* Write the last part of the buffer to stdout */
>> while (len) {
>> - int ret = xwrite(1, buffer + offset, len);
>> + int ret = write_in_full(1, buffer + offset, len);
>> if (ret <= 0)
>> break;
>> len -= ret;
>
>Why do we need this with a retry loop that is prepared for short
>write(2) specifically like this?
>
>If xwrite() calls underlying write(2) with too large a value, then your
MAX_IO_SIZE is misconfigured, and the fix should go there, not
>here in a loop that expects a working xwrite() that is allowed to return on
short write(2), I would think.
I experimented with using write_in_full vs. keeping xwrite. With xwrite in
this loop, t7704.9 consistently fails as described in the other thread. With
write_in_full, the code works correctly. I assume there are side-effects
that are present. This change is critical to having the code work on
NonStop. Otherwise git seems to be at risk of actually being seriously
broken if unpack does not work correctly. I am happy to have my series
ignored as long as the problem is otherwise corrected.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 3/3] builtin/unpack-objects.c: change xwrite to write_in_full avoid truncation.
2024-02-27 19:04 ` rsbecker
@ 2024-02-27 19:25 ` Jeff King
2024-02-27 21:05 ` rsbecker
0 siblings, 1 reply; 12+ messages in thread
From: Jeff King @ 2024-02-27 19:25 UTC (permalink / raw)
To: rsbecker; +Cc: 'Junio C Hamano', 'Randall S. Becker', git
On Tue, Feb 27, 2024 at 02:04:46PM -0500, rsbecker@nexbridge.com wrote:
> >> diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index
> >> e0a701f2b3..6935c4574e 100644
> >> --- a/builtin/unpack-objects.c
> >> +++ b/builtin/unpack-objects.c
> >> @@ -680,7 +680,7 @@ int cmd_unpack_objects(int argc, const char
> >> **argv, const char *prefix UNUSED)
> >>
> >> /* Write the last part of the buffer to stdout */
> >> while (len) {
> >> - int ret = xwrite(1, buffer + offset, len);
> >> + int ret = write_in_full(1, buffer + offset, len);
> >> if (ret <= 0)
> >> break;
> >> len -= ret;
> [...]
> I experimented with using write_in_full vs. keeping xwrite. With xwrite in
> this loop, t7704.9 consistently fails as described in the other thread. With
> write_in_full, the code works correctly. I assume there are side-effects
> that are present. This change is critical to having the code work on
> NonStop. Otherwise git seems to be at risk of actually being seriously
> broken if unpack does not work correctly. I am happy to have my series
> ignored as long as the problem is otherwise corrected.
I'm somewhat skeptical that this code is to blame, as it should be run
very rarely at all; it is just dumping any content in the pack stream
after the end of the checksum to stdout. But in normal use by Git, there
is no such content in the first place.
If I do this:
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index e0a701f2b3..affe55035d 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -680,11 +680,7 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix UNUSED)
/* Write the last part of the buffer to stdout */
while (len) {
- int ret = xwrite(1, buffer + offset, len);
- if (ret <= 0)
- break;
- len -= ret;
- offset += ret;
+ BUG("cruft at the end of the pack!");
}
/* All done */
then t7704 still passes, as it does not run this code at all. In fact,
nothing in the test suite fails. Which is not to say we should get rid
of those code. If we were writing today we might flag it as an error,
but we should keep it for historical compatibility.
But I do not see any bug in the code, and nor do I think it could
contribute to a test failure.
-Peff
^ permalink raw reply related [flat|nested] 12+ messages in thread
* RE: [PATCH v2 3/3] builtin/unpack-objects.c: change xwrite to write_in_full avoid truncation.
2024-02-27 19:25 ` Jeff King
@ 2024-02-27 21:05 ` rsbecker
2024-03-07 10:00 ` Jeff King
0 siblings, 1 reply; 12+ messages in thread
From: rsbecker @ 2024-02-27 21:05 UTC (permalink / raw)
To: 'Jeff King'
Cc: 'Junio C Hamano', 'Randall S. Becker', git
On Tuesday, February 27, 2024 2:26 PM, Peff wrote:
>To: rsbecker@nexbridge.com
>Cc: 'Junio C Hamano' <gitster@pobox.com>; 'Randall S. Becker' <the.n.e.key@gmail.com>; git@vger.kernel.org
>Subject: Re: [PATCH v2 3/3] builtin/unpack-objects.c: change xwrite to write_in_full avoid truncation.
>
>On Tue, Feb 27, 2024 at 02:04:46PM -0500, rsbecker@nexbridge.com wrote:
>
>> >> diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
>> >> index e0a701f2b3..6935c4574e 100644
>> >> --- a/builtin/unpack-objects.c
>> >> +++ b/builtin/unpack-objects.c
>> >> @@ -680,7 +680,7 @@ int cmd_unpack_objects(int argc, const char
>> >> **argv, const char *prefix UNUSED)
>> >>
>> >> /* Write the last part of the buffer to stdout */
>> >> while (len) {
>> >> - int ret = xwrite(1, buffer + offset, len);
>> >> + int ret = write_in_full(1, buffer + offset, len);
>> >> if (ret <= 0)
>> >> break;
>> >> len -= ret;
>> [...]
>> I experimented with using write_in_full vs. keeping xwrite. With
>> xwrite in this loop, t7704.9 consistently fails as described in the
>> other thread. With write_in_full, the code works correctly. I assume
>> there are side-effects that are present. This change is critical to
>> having the code work on NonStop. Otherwise git seems to be at risk of
>> actually being seriously broken if unpack does not work correctly. I
>> am happy to have my series ignored as long as the problem is otherwise corrected.
>
>I'm somewhat skeptical that this code is to blame, as it should be run very rarely at all; it is just dumping any content in the pack stream
>after the end of the checksum to stdout. But in normal use by Git, there is no such content in the first place.
>
>If I do this:
>
>diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index e0a701f2b3..affe55035d 100644
>--- a/builtin/unpack-objects.c
>+++ b/builtin/unpack-objects.c
>@@ -680,11 +680,7 @@ int cmd_unpack_objects(int argc, const char **argv, const char *prefix UNUSED)
>
> /* Write the last part of the buffer to stdout */
> while (len) {
>- int ret = xwrite(1, buffer + offset, len);
>- if (ret <= 0)
>- break;
>- len -= ret;
>- offset += ret;
>+ BUG("cruft at the end of the pack!");
> }
>
> /* All done */
>
>then t7704 still passes, as it does not run this code at all. In fact, nothing in the test suite fails. Which is not to say we should get rid of
>those code. If we were writing today we might flag it as an error, but we should keep it for historical compatibility.
>
>But I do not see any bug in the code, and nor do I think it could contribute to a test failure.
I have obviously gone down the wrong path trying to resolve this situation. Please consider this entire series dropped with my apologies for the time-waste.
Unfortunately, I do not have sufficient knowledge of the code to resolve the originally reported problem without further assistance to determine the root case (assuming it still is a problem). Changes in master post-2.44.0 appear to have contributed to resolving the situation, so I am now getting random pass/fail on the test. I'm going to hold 2.44.0 on ia64 and wait for a subsequent release at retest at that time.
Sadly,
--Randall
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH v2 0/2] Change xwrite() to write_in_full() in builtins.
2024-02-27 15:09 [PATCH v2 0/2] Change xwrite() to write_in_full() in builtins Randall S. Becker
` (2 preceding siblings ...)
2024-02-27 15:09 ` [PATCH v2 3/3] builtin/unpack-objects.c: change xwrite to write_in_full avoid truncation Randall S. Becker
@ 2024-02-27 21:11 ` rsbecker
3 siblings, 0 replies; 12+ messages in thread
From: rsbecker @ 2024-02-27 21:11 UTC (permalink / raw)
To: git
Please withdraw this series.
>-----Original Message-----
>From: Randall S. Becker <the.n.e.key@gmail.com>
>Sent: Tuesday, February 27, 2024 10:10 AM
>To: git@vger.kernel.org
>Cc: Randall S. Becker <rsbecker@nexbridge.com>
>Subject: [PATCH v2 0/2] Change xwrite() to write_in_full() in builtins.
>
>From: "Randall S. Becker" <rsbecker@nexbridge.com>
>
>This series replaces xwrite to write_in_full in builtins/. The change is
required to fix critical problems that prevent full writes to be
>processed by on platforms where xwrite may be limited to a platform size
limit. Further changes outside of builtins/ may be required
>but do not appear to be as urgent as this change, which causes test
breakage in t7704. A separate series will be contributed for
>changes outside of builtins/ at a later date.
>
>The change in unpack-objects.c is necessary as len is being passed into
xwrite that exceeds the size supported by the limit in that
>method (56Kb on NonStop ia64).
>
>Randall S. Becker (3):
> builtin/repack.c: change xwrite to write_in_full and report errors.
> builtin/receive-pack.c: change xwrite to write_in_full.
> builtin/unpack-objects.c: change xwrite to write_in_full avoid
> truncation.
>
> builtin/receive-pack.c | 2 +-
> builtin/repack.c | 9 +++++++--
> builtin/unpack-objects.c | 2 +-
> 3 files changed, 9 insertions(+), 4 deletions(-)
>
>--
>2.42.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 3/3] builtin/unpack-objects.c: change xwrite to write_in_full avoid truncation.
2024-02-27 21:05 ` rsbecker
@ 2024-03-07 10:00 ` Jeff King
0 siblings, 0 replies; 12+ messages in thread
From: Jeff King @ 2024-03-07 10:00 UTC (permalink / raw)
To: rsbecker; +Cc: 'Junio C Hamano', 'Randall S. Becker', git
On Tue, Feb 27, 2024 at 04:05:53PM -0500, rsbecker@nexbridge.com wrote:
> Unfortunately, I do not have sufficient knowledge of the code to
> resolve the originally reported problem without further assistance to
> determine the root case (assuming it still is a problem). Changes in
> master post-2.44.0 appear to have contributed to resolving the
> situation, so I am now getting random pass/fail on the test. I'm going
> to hold 2.44.0 on ia64 and wait for a subsequent release at retest at
> that time.
If you're getting random pass/fail (which does seem like the kind of
thing that could be related to pipe write() sizes), you might try using
the "--stress" argument. That can give you more consistent results while
bisecting (e.g., if "--stress" runs successfully for a few minutes).
That said, given the failing test you mentioned, I kind of assume that
it was not a code change that caused the problem, but rather a new test
exercising new code that happens to tickle your race.
-Peff
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2024-03-07 10:00 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-27 15:09 [PATCH v2 0/2] Change xwrite() to write_in_full() in builtins Randall S. Becker
2024-02-27 15:09 ` [PATCH v2 1/3] builtin/repack.c: change xwrite to write_in_full and report errors Randall S. Becker
2024-02-27 18:49 ` Junio C Hamano
2024-02-27 15:09 ` [PATCH v2 2/3] builtin/receive-pack.c: change xwrite to write_in_full Randall S. Becker
2024-02-27 19:00 ` Junio C Hamano
2024-02-27 15:09 ` [PATCH v2 3/3] builtin/unpack-objects.c: change xwrite to write_in_full avoid truncation Randall S. Becker
2024-02-27 18:58 ` Junio C Hamano
2024-02-27 19:04 ` rsbecker
2024-02-27 19:25 ` Jeff King
2024-02-27 21:05 ` rsbecker
2024-03-07 10:00 ` Jeff King
2024-02-27 21:11 ` [PATCH v2 0/2] Change xwrite() to write_in_full() in builtins rsbecker
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 NNTP newsgroup(s).