From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Gr=C3=A9goire?= Jadi Newsgroups: gmane.emacs.bugs Subject: bug#29170: 26.0.90; Emacs freezes when capturing an org-template Date: Sun, 08 Aug 2021 16:33:48 +0200 Message-ID: <87h7g0m2er.fsf@puffy.omecha.info> References: <87fu9rwksm.fsf@omecha.info> <87lfgpxl4m.fsf@gnus.org> <83sgaxf6eb.fsf@gnu.org> <87blhkwvhm.fsf@gnus.org> <83sgawekcj.fsf@gnu.org> <87zh54fr72.fsf@omecha.info> <87wo07tcz2.fsf@gnus.org> <87tuv4mm0v.fsf@omecha.info> <87v9fh3lck.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10776"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (berkeley-unix) Cc: 29170@debbugs.gnu.org, jca@wxcvbn.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 09 00:02:12 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 1mCqs0-0002bJ-3V for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Aug 2021 00:02:12 +0200 Original-Received: from localhost ([::1]:42826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCqrx-0002QJ-RV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Aug 2021 18:02:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCqrq-0002Q3-PM for bug-gnu-emacs@gnu.org; Sun, 08 Aug 2021 18:02:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43364) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCqrq-00036T-HT for bug-gnu-emacs@gnu.org; Sun, 08 Aug 2021 18:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mCqrq-00079H-AT for bug-gnu-emacs@gnu.org; Sun, 08 Aug 2021 18:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Gr=C3=A9goire?= Jadi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Aug 2021 22:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 29170-submit@debbugs.gnu.org id=B29170.162846011227455 (code B ref 29170); Sun, 08 Aug 2021 22:02:02 +0000 Original-Received: (at 29170) by debbugs.gnu.org; 8 Aug 2021 22:01:52 +0000 Original-Received: from localhost ([127.0.0.1]:54908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCqra-00078e-Uw for submit@debbugs.gnu.org; Sun, 08 Aug 2021 18:01:52 -0400 Original-Received: from loire.omecha.info ([89.234.177.139]:1410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCjsE-00055Y-0H for 29170@debbugs.gnu.org; Sun, 08 Aug 2021 10:34:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omecha.info; s=20210119; t=1628433229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6/2YQld1RrYaM4F0kFwjLMjOf/PS/WU68j0B6uleUaI=; b=NZcuv+VBAC/SOikqChtXzctDUwRJb7+Mlj3dX/PfIggYhc36JkmNdzwqhsfdwHrqq3rg7w 6dlhWqH8xjP5e7O5irIsnVIqj9slBnzrcP1Vna+TZpZFfjFdEujSqUjz/9cXYN8hpAv4ye n4j/un5w68C+5oxaP3uMOIUUJ2DaxKs= Original-Received: from puffy.omecha.info (puffy.omecha.info [10.0.0.2]) by loire.omecha.info (OpenSMTPD) with ESMTPSA id 97f02529 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Sun, 8 Aug 2021 16:33:49 +0200 (CEST) In-Reply-To: <87v9fh3lck.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 10 Oct 2020 21:57:31 +0200") X-Mailman-Approved-At: Sun, 08 Aug 2021 18:01:46 -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:211413 Archived-At: Lars Ingebrigtsen writes: Hi, We (jca@ in Cc is the OpenBSD's maintainer of emacs) finally found a solution to this bug. The issue is in the broken SIGIO management. This option was enabled on OpenBSD in 2011 as a workaround but it is not required anymore. We have disabled emacs_broken_SIGIO in OpenBSD's ports tree and received lots of positive feedbacks (no more hang, some operations are faster). So we think it is safe to backport this change upstream. diff --git a/configure.ac b/configure.ac index c924634d5b..740f6d79a1 100644 --- a/configure.ac +++ b/configure.ac @@ -4884,7 +4884,7 @@ AC_DEFUN case $opsys in dnl SIGIO exists, but the feature doesn't work in the way Emacs needs. - hpux* | nacl | openbsd | solaris | unixware ) + hpux* | nacl | solaris | unixware ) emacs_broken_SIGIO=yes ;; Please note that the real issue is not fixed. The issue is in the broken SIGIO code itself. I was able to reproduce the bug by enabling emacs_broken_SIGIO on Ubuntu LTS 20.04. I didn't take the time to find a fix though. Best, > writes: > >> So, I tested it on emacs-27.1 with junk disabled and it still freezes. >> >> $ MALLOC_OPTIONS=jj emacs -q >> >> (let ((value 'SECONDARY) >> (x-selection-timeout 2000)) >> ;;; from org-get-x-clipboard in lisp/org-compat.el >> (gui-get-selection value 'UTF8_STRING) >> (gui-get-selection value 'COMPOUND_TEXT) >> (gui-get-selection value 'STRING) >> (gui-get-selection value 'TEXT)) > > Thanks for checking. So it sounds like we do need something like the > proposed patch (with #ifdef OpenBSD) here, but apparently the patch led > to other problems. > >> I've tested your patch on emacs-25-3.1 and it does prevent the infinite >> loop. However, if the user sends input to emacs while it is waiting, it >> raises the following backtrace : >> >> Debugger entered--Lisp error: (error "Timed out waiting for reply from >> selection owner") >> x-get-selection-internal(SECONDARY STRING nil nil) > > So further work is needed here. -- gjadi PGP : AF26 E9C2 A1C8 8D32 A868 4386 1373 5477 2B65 1894