From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: 23.0.50; Emacs seg fault Date: Mon, 08 Oct 2007 15:01:46 +0200 Message-ID: <877ilxzrnp.fsf@kfs-lx.testafd.dk> References: <87abr4a0nv.fsf@kfs-lx.testafd.dk> <871wc727e3.fsf@kfs-lx.testafd.dk> <87ejg6txpn.fsf@kfs-lx.testafd.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1191848543 19485 80.91.229.12 (8 Oct 2007 13:02:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 8 Oct 2007 13:02:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 08 15:02:17 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 1IesFQ-0005yd-Ao for ged-emacs-devel@m.gmane.org; Mon, 08 Oct 2007 15:02:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IesFK-0005wp-UG for ged-emacs-devel@m.gmane.org; Mon, 08 Oct 2007 09:02:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IesFG-0005v8-LL for emacs-devel@gnu.org; Mon, 08 Oct 2007 09:02:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IesFB-0005tH-C7 for emacs-devel@gnu.org; Mon, 08 Oct 2007 09:02:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IesFB-0005t7-8w for emacs-devel@gnu.org; Mon, 08 Oct 2007 09:01:57 -0400 Original-Received: from mail-relay.sonofon.dk ([212.88.64.25]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IesFA-0002O8-Ja for emacs-devel@gnu.org; Mon, 08 Oct 2007 09:01:56 -0400 Original-Received: (qmail 19652 invoked from network); 8 Oct 2007 13:01:47 -0000 Original-Received: from unknown (HELO kfs-lx.testafd.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 8 Oct 2007 13:01:47 -0000 In-Reply-To: (Leo's message of "Mon\, 08 Oct 2007 01\:19\:15 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Detected-Kernel: FreeBSD 4.6-4.9 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:80403 Archived-At: Leo writes: > On 2007-10-07 22:35 +0100, Kim F. Storm wrote: >> Leo writes: >> >>> On 2007-10-06 23:41 +0100, Kim F. Storm wrote: >>>> Just a wild guess - could you try to change "AIX" to "1" in the above >>>> code and see if that makes any difference... >>> >>> I wasn't able to compile. See: >>> >>> ...... >>> make[1]: Entering directory `/home/emacs/src' >>> gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -DUSE_GTK >>> -I. -I/home/emacs/src -D_BSD_SOURCE -I/usr/include/gtk-2.0 >>> -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo >>> -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 >>> -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 >>> -I/usr/include/alsa -I/usr/include/librsvg-2 -I/usr/include/glib-2.0 >>> -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -g -O0 process.c >>> process.c:4641:8: error: macro names must be identifiers >>> make[1]: *** [process.o] Error 1 >>> make[1]: Leaving directory `/home/emacs/src' >>> make: *** [src] Error 2 >> >> Sorry, I meant replace >> >> #ifdef AIX >> >> by >> >> #if 1 > > Now emacs doesn't CRASH. Thanks for testing. Does anybody know anything about this? The relevant code is this: else if (xerrno == EBADF) { #ifdef AIX /* AIX doesn't handle PTY closure the same way BSD does. On AIX, the child's closure of the pts gives the parent a SIGHUP, and the ptc file descriptor is automatically closed, yielding EBADF here or at select() call above. So, SIGHUP is ignored (see def of PTY_TTY_NAME_SPRINTF in m/ibmrt-aix.h), and here we just ignore the select error. Cleanup occurs c/o status_notify after SIGCLD. */ no_avail = 1; /* Cannot depend on values returned */ #else abort (); #endif } For some reason this happens to Leo on In GNU Emacs 23.0.50.4 (i686-pc-linux-gnu, GTK+ Version 2.10.14) of 2007-09-29 on Fedora configured using `configure '--prefix=/usr/local/packages/emacs' '--enable-locallisppath=/usr/local/share/emacs/site-lisp' '--without-toolkit-scroll-bars'' Maybe Linux behaviour here is more like AIX than BSD here, Or it is timing related - although I cannot see where it happens. My previous patch moving suspicious code before setting up the fd-sets didn't help [Leo, are you absolutely sure you applied the first patch correctly]? In any case, if we believe this is a temporary situation (since we abort otherwise), always setting no_avail = 1 in this case could be a solution (if nobody can find out what's wrong -- I CAN'T). To reproduce: 1. emacs -nw -q in screen 2. M-x server-start 3. switch to Linux console (Ctrl + Alt + F1) 4. emacsclient -t -- Kim F. Storm http://www.cua.dk