GNU bug report logs - #7149
23.2; exiting last `emacsclient -c' frame, and then rerun client, segfaults `emacs --daemon'

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Chen Levy <chenlevy <at> gmail.com>; Done: Chong Yidong <cyd <at> gnu.org>; Maintainer for emacs is bug-gnu-emacs <at> gnu.org.
bug closed, send any further explanations to 7149 <at> debbugs.gnu.org and Chen Levy <chenlevy <at> gmail.com> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. Full text available.

Message received at 7149 <at> debbugs.gnu.org:


Received: (at 7149) by debbugs.gnu.org; 20 Apr 2012 10:15:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 20 06:15:26 2012
Received: from localhost ([127.0.0.1]:43583 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SLAsA-0002TM-Bh
	for submit <at> debbugs.gnu.org; Fri, 20 Apr 2012 06:15:26 -0400
Received: from fencepost.gnu.org ([208.118.235.10]:54338 ident=Debian-exim)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <cyd <at> gnu.org>) id 1SLAs7-0002PA-7t
	for 7149 <at> debbugs.gnu.org; Fri, 20 Apr 2012 06:15:24 -0400
Received: from [155.69.18.143] (port=50959 helo=ulysses)
	by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <cyd <at> gnu.org>)
	id 1SLArh-0008Er-FN; Fri, 20 Apr 2012 06:14:58 -0400
From: Chong Yidong <cyd <at> gnu.org>
To: Chen Levy <chenlevy <at> gmail.com>
Subject: Re: bug#7149: Emacs 23.2.1: exiting last `emacsclient -c' frame,
	and then rerun client, segfaults `emacs --daemon'
References: <AANLkTikEEOK73wfnfntaM6iMEwojd6Q1wbQmL7g72v5V <at> mail.gmail.com>
Date: Fri, 20 Apr 2012 18:14:49 +0800
In-Reply-To: <AANLkTikEEOK73wfnfntaM6iMEwojd6Q1wbQmL7g72v5V <at> mail.gmail.com>
	(Chen Levy's message of "Sat, 2 Oct 2010 15:12:56 +0200")
Message-ID: <87lilqu2ue.fsf <at> gnu.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -6.9 (------)
X-Debbugs-Envelope-To: 7149
Cc: 7149 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)

Chen Levy <chenlevy <at> gmail.com> writes:

> When starting emacs server with `emacs --daemon', and connecting to it
> with `emacsclient -c', then closing the last `emacsclient -c' frame
> and trying to open a new `emacsclient -c' frame, the `emacs --daemon'
> process receive SYSSEGV.
>
> 1. Run: emacs --daemon
> 2. Run: emacsclient -c
> 3. Close the frame, started on strep 2.
> 5. Run: emacsclient -c
>   It prints: Waiting for Emacs...
>   but no new frame is opened.

I'm sorry that no one got back to you on this, but I can't reproduce it
on either Emacs 23.4 or the latest Emacs repository.  I think this must
have been fixed in the meantime; please let us know if you still
experience the behavior.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7149; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 2 Oct 2010 16:01:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 02 12:01:15 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1P24WQ-0001ri-FV
	for submit <at> debbugs.gnu.org; Sat, 02 Oct 2010 12:01:15 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <chenlevy <at> gmail.com>) id 1P21qj-0000iJ-3i
	for submit <at> debbugs.gnu.org; Sat, 02 Oct 2010 09:10:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chenlevy <at> gmail.com>) id 1P21tc-0000W3-VL
	for submit <at> debbugs.gnu.org; Sat, 02 Oct 2010 09:13:02 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	HTML_MESSAGE,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL
	autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([199.232.76.165]:33536)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chenlevy <at> gmail.com>) id 1P21tc-0000Vz-RR
	for submit <at> debbugs.gnu.org; Sat, 02 Oct 2010 09:13:00 -0400
Received: from [140.186.70.92] (port=56219 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1P21tb-0001yN-JC
	for bug-gnu-emacs <at> gnu.org; Sat, 02 Oct 2010 09:13:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chenlevy <at> gmail.com>) id 1P21tZ-0000VO-W2
	for bug-gnu-emacs <at> gnu.org; Sat, 02 Oct 2010 09:12:59 -0400
Received: from mail-qw0-f41.google.com ([209.85.216.41]:64552)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chenlevy <at> gmail.com>) id 1P21tZ-0000VK-So
	for bug-gnu-emacs <at> gnu.org; Sat, 02 Oct 2010 09:12:57 -0400
