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

[Bug/Solution] Git hangs in compat/poll/poll.c on HPE NonStop

From
Randall S. Becker <rsbecker@nexbridge.com>
Date
Sep 28, 2017, 21:01 UTC
Message-ID
<009c01d3389c$f6c0cb00$e4426100$@nexbridge.com>
Hi Team,

After a whole lot of investigating, we (it is a large "we") have discovered the reason for the hang we occasionally get in git-upload-pack on HPE NonStop servers - reported here well over a year ago. This resulted from a subtle check that the operating system does on file descriptors. When it sees random values in pfd[i].revents, it sometimes thinks its dealing with a TTY and well, things end badly after that. There is a non-destructive fix that I would like to propose for this that I have already tested. Sadly, I have no email mechanism where our repo resides for a real patch message. The patch is based on 2.3.7 (16018ae), but should be applicable forward. We have held off moving to a more recent version until resolving this, so that's next on our plan.

--- a/compat/poll/poll.c
+++ b/compat/poll/poll.c
@@ -438,6 +438,10 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout)
            pfd[i].revents = happened;
            rc++;
          }
+        else
+          {
+            pfd[i].revents = 0;
+          }
       }

   return rc;

Sincerely,
Randall

-- Brief whoami: NonStop&UNIX developer since approximately
UNIX(421664400)/NonStop(211288444200000000) 
-- In my real life, I talk too much.
Next: Junio C Hamano
Message 1 of 3 in “[Bug/Solution] Git hangs in compat/poll/poll.c on HPE NonStop”
  1. Randall S. BeckerSep 28, 2017
  2. Junio C HamanoSep 28, 2017
  3. Paolo BonziniSep 29, 2017

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.