unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Ivan Andrus <darthandrus@gmail.com>
Cc: 26038@debbugs.gnu.org
Subject: bug#26038: 26.0.50; Crash on OS X
Date: Fri, 10 Mar 2017 14:44:06 +0000	[thread overview]
Message-ID: <20170310144406.GA76673@breton.holly.idiocy.org> (raw)
In-Reply-To: <CA+R1CozR3J0cmaXLGCFbHic+ChYZSh+FHd0BZxfbET5gc=6gag@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]

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

[-- Attachment #2: Disable SIGIO --]
[-- Type: text/plain, Size: 1375 bytes --]

From 6b4787023b247b68ae0598d03dce50a6fce44ab1 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
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


  reply	other threads:[~2017-03-10 14:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09 17:42 bug#26038: 26.0.50; Crash on OS X Ivan Andrus
2017-03-10 14:44 ` Alan Third [this message]
2017-03-10 16:04   ` Ivan Andrus
2017-04-11  9:38     ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170310144406.GA76673@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=26038@debbugs.gnu.org \
    --cc=darthandrus@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).