From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: bug#5333: 23.1.91; NextStep/Mac OS X: emacs -nw crash in input_available_signal + 67 (keyboard.c:7514) Date: Sat, 09 Jan 2010 10:54:38 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <20100107150943.GE3422@kayak.com> Reply-To: YAMAMOTO Mitsuharu , 5333@debbugs.gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1263003572 29130 80.91.229.12 (9 Jan 2010 02:19:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Jan 2010 02:19:32 +0000 (UTC) To: steve@srevilak.net, 5333@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 09 03:19:25 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NTQvD-0007gx-Mq for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jan 2010 03:19:24 +0100 Original-Received: from localhost ([127.0.0.1]:35910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTQvE-0008O7-9E for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Jan 2010 21:19:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NTQux-0008KG-7a for bug-gnu-emacs@gnu.org; Fri, 08 Jan 2010 21:19:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NTQur-0008IX-I3 for bug-gnu-emacs@gnu.org; Fri, 08 Jan 2010 21:19:06 -0500 Original-Received: from [199.232.76.173] (port=50277 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTQur-0008IQ-Fo for bug-gnu-emacs@gnu.org; Fri, 08 Jan 2010 21:19:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38912) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NTQur-0004zS-5t for bug-gnu-emacs@gnu.org; Fri, 08 Jan 2010 21:19:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NTQXe-0001Yi-Nf; Fri, 08 Jan 2010 20:55:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Mail-Followup-To: YAMAMOTO Mitsuharu , 5333@debbugs.gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Jan 2010 01:55:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5333 X-Emacs-PR-Package: emacs,ns X-Emacs-PR-Keywords: Original-Received: via spool by 5333-submit@debbugs.gnu.org id=B5333.12630020885977 (code B ref 5333); Sat, 09 Jan 2010 01:55:02 +0000 Original-Received: (at 5333) by debbugs.gnu.org; 9 Jan 2010 01:54:48 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NTQXP-0001YM-93 for submit@debbugs.gnu.org; Fri, 08 Jan 2010 20:54:47 -0500 Original-Received: from ntp.math.s.chiba-u.ac.jp ([133.82.132.2] helo=mathmail.math.s.chiba-u.ac.jp) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NTQXM-0001YG-QV for 5333@debbugs.gnu.org; Fri, 08 Jan 2010 20:54:46 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id BD16DC0557; Sat, 9 Jan 2010 10:54:38 +0900 (JST) In-Reply-To: <20100107150943.GE3422@kayak.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 =?UTF-8?Q?(Shij=C5=8D)?= APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-Spam-Score: -3.3 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -3.2 (---) Resent-Date: Fri, 08 Jan 2010 20:55:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34097 Archived-At: >>>>> On Thu, 7 Jan 2010 10:09:43 -0500, steve@srevilak.net said: > I'd like to report an emacs 23.1.91.1 crash on Mac OS X 10.6.2. > Unfortunately, I cannot provide a test case that reproduces the crash > reliably. However, I can provide some observations about the context > in which the crashes occur. > * The crashes occur with "emacs -nw", never with the "windowed" > emacs. > * The crashes always occur while I'm holding down the DOWN arrow on > my keyboard, to scroll through a section of text. > * I can provide a stack trace for Mac OS X's crash reporter. (below) > You'll noticed that Emacs is running as a child process of Mutt. I > use Mutt as a MUA, and Mutt is configured to use "emacs -nw" as an > editor. The crash occurred when I was writing a response to an > email message. > * I've observed the crashes in pretest versions 23.1.90.1 and > 23.1.91.1, but not in 23.1.50.1. However, this may or may not be a > conincidence. According to the stack trace, the crash seems to happen by dereferencing NULL pointer (with some offset) in a non-main thread executing the following code in the SIGIO handler. if (input_available_clear_time) EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); EMACS_SET_SECS_USECS consists of multiple instructions, and input_available_clear_time might be cleared to NULL by the main thread between the NULL-check and the completion of EMACS_SET_SECS_USECS in a non-main thread. Could you try the following patch for a while to see if it can avoid the issue? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp === modified file 'src/keyboard.c' *** src/keyboard.c 2010-01-05 14:04:04 +0000 --- src/keyboard.c 2010-01-09 01:33:20 +0000 *************** *** 7503,7513 **** signal (signo, input_available_signal); #endif /* USG */ #ifdef SYNC_INPUT interrupt_input_pending = 1; pending_signals = 1; - #else - SIGNAL_THREAD_CHECK (signo); #endif if (input_available_clear_time) --- 7503,7513 ---- signal (signo, input_available_signal); #endif /* USG */ + SIGNAL_THREAD_CHECK (signo); + #ifdef SYNC_INPUT interrupt_input_pending = 1; pending_signals = 1; #endif if (input_available_clear_time)