From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#26038: 26.0.50; Crash on OS X Date: Fri, 10 Mar 2017 14:44:06 +0000 Message-ID: <20170310144406.GA76673@breton.holly.idiocy.org> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="fdj2RfSjLxBAspz7" Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1489157117 25108 195.159.176.226 (10 Mar 2017 14:45:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 10 Mar 2017 14:45:17 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: 26038@debbugs.gnu.org To: Ivan Andrus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 10 15:45:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1cmLn4-0005e1-OI for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Mar 2017 15:45:11 +0100 Original-Received: from localhost ([::1]:39445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmLn9-0005sY-8f for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Mar 2017 09:45:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmLn1-0005qP-Q0 for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2017 09:45:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmLmw-0003kM-Os for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2017 09:45:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50447) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cmLmw-0003kG-JG for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2017 09:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cmLmw-0000Ml-8z for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2017 09:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Mar 2017 14:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26038 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26038-submit@debbugs.gnu.org id=B26038.14891570591327 (code B ref 26038); Fri, 10 Mar 2017 14:45:02 +0000 Original-Received: (at 26038) by debbugs.gnu.org; 10 Mar 2017 14:44:19 +0000 Original-Received: from localhost ([127.0.0.1]:48646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmLmE-0000LK-TV for submit@debbugs.gnu.org; Fri, 10 Mar 2017 09:44:19 -0500 Original-Received: from mail-wr0-f174.google.com ([209.85.128.174]:34518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmLmB-0000L1-Gt for 26038@debbugs.gnu.org; Fri, 10 Mar 2017 09:44:16 -0500 Original-Received: by mail-wr0-f174.google.com with SMTP id l37so66299968wrc.1 for <26038@debbugs.gnu.org>; Fri, 10 Mar 2017 06:44:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Yieb3bXT2NUjiyFt1MbHErubckkQPhD/jFjsc+42as8=; b=sapBTvktnANxZrUZNdzSR7VAoLdA/0viHJM+Pr5dMbqKe5bHeKhHrilCmz68TjBn1x pIrXeZ7v9W2lA/F+gg2CrF+cErerd47feyKJnU/ocLpOr3Ctox2HVxskRf/61bCHBoH8 lLcUAzsh/75Dj2AHvtYXpuZVmN/NzLY2cjiIJ3eV8Z7avnk53YXU+pA2ZT61wQTBBh2W IYwGma/4j1ztZ82b2XjuYGG24YBojYesD3DkXL0zb3gWvh8/z55gM4rcoLsGUPFclFxG /McGAJmPT6wjMYwrJ1kvfFgH9JeCHB1wSzZnFmh+xxQEYaROBZaiY8e27n/5tNKL5iQA ftYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Yieb3bXT2NUjiyFt1MbHErubckkQPhD/jFjsc+42as8=; b=BCwI+f5+h7UUVVqAXikcGV3tdcriXHQ67bZCSYVBhMbMmFEABlhzvedWvJHO1mjGGk +MdqTfRPeaW7rNQcKIASy+gMu9jO6ZKazW8d4jJOko8W5/WGanYNboSJbOz/i2wePiU/ McX3GB86yRwRnufDtDrDZLiFV2Ucq2r9wcGQcj1gFi18HoIpnHRGp/RArfeeNjmuU7KD WEmhhBQX8nTddRdNmm6pCQDJzBxw4lyAz3sEDU7bz2iCKz3nRPl7KOkx/RArePJ9fRI3 CrPwogF9yZzvVLZOEUJhY1Q3IHIte+tsfyYpocLE9GvwRxpaykp9g/HXD8y7MTVOFmoK ZXhw== X-Gm-Message-State: AMke39n81x1FC427YxQrmevUDyt8jDc4vRZh8QAT+19ChBmIH/WMOtDjvi9TN8NYm+1lCg== X-Received: by 10.223.172.137 with SMTP id o9mr17401637wrc.66.1489157049599; Fri, 10 Mar 2017 06:44:09 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-a458-8f8c-9e16-1775.holly.idiocy.org. [2001:8b0:3f8:8129:a458:8f8c:9e16:1775]) by smtp.gmail.com with ESMTPSA id x23sm13212552wrb.49.2017.03.10.06.44.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Mar 2017 06:44:08 -0800 (PST) Content-Disposition: inline In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130436 Archived-At: --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, Mar 09, 2017 at 10:42:17AM -0700, Ivan Andrus wrote: > I switched out of Emacs to check my email and when I came back it had > crashed. I had been byte-compiling some files and doing random work > before that, but everything seemed to work okay. I just built from source > yesterday so my uptime wasn't very high. I think this is because of the changes to event handling that I’ve made recently to solve the concurrency issues. Unfortunately I don’t know how we could go about debugging it properly since the crash happens deep inside Cocoa libraries. I’ve attached a patch which I hope might prevent the crash, though. Can you give it a go and see if the crash repeats, please? The alternative is to revert commits a65236214d and 3bd2e9e975, which should take you back to the previous code. > I build with a few patches, though only elisp changes with the > exception of the patch from bug 16579 which should only affect > proced which I haven't at all in this instance. According to https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16579 that patch was committed to master some time ago. Thanks for the report. -- Alan Third --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Description: Disable SIGIO Content-Disposition: attachment; filename="0001-Disable-SIGIO-processing-on-NS-port.patch" >From 6b4787023b247b68ae0598d03dce50a6fce44ab1 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Fri, 10 Mar 2017 14:21:14 +0000 Subject: [PATCH] Disable SIGIO processing on NS port * src/conf_post.h: undef USABLE_SIGIO and INTERRUPT_INPUT. * src/nsterm.m (hold_event, ns_select): Remove unneeded calls to raise SIGIO. --- src/conf_post.h | 6 ++++++ src/nsterm.m | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/conf_post.h b/src/conf_post.h index e146b9bbe8..3b6b9aff8d 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -355,3 +355,9 @@ extern int emacs_setenv_TZ (char const *); #else # define UNINIT /* empty */ #endif + +/* The NS port doesn't use SIGIO for input. */ +#ifdef HAVE_NS +# undef USABLE_SIGIO +# undef INTERRUPT_INPUT +#endif diff --git a/src/nsterm.m b/src/nsterm.m index f985786e19..d61d357811 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -454,8 +454,6 @@ - (NSColor *)colorUsingDefaultColorSpace } hold_event_q.q[hold_event_q.nr++] = *event; - /* Make sure ns_read_socket is called, i.e. we have input. */ - raise (SIGIO); send_appdefined = YES; } @@ -4120,7 +4118,6 @@ in certain situations (rapid incoming events). if (hold_event_q.nr > 0) { /* We already have events pending. */ - raise (SIGIO); errno = EINTR; return -1; } -- 2.12.0 --fdj2RfSjLxBAspz7--