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

Re: git failure on HP-UX

From
Junio C Hamano <gitster@pobox.com>
Date
May 5, 2011, 19:06 UTC
Message-ID
<7vfwot6k7a.fsf@alter.siamese.dyndns.org>
In-Reply-To
<88C5107F36BD7E4BBFDFDB140E3D81077FA78CF12C@GVW1362EXC.americas.hpqcorp.net>
"Kibler, Bill" <bill.kibler@hp.com> writes:
Show 10 quoted lines
> In looking at the code, "sideband.h" defines "LARGE_PACKET_MAX 65520"
> and is related to the passed flag "side-band-64k" as discussed in git
> document pack-protocol.txt. The current default usage seems to be 64K
> transfers, yet if we check the "include/limits.h" of HP-UX we see a
> "PIPE_BUF" set to 8192. Along with the tusc indication of 8K pipe size,
> I suspect that HP-UX is coring due to git trying to use a 64K pipe when
> 8K is max.
>
> I solved the probem for now, by changing the file sideband.h to use
> "LARGE_PACKET_MAX 8208".

This does not make any sense. We may make write(2) and read(2) system calls with 64k (or maybe bit more) chunk, but that does not mean the implementation of these system calls must take that as a whole. Your write(2) is allowed to write only whatever fits your pipe buffer, and tell the caller "I wrote only 8192 bytes", and the code is supposed to loop, advancing the write pointer by 8k and calling write(2) again, until you write everything to whoever is reading the other end of the pipe. The same thing for the read(2).

If you can find a place where we make write(2)/read(2) and blindly assumes that a non-negative return means everything was written/read successfully, then you have found a bug.

If the symptom _were_ a deadlock where the writer of one pipe expected to be able to send 64k to the other end of the pipe and then hear back from the other side with a separate read, I would understand that could happen (actually we know a local pipe transfer without ssh has that kind of potential deadlock but I think the size we assume that can fit in the pipe buffer is far smaller than 8k). But I do not understand where a SIGBUS can come from.

Previous: Kibler, BillNext: Kibler, Bill
Message 2 of 6 in “git failure on HP-UX”
  1. Kibler, BillMay 5, 2011
  2. Junio C HamanoMay 5, 2011
  3. Kibler, BillMay 5, 2011
  4. Kibler, BillMay 6, 2011
  5. Junio C HamanoMay 6, 2011
  6. Kibler, BillMay 6, 2011

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.