From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Emacs hangs on Mac OS X Date: Thu, 04 Jan 2007 08:14:54 +0900 (JST) Message-ID: <20070104.081454.81825763.mituharu@math.s.chiba-u.ac.jp> References: <20070103.222551.228958154.mituharu@math.s.chiba-u.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1167866121 24587 80.91.229.12 (3 Jan 2007 23:15:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Jan 2007 23:15:21 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 04 00:15:19 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H2FKG-0002Zp-CS for ged-emacs-devel@m.gmane.org; Thu, 04 Jan 2007 00:15:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2FKF-0000hn-Lj for ged-emacs-devel@m.gmane.org; Wed, 03 Jan 2007 18:15:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H2FK1-0000gz-0t for emacs-devel@gnu.org; Wed, 03 Jan 2007 18:15:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H2FJy-0000fP-E4 for emacs-devel@gnu.org; Wed, 03 Jan 2007 18:14:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2FJy-0000fM-8F for emacs-devel@gnu.org; Wed, 03 Jan 2007 18:14:58 -0500 Original-Received: from [133.82.132.2] (helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H2FJx-00074u-L3 for emacs-devel@gnu.org; Wed, 03 Jan 2007 18:14:58 -0500 Original-Received: from localhost (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id BC6612CC2; Thu, 4 Jan 2007 08:14:54 +0900 (JST) Original-To: piet@cs.uu.nl In-Reply-To: X-Mailer: Mew version 3.3 on Emacs 22.0 / Mule 5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:64719 Archived-At: >>>>> On Wed, 03 Jan 2007 22:39:00 +0100, Piet van Oostrum said: >>>>> YAMAMOTO Mitsuharu (YM) wrote: YM> Unfortunately, the information about the interrupted library function YM> call seems to be already broken somehow. Could you try to get YM> backtraces for a few instances of the hang? Hopefully we will get YM> more detailed information. > Here is a complete one. The `lowest' malloc appears to be called > from localtime(). Mallocs from system library functions of course > are much more difficult to prevent, if at all. Thanks. Actually it is in the list (*1) of such library functions detected (*2) so far on Darwin: localtime, gmtime, getc, getaddrinfo, fwrite, mkstemp, mktime, fclose, freeaddrinfo (*1) http://lists.gnu.org/archive/html/emacs-pretest-bug/2006-07/msg00070.html (*2) http://lists.gnu.org/archive/html/emacs-devel/2004-09/msg00074.html I'll put BLOCK_INPUT at least around localtime/gmtime/mktime calls. Among them, we cannot simply put BLOCK_INPUT around getaddrinfo because it is called with immediate_quit == 1. > IMHO this shows that is it quite bad to run the event loop in a > signal handler. IIUC, many of us agree that SYNC_INPUT is the right direction, but after the next release. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp