From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49496: 28.0.50; process-tests/fd-setsize-no-crash/make-network-process hangs on Cygwin Date: Fri, 09 Jul 2021 21:18:43 +0300 Message-ID: <83bl7bcpvg.fsf@gnu.org> References: <8dec2b34-f041-35e8-1971-da2596a8b760@cornell.edu> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11605"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49496@debbugs.gnu.org To: Ken Brown Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 09 20:20:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1v6j-0002oE-OK for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Jul 2021 20:20:13 +0200 Original-Received: from localhost ([::1]:53828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1v6i-0004Qz-8G for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Jul 2021 14:20:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1v6Y-0004Qr-Pu for bug-gnu-emacs@gnu.org; Fri, 09 Jul 2021 14:20:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1v6Y-0003sR-I4 for bug-gnu-emacs@gnu.org; Fri, 09 Jul 2021 14:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m1v6Y-0007Yv-Eh for bug-gnu-emacs@gnu.org; Fri, 09 Jul 2021 14:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Jul 2021 18:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49496 X-GNU-PR-Package: emacs Original-Received: via spool by 49496-submit@debbugs.gnu.org id=B49496.162585474428975 (code B ref 49496); Fri, 09 Jul 2021 18:20:02 +0000 Original-Received: (at 49496) by debbugs.gnu.org; 9 Jul 2021 18:19:04 +0000 Original-Received: from localhost ([127.0.0.1]:59668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1v5b-0007XH-Sj for submit@debbugs.gnu.org; Fri, 09 Jul 2021 14:19:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1v5a-0007Wo-MU for 49496@debbugs.gnu.org; Fri, 09 Jul 2021 14:19:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60064) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1v5T-0003Qp-TT; Fri, 09 Jul 2021 14:18:55 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3917 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1v5T-0007rK-Hh; Fri, 09 Jul 2021 14:18:55 -0400 In-Reply-To: <8dec2b34-f041-35e8-1971-da2596a8b760@cornell.edu> (message from Ken Brown on Fri, 9 Jul 2021 14:01:33 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209732 Archived-At: > From: Ken Brown > Date: Fri, 9 Jul 2021 14:01:33 -0400 > > It is possible to work around this problem by disabling the credential exchange > as in the following patch: > > diff --git a/src/process.c b/src/process.c > index b8c3e4ecfb..01548c8ab5 100644 > --- a/src/process.c > +++ b/src/process.c > @@ -3355,6 +3355,12 @@ connect_network_socket (Lisp_Object proc, Lisp_Object > addrinfos, > xerrno = EMFILE; > continue; > } > +#ifdef CYGWIN > + /* Avoid possible hang in connect/accept. */ > + if (family == AF_LOCAL && p->socktype == SOCK_STREAM > + && setsockopt (s, SOL_SOCKET, SO_PEERCRED, 0, 0) < 0) > + report_file_error ("Cannot disable credential exchange", Qnil); > +#endif > } > if (p->is_non_blocking_client && ! (SOCK_NONBLOCK && socket_to_use < 0)) > > But this seems too drastic just to fix a potential problem that doesn't seem to > occur in practice, but only in the contrived situation of > process-tests/fd-setsize-no-crash/make-network-process. So my preference is to > simply skip that test on Cygwin. > > OK? Yes, OK. But please explain there in a comment why we skip that, with a reference to this bug. (FWIW, I consider the process-tests suite to be not useful enough, in that it many times tests behavior that is only guaranteed to happen on GNU/Linux, and is not really required, nor should be expected, in portable Lisp programs. So it doesn't surprise me that some of the tests fail on some systems.)