Received: by qwb8 with SMTP id 8so2098486qwb.0
	for <bug-gnu-emacs <at> gnu.org>; Sat, 02 Oct 2010 06:12:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:received:date:message-id
	:subject:from:to:content-type;
	bh=pJStCpER68K0RpH8PEz0fm3ljxZWPdsNuLO8dlgb0L0=;
	b=GQTQn+KFKJ62R5MFWDqI3CBZ1tnFlrSZ5yUk7BOGfgOK1CVaqAB4AM0PHCH35xpqBb
	qjCQRlWoS8K7PofzVqG7af9+CZ5l4sWqOiuQkm5KgYNHQb32zd8z9E60Y+aOV4Hb1B5Q
	tbTyHjMb5zaSOXC1rGvNITF9Xl9a2MiDQJYxw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	b=nOJJnl1F2gZ1vUiE3VjWmwTa8sLpSDCEFFP3yS7XgRQROo5YiDhw8VXK4UXo3/2UEe
	QQI+8tEJ+eRiQSlNwHr01rpnWAHnLb8yLvNS9g6B92zRXM0+m8SZ4EyYeeiqdjU6zGNf
	erkAk72M3hy9UNEJ/zY/RELhTL0aqNq4YUBTc=
MIME-Version: 1.0
Received: by 10.224.11.18 with SMTP id r18mr4850524qar.115.1286025177087; Sat,
	02 Oct 2010 06:12:57 -0700 (PDT)
Received: by 10.229.228.6 with HTTP; Sat, 2 Oct 2010 06:12:56 -0700 (PDT)
Date: Sat, 2 Oct 2010 15:12:56 +0200
Message-ID: <AANLkTikEEOK73wfnfntaM6iMEwojd6Q1wbQmL7g72v5V <at> mail.gmail.com>
Subject: Emacs 23.2.1: exiting last `emacsclient -c' frame, and then rerun
	client, segfaults `emacs --daemon'
