git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug/Solution] Git hangs in compat/poll/poll.c on HPE NonStop
@ 2017-09-28 21:01 Randall S. Becker
  2017-09-28 22:47 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Randall S. Becker @ 2017-09-28 21:01 UTC (permalink / raw)
  To: git

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-29  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-28 21:01 [Bug/Solution] Git hangs in compat/poll/poll.c on HPE NonStop Randall S. Becker
2017-09-28 22:47 ` Junio C Hamano
2017-09-29  8:41   ` Paolo Bonzini

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).