git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: [Bug] Test 1450.91 Fails on NonStop

From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
Date
Feb 15, 2023, 18:49 UTC
Message-ID
<000801d9416e$4bf844b0$e3e8ce10$@nexbridge.com>
In-Reply-To
<Y+0eIlsIxRr+1RYp@coredump.intra.peff.net>
On Wednesday, February 15, 2023 1:02 PM, Jeff King wrote:
Show 40 quoted lines
>On Wed, Feb 15, 2023 at 12:44:59PM -0500, rsbecker@nexbridge.com wrote:
>
>> + + git hash-object -w --stdin
>> + test-tool genzeros 104857601
>> blob=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
>
>That's not right. e69de29bb is the empty blob. A hundred megabytes (plus
>one) of zeroes should be d748d1b68b9dc69c4717ebc070dbc547d129bcc6.
>
>So that is the root of your problem (the empty file will obviously not trigger the "too
>large" fsck check), but I don't know why it would be failing.
>
>Maybe check the output of "test-tool genzeros 104857601" to make sure that it as
>expected? If not, then the bug is somewhere in t/helper/test-genzeros.c.
>
>It's on the left-hand side of pipe. Maybe it is getting a write() error, but we are
>ignoring it? Maybe a patch like this would help diagnose:
>
>diff --git a/t/helper/test-genzeros.c b/t/helper/test-genzeros.c index
>8ca988d621..0574917005 100644
>--- a/t/helper/test-genzeros.c
>+++ b/t/helper/test-genzeros.c
>@@ -18,14 +18,14 @@ 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)
>-			return -1;
>+			die_errno("write()");
>
> 	while (count > 0) {
> 		n = write(1, zeros, count < ARRAY_SIZE(zeros) ?
> 			  count : ARRAY_SIZE(zeros));
>
> 		if (n < 0)
>-			return -1;
>+			die_errno("write()");
>
> 		count -= n;
> 	}
>
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.
Previous: Jeff KingNext: Junio C Hamano
Message 4 of 12 in “[Bug] Test 1450.91 Fails on NonStop”
  1. rsbecker@nexbridge.comFeb 15, 2023
  2. rsbecker@nexbridge.comFeb 15, 2023
  3. Jeff KingFeb 15, 2023
  4. rsbecker@nexbridge.comFeb 15, 2023
  5. Junio C HamanoFeb 15, 2023
  6. rsbecker@nexbridge.comFeb 15, 2023
  7. Jeff KingFeb 15, 2023
  8. Junio C HamanoFeb 16, 2023
  9. test-genzeros: avoid raw write(2)Junio C Hamano, Feb 16, 2023
  10. Jeff KingFeb 16, 2023
  11. Junio C HamanoFeb 16, 2023
  12. rsbecker@nexbridge.comFeb 16, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.