From: Chen Levy <chenlevy <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Content-Type: multipart/alternative; boundary=0015175ce134da41ed0491a211ae
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Spam-Score: -5.9 (-----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sat, 02 Oct 2010 12:01:12 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.9 (-----)

--0015175ce134da41ed0491a211ae
Content-Type: text/plain; charset=UTF-8

Description:
=======

When starting emacs server with `emacs --daemon', and connecting to it with
`emacsclient -c', then closing the last `emacsclient -c' frame and trying to
open a new `emacsclient -c' frame, the `emacs --daemon'
process receive SYSSEGV.

Steps to reproduce:
============

0. Make sure no Emacs processes are running.

1. Run: emacs --daemon
  It prints:
  ("emacs")
  Starting Emacs daemon.

  and the process starts normally.

2. Run: emacsclient -c
  It prints: Waiting for Emacs...
  and a new frame opens as expected.

3. Close the frame, started on strep 2.
  Observe that the `/tmp/emacs${UID}/server' socket seem to be active.
  `fuser' on it prints the `emacs --daemon' PID.

4. (optional) Open `gdb', `attach' to the `emacs --daemon' process, and
`continue' it.

5. Run: emacsclient -c
  It prints: Waiting for Emacs...
  but no new frame is opened.

  gdb prints something like:
  Program received signal SIGSEGV, Segmentation fault.
  0x00007f989f211527 in kill () from /lib/libc.so.6

  And the output of `fuser /tmp/emacs${UID}/server' confirms that the socket
is stale.

6. Run: `emacsclient -c' prints:
  emacsclient: connect: Connection refused
  emacsclient: No socket or alternate editor.  Please use:

          --socket-name
          --server-file      (or environment variable EMACS_SERVER_FILE)
          --alternate-editor (or environment variable ALTERNATE_EDITOR)

Version information:
============

# (version)
GNU Emacs 23.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.12.9)
(compiled from source)

# uname -a
Linux xxxxxx 2.6.24-28-generic #1 SMP Thu Sep 16 14:18:43 UTC 2010 x86_64
GNU/Linux

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04.4 LTS"

See also:
======

http://superuser.com/questions/194395/why-does-tmp-emacsuid-server-get-stale-after-last-emacsclient-exits

| Cheers,
| Chen.

--0015175ce134da41ed0491a211ae
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Description:</div><div><div>=3D=3D=3D=3D=3D=3D=3D</di=
v></div><div><br></div><div>When starting emacs server with `emacs --daemon=
&#39;, and connecting to it with `emacsclient -c&#39;, then closing the las=
t `emacsclient -c&#39; frame and trying to open a new `emacsclient -c&#39; =
frame, the `emacs --daemon&#39; process=C2=A0receive=C2=A0SYSSEGV.</div>
<div><br></div><div>Steps to=C2=A0reproduce:</div><div><div>=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D</div></div><div><br></div><div>0. Make sure no Emacs =
processes are running.</div><div><br></div><div>1. Run: emacs --daemon</div=
><div>=C2=A0=C2=A0It prints:</div><div>
<div>=C2=A0=C2=A0(&quot;emacs&quot;)</div><div>=C2=A0=C2=A0Starting Emacs d=
aemon.</div></div><div><br></div><div>=C2=A0=C2=A0and the process starts no=
rmally.</div><div><br></div><div>2. Run: emacsclient -c</div><div><div>=C2=
=A0=C2=A0It prints: Waiting for Emacs...</div>
</div><div>=C2=A0=C2=A0and a new frame opens as expected.</div><div><br></d=
iv><div>3. Close the frame, started on strep 2.</div><div>=C2=A0=C2=A0Obser=
ve that the `/tmp/emacs${UID}/server&#39; socket seem to be active.=C2=A0</=
div><div>=C2=A0=C2=A0`fuser&#39; on it prints the `emacs --daemon&#39; PID.=
</div>
<div><br></div><div>4. (optional) Open `gdb&#39;, `attach&#39; to the `emac=
s --daemon&#39; process, and `continue&#39; it.</div><div><br></div><div>5.=
 Run: emacsclient -c</div><meta http-equiv=3D"content-type" content=3D"text=
/html; charset=3Dutf-8"><div>
<div><div>=C2=A0=C2=A0It prints: Waiting for Emacs...</div></div></div><div=
>=C2=A0=C2=A0but no new frame is opened.</div><div><br></div><div>=C2=A0=C2=
=A0gdb prints something like:</div><div><div>=C2=A0=C2=A0Program received s=
ignal SIGSEGV, Segmentation fault.</div>
<div>=C2=A0=C2=A00x00007f989f211527 in kill () from /lib/libc.so.6</div></d=
iv><div><br></div><div>=C2=A0=C2=A0And the output of `fuser=C2=A0/tmp/emacs=
${UID}/server&#39;=C2=A0confirms=C2=A0that the socket is stale.</div><div><=
br></div><div>6. Run: `emacsclient -c&#39; prints:</div>
<div><div>=C2=A0=C2=A0emacsclient: connect: Connection refused</div><div>=
=C2=A0=C2=A0emacsclient: No socket or alternate editor. =C2=A0Please use:</=
div><div><br></div><div>=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--socket-na=
me</div><div>=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--server-file =C2=A0 =
=C2=A0 =C2=A0(or environment variable EMACS_SERVER_FILE)</div>
<div>=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--alternate-editor (or environ=
ment variable ALTERNATE_EDITOR)</div></div><div><br></div><div>Version info=
rmation:</div><div>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</div><div><br></div=
><div># (version)</div><div>GNU Emacs 23.2.1 (x86_64-unknown-linux-gnu, GTK=
+ Version 2.12.9)</div>
<div>(compiled from source)</div><div><br></div><div># uname -a</div><div>L=
inux xxxxxx 2.6.24-28-generic #1 SMP Thu Sep 16 14:18:43 UTC 2010 x86_64 GN=
U/Linux</div><div><br></div><div># cat /etc/lsb-release</div><div><div>
DISTRIB_ID=3DUbuntu</div><div>DISTRIB_RELEASE=3D8.04</div><div>DISTRIB_CODE=
NAME=3Dhardy</div><div>DISTRIB_DESCRIPTION=3D&quot;Ubuntu 8.04.4 LTS&quot;<=
/div></div><div><br></div><div><div><div>See also:</div><div>=3D=3D=3D=3D=
=3D=3D</div><div><br>
</div><div><a href=3D"http://superuser.com/questions/194395/why-does-tmp-em=
acsuid-server-get-stale-after-last-emacsclient-exits">http://superuser.com/=
questions/194395/why-does-tmp-emacsuid-server-get-stale-after-last-emacscli=
ent-exits</a></div>
</div></div><div><br></div>| Cheers,<br>| Chen.<br>
</div>

--0015175ce134da41ed0491a211ae--




Acknowledgement sent to Chen Levy <chenlevy <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7149; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 20 Apr 2012 10:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.