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

Re: 2.54.0-rc1 NO_WRITEV=Nope does not work

From
Jeff King <peff@peff.net>
Date
Apr 9, 2026, 21:10 UTC
Message-ID
<20260409211049.GA3119065@coredump.intra.peff.net>
In-Reply-To
<028901dcc859$d2419470$76c4bd50$@nexbridge.com>
On Thu, Apr 09, 2026 at 03:48:16PM -0400, rsbecker@nexbridge.com wrote:
Show 11 quoted lines
> With a completely clean build, we are getting writev() being used anyway on
> NonStop:
> 
> /usr/coreutils/bin/make NO_TCLTK=NoThanks NO_WRITEV=Nope V=1
> prefix=/usr/local-ssl3.5 CFLAGS=-g -O2 -D_LARGEFILE64_SOURCE=1
> -D_FILE_OFFSET_BITS=64 -Winline -I/usr/local-ssl3.5/include
> -I/usr/coreutils/include -I/usr/tandem/xml/T0625L01_AAE/include
> LDFLAGS=-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64
> /usr/coreutils/lib/libz.a -L/usr/local-ssl3.5/lib -L/usr/coreutils/lib
> -L/usr/tandem/xml/T0625L01_AAE/lib SHELL=/usr/coreutils/bin/bash
> GIT_VERSION=2.54.0.rc1

Hmm, the plot thickens. I think our fallback wrapper is being overly picky. It does:

           for (int i = 0; i < iovcnt; i++) {
                  if (iov[i].iov_len > maximum_signed_value_of_type(ssize_t) ||
                      iov[i].iov_len + sum > maximum_signed_value_of_type(ssize_t)) {
                          errno = EINVAL;
                          return -1;
                  }
  
                  sum += iov[i].iov_len;
          }

so you are probably hitting that EINVAL! Which is trying to emulate how a system writev() would work, but the fundamental problem is that it _doesn't_ work on your system, because ssize_t is too small for how we're using writev(), which assumes we can pass in 64k at a time.

It is tempting to just delete the EINVAL check shown above, but then the rest of the fallback function needs to be more clever, and return a partial write before incrementing total_written over the ssize_t limit (otherwise we have no way to report to the caller how much was actually written).

Yuck. I think for 2.54 we either have to truly implement MAX_IO_SIZE support, or we have to revert the use of writev() in send_sideband() until we do.

-Peff
Previous: rsbecker@nexbridge.comNext: Junio C Hamano
Message 2 of 6 in “2.54.0-rc1 NO_WRITEV=Nope does not work”
  1. rsbecker@nexbridge.comApr 9, 2026
  2. Jeff KingApr 9, 2026
  3. Re* 2.54.0-rc1 NO_WRITEV=Nope does not workJunio C Hamano, Apr 9, 2026
  4. Jeff KingApr 9, 2026
  5. Junio C HamanoApr 9, 2026
  6. Patrick SteinhardtApr 10, 2026

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.