From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.bugs Subject: bug#12447: 24.1.50; Stuck in garbage collection on OS X Date: Fri, 14 Sep 2012 23:08:19 +0200 (CEST) Message-ID: <20120914.230819.731988138196046556.hanche@math.ntnu.no> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347656948 19977 80.91.229.3 (14 Sep 2012 21:09:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Sep 2012 21:09:08 +0000 (UTC) To: 12447@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 14 23:09:12 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TCd8R-0002l4-9q for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Sep 2012 23:09:11 +0200 Original-Received: from localhost ([::1]:43616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCd8N-0000pE-9O for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Sep 2012 17:09:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCd8K-0000p9-2s for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 17:09:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCd8J-0005f4-1U for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 17:09:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCd8I-0005f0-UF for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 17:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TCd9F-0004DV-Uk for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 17:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Harald Hanche-Olsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Sep 2012 21:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12447 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.134765697316167 (code B ref -1); Fri, 14 Sep 2012 21:10:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Sep 2012 21:09:33 +0000 Original-Received: from localhost ([127.0.0.1]:34332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCd8m-0004Ci-Li for submit@debbugs.gnu.org; Fri, 14 Sep 2012 17:09:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38219) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCd8k-0004Cb-8G for submit@debbugs.gnu.org; Fri, 14 Sep 2012 17:09:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCd7l-0005aa-RC for submit@debbugs.gnu.org; Fri, 14 Sep 2012 17:08:30 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:53191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCd7l-0005aW-Ng for submit@debbugs.gnu.org; Fri, 14 Sep 2012 17:08:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCd7k-0000oY-KV for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 17:08:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCd7i-0005WA-Ul for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 17:08:28 -0400 Original-Received: from hylle02.itea.ntnu.no ([129.241.56.101]:48150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCd7i-0005TL-K4 for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 17:08:26 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by hylle02.itea.ntnu.no (Postfix) with ESMTP id 84B982C05E for ; Fri, 14 Sep 2012 23:08:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hylle02.itea.ntnu.no Original-Received: from anne.math.ntnu.no (anne.math.ntnu.no [129.241.15.150]) by hylle02.itea.ntnu.no (Postfix) with SMTP id 27DF32C05D for ; Fri, 14 Sep 2012 23:08:23 +0200 (CEST) Original-Received: (qmail 18840 invoked from network); 14 Sep 2012 21:08:23 -0000 Original-Received: from gauss.math.ntnu.no (HELO localhost) (hanche@129.241.15.58) by anne.math.ntnu.no with ESMTPA; 14 Sep 2012 21:08:23 -0000 X-URL: http://www.math.ntnu.no/~hanche/ X-Mailer: Mew version 6.5 on Emacs 24.1.50 / Mule 6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:64321 Archived-At: This concerns emacs built with --with-ns from trunk on OS X. To start with the symptom: Emacs seems to freeze, and spends a lot of CPU time. Taking a sample with Activity monitor appears to indicate a very deeply nested mark_object calls; from this I conclude that the problem appears to happen in GC. How to trigger the symptom: I always got it by trying to send an email message with a large attachment. My mail client of choice is Mew, but I suspect that any activity triggering garbage collection will also trigger the bug. After bisecting, I come to the conclusion that this revision is to blame: revno: 109470 committer: Jan D. branch nick: trunk timestamp: Mon 2012-08-06 18:09:02 +0200 message: * keyboard.c (timer_check_2): Add break so timer_check returns next timeout. That revision only adds a single line of code. I also find that the bug disappears if I patch the current tip of trunk (revision 110013) as follows, which undoes revision 109470: === modified file 'src/keyboard.c' --- src/keyboard.c 2012-09-13 02:21:28 +0000 +++ src/keyboard.c 2012-09-14 19:12:15 +0000 @@ -4484,7 +4484,6 @@ } nexttime = make_emacs_time (0, 0); - break; } else /* When we encounter a timer that is still waiting, I suppose the break was added for a good reason, so this is probably not the right thing. But it does cure the present problem. (This bug is also discussed on the emacs-devel list, in the thread titled "Emacs seems awfully unstable on OS X lately".) There seems to be a second bug, introduced later, that causes crashes (as opposed to hangs). I mention this because the second bug could interfere with attempts to work on this one. I will endeavour to track down the other bug as well. - Harald