From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#29170: Infinite loop noticed on Emacs in OpenBSD Date: Mon, 24 Aug 2020 07:45:11 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35128"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 29170@debbugs.gnu.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 24 13:46:11 2020 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 1kAAvT-00092K-4W for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Aug 2020 13:46:11 +0200 Original-Received: from localhost ([::1]:55252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAAvS-0000yu-6P for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Aug 2020 07:46:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAAvK-0000w4-A5 for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2020 07:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAAvK-0003He-0Y for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2020 07:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kAAvJ-0002lM-UP for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2020 07:46:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87fu9rwksm.fsf@omecha.info> Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Aug 2020 11:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29170 X-GNU-PR-Package: emacs Original-Received: via spool by 29170-submit@debbugs.gnu.org id=B29170.159826951810571 (code B ref 29170); Mon, 24 Aug 2020 11:46:01 +0000 Original-Received: (at 29170) by debbugs.gnu.org; 24 Aug 2020 11:45:18 +0000 Original-Received: from localhost ([127.0.0.1]:56349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAAuc-0002kR-9k for submit@debbugs.gnu.org; Mon, 24 Aug 2020 07:45:18 -0400 Original-Received: from mail-yb1-f196.google.com ([209.85.219.196]:40504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAAua-0002kD-N3 for 29170@debbugs.gnu.org; Mon, 24 Aug 2020 07:45:17 -0400 Original-Received: by mail-yb1-f196.google.com with SMTP id q3so4989234ybp.7 for <29170@debbugs.gnu.org>; Mon, 24 Aug 2020 04:45:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:mime-version:date:message-id :subject:to:cc; bh=TUtBInpgd3Pf6/BTuANOvPybwRhQapYWfylc8CK98WQ=; b=MHtjCyiGCcC3uPZ1gOwt15asHFI/2JkCrkY138mxLZhlaqle8CR/RmPrIAQkmFYXYi nDHIbTSw2O0bhUh3YQYk1VdyNop5AzLUfsFGRDNo+MgyJwC389JLx9+scDBNTJAgp2kA +q8pxMXtinSxDo3svstX2I7DAY+fpNRun5IE09vIuMOF8+8sa/z14rUGb32DIX3hPX2s 63JH+8k5z9/ls/4z+7Vi49EjZtBtr0LbaE9ZvF+8YVmJ/ElHc6VH3mfkpLn7pjzF4nIY xLpXdxLbUu3siZQSPmpLOLQaSfb5Md2lJ/hMSlWKeJDwVdXorQz/HO4tgVXwgkPJkW3D 1swA== X-Gm-Message-State: AOAM5339iJBHex/O72017UOpAh6DacFeiOx2oUopszkC93FflsP5rxdt z9kZqJWBgSx+w+EUArUuQFs1rBwttlZr2hTZaa1tE2u6le65Dw== X-Google-Smtp-Source: ABdhPJxW8xwaWpmtMt5zRUoM+SQ4TQuYdyIQSXp/zlUXQP2Fwob9zUSpMuAs2IqMYyWlzVqnqFQ4kzx9FkqjUtXgeZM= X-Received: by 2002:a25:7007:: with SMTP id l7mr6687486ybc.85.1598269511311; Mon, 24 Aug 2020 04:45:11 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 24 Aug 2020 07:45:11 -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:186124 Archived-At: [Accidentally sent off-list, forwarding message to bug tracker.] -------------------- Start of forwarded message -------------------- From: Stefan Kangas To: Manuel Giraud Subject: Re: bug#29170: Infinite loop noticed on Emacs in OpenBSD Date: Mon, 10 Aug 2020 09:25:29 -0700 Manuel Giraud writes: > Hi, > > Here is a patch against HEAD to avoid the hang in infinite loop. The > 'x-selection-timeout' pause will still be there even with this patch. > > My understandings: > > On OpenBSD, most of the time, the function > "xselect.c/x_get_foreign_selection" won't get a SelectNotify with > (SECONDARY, TEXT) as arguments (that I did not understand and it might > never happen on other oses). > > But then, while waiting at most 'x-selection-timeout' into > "process.c/wait_reading_process_output" the 'now' variable won't have a > chance of being invalidated or updated and that is what cause the > infinite loop. > > Someone more knowledgeable of "process.c/wait_reading_process_output" > might have a better solution to this problem. > > diff --git a/src/process.c b/src/process.c > index fc46e74332..25bd28a82b 100644 > --- a/src/process.c > +++ b/src/process.c > @@ -5115,8 +5115,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, > /* Exit if already run out. */ > if (wait == TIMEOUT) > { > - if (!timespec_valid_p (now)) > - now = current_timespec (); > + now = current_timespec (); > if (timespec_cmp (end_time, now) <= 0) > break; > timeout = timespec_sub (end_time, now); That was almost 3 years ago. Is this still an issue on recent versions of Emacs? Best regards, Stefan Kangas -------------------- End of forwarded message --------------------