unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
To: Leo <sdl.web@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: 23.0.50; Emacs seg fault
Date: Mon, 08 Oct 2007 15:01:46 +0200	[thread overview]
Message-ID: <877ilxzrnp.fsf@kfs-lx.testafd.dk> (raw)
In-Reply-To: <m2odfaa264.fsf@cam.ac.uk> (Leo's message of "Mon\, 08 Oct 2007 01\:19\:15 +0100")

Leo <sdl.web@gmail.com> writes:

> On 2007-10-07 22:35 +0100, Kim F. Storm wrote:
>> Leo <sdl.web@gmail.com> 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 <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2007-10-08 13:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-29 21:10 23.0.50; Emacs seg fault Leo
2007-09-30  2:56 ` Stefan Monnier
2007-09-30  6:09   ` Leo
2007-09-30 12:55   ` Richard Stallman
2007-09-30 10:49 ` Kim F. Storm
2007-09-30 11:07   ` David Kastrup
2007-09-30 15:44   ` Leo
2007-10-01 17:41     ` Richard Stallman
2007-10-05 19:29       ` Leo
2007-09-30 16:10   ` Eli Zaretskii
2007-10-05 19:28   ` Leo
2007-10-06 22:41     ` Kim F. Storm
2007-10-07  7:34       ` Leo
2007-10-07 21:35         ` Kim F. Storm
2007-10-08  0:19           ` Leo
2007-10-08 13:01             ` Kim F. Storm [this message]
2007-10-08 16:09               ` Dan Nicolaescu
2007-10-08 19:13                 ` Leo
2007-10-08 20:15                   ` Dan Nicolaescu
2007-10-10  5:54                     ` Leo
2007-10-10  8:08                       ` Dan Nicolaescu
2007-10-10  9:35                         ` Leo
2007-10-10 23:53                           ` Dan Nicolaescu
2007-10-11 17:31                             ` Leo
2007-10-11 21:31                               ` Dan Nicolaescu
2007-10-10  5:59               ` Leo

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=877ilxzrnp.fsf@kfs-lx.testafd.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    --cc=sdl.web@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).