From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: wait_reading_process_ouput hangs in certain cases (w/ patches) Date: Tue, 13 Mar 2018 13:35:23 +0100 Message-ID: <87r2oow3uc.fsf@gmail.com> References: <206ebefa-7583-f049-140c-c8fd041b0719@cs.ucla.edu> <709614e8-1937-07c1-f554-b453ed4f3d4a@binary-island.eu> <7550438b-9fd4-d374-e571-8bb16456cad5@cs.ucla.edu> <797d0e16-1bae-50c2-35f8-05489ffce935@binary-island.eu> <83tvugdiu5.fsf@gnu.org> <877er5s0xv.fsf@gmail.com> <4e4c72bb-295d-81e1-e4ed-cad256bca83c@binary-island.eu> <87zi3v9461.fsf@gmail.com> <87k1uy8x68.fsf@gmail.com> <6d1970af-8c5c-20ba-be09-0b9aa757d663@binary-island.eu> <13b3e003-d12b-33a7-3ebe-c07b017a7cc0@binary-island.eu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1520944493 3492 195.159.176.226 (13 Mar 2018 12:34:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Mar 2018 12:34:53 +0000 (UTC) Cc: eggert@cs.ucla.edu, Lars Ingebrigtsen , =?utf-8?Q?andr=C3=A9s_ram=C3=ADrez?= , Eli Zaretskii , emacs-devel@gnu.org To: Matthias Dahl Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 13 13:34:48 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1evj8b-0000dS-2A for ged-emacs-devel@m.gmane.org; Tue, 13 Mar 2018 13:34:46 +0100 Original-Received: from localhost ([::1]:39634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evjAc-0000oT-8e for ged-emacs-devel@m.gmane.org; Tue, 13 Mar 2018 08:36:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evj9O-0000mo-1q for emacs-devel@gnu.org; Tue, 13 Mar 2018 08:35:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evj9K-0006ha-VC for emacs-devel@gnu.org; Tue, 13 Mar 2018 08:35:30 -0400 Original-Received: from mail-wr0-x235.google.com ([2a00:1450:400c:c0c::235]:41827) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1evj9K-0006eZ-P6; Tue, 13 Mar 2018 08:35:26 -0400 Original-Received: by mail-wr0-x235.google.com with SMTP id f14so22191896wre.8; Tue, 13 Mar 2018 05:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-followup-to:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=epbbBvU1ihOwL33l54aWT3U4LmOH/C9G8Qaj5BgnM2s=; b=Mfl7w4nInc5Cqop3S2osRIgHGpjoNn0oTYAcqX7Rrpsnszz0T56VC3FWoXP6E9AGsg t8p2qfUnucHIvz79FLLy+TKsI8ztiWRKJMug12YpZWCcRCdJqYYUq8bhRo5q0hUIm43R qfDc4xXa7wqI/utX44eqXhGdCvLHuB1D7/Mq1qvSFeVPQogkSyBFxDRDBboXO39DIWq4 QbDMeKnChGrAumMj6x/elz45vzsz50fDcl14hEjPSAl/bakYEnkwHgIs2wfsMLH31lSo q9rLafISG+6vSMmUFubaZeXF5v0l8vKzSZbCy7rHj7GNA8399bsu3FgPIV4DJmHjccNw b9jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-followup-to :mail-copies-to:gmane-reply-to-list:date:in-reply-to:message-id :mime-version; bh=epbbBvU1ihOwL33l54aWT3U4LmOH/C9G8Qaj5BgnM2s=; b=koLVYkcBOskvUcMEDtjn8VSG8L1RbCcbhW2E35Pr5JxhNUuonIaECXCQD1m4CTafdP Gj5A+wLMHAOj77ulC4Ex86fiIxSkXfNVBWNta2lrwfC+jN/f1hA/pBRVj+lILGp0UuHt Q3cj/27ZC0cUvu/oDbntwQeBpgN9H3bmG1Ysogja50vZLM9m9pN7obLAT85LdSFY5/U/ hEZttqAW1eJvOh5jEd/+seaXb4RiE15ZPTR+i0Z0zDg88GBM9xt0aI5KYErIt0j7+rhu JWlrg0zph81NcFt1qfkYuXd30lOXxc/FsieSVrF6Azr+WDpdtRHJFFjD1HbyU9Qmcf6p YhIg== X-Gm-Message-State: AElRT7F1fu7A7SsBQV2AbQvpU5RTOG5rqobd1vlwAre7a5CVLH8isRRJ 5uCFFPr+prTjnx0A3/zRjoA= X-Google-Smtp-Source: AG47ELvoZ2uHrHH4rBuc4so8rNkf2CiSDW0sjIKiSYiz+3+72TDj6PKpCOeTN0r5Mg1iDx81GGNBpw== X-Received: by 10.28.206.77 with SMTP id e74mr668638wmg.41.1520944525293; Tue, 13 Mar 2018 05:35:25 -0700 (PDT) Original-Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id p21sm65504wmc.43.2018.03.13.05.35.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Mar 2018 05:35:24 -0700 (PDT) Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <13b3e003-d12b-33a7-3ebe-c07b017a7cc0@binary-island.eu> (Matthias Dahl's message of "Tue, 13 Mar 2018 10:54:00 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:223685 Archived-At: Matthias Dahl writes: > - if (set) > - Available = tls_available; > + for (channel = 0; channel < FD_SETSIZE; ++channel) > + if (! NILP (chan_process[channel])) > + { > + struct Lisp_Process *p = > + XPROCESS (chan_process[channel]); > + > + if (just_wait_proc && p != wait_proc) > + continue; > + > + if (p && p->gnutls_p && p->gnutls_state > + && ((emacs_gnutls_record_check_pending > + (p->gnutls_state)) > + > 0)) > + { > + nfds++; > + eassert (p->infd == channel); > + FD_SET (p->infd, &Available); > + } > + } > } > #endif > } Hi Matthias, I apologize if this has already been mentioned, but did you check that this doesn't undo the fix for Bug#21337? The issue there as I recall was that FD's were set in Available that didn't actually have data to read, hence the need to check the TLS FD's separately using tls_available. Regards Robert