From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chen Levy Newsgroups: gmane.emacs.bugs Subject: bug#7149: Emacs 23.2.1: exiting last `emacsclient -c' frame, and then rerun client, segfaults `emacs --daemon' Date: Sat, 2 Oct 2010 15:12:56 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0015175ce134da41ed0491a211ae X-Trace: dough.gmane.org 1286045193 8897 80.91.229.12 (2 Oct 2010 18:46:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 2 Oct 2010 18:46:33 +0000 (UTC) To: 7149@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 02 20:46:31 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P276N-0006ZP-1G for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Oct 2010 20:46:31 +0200 Original-Received: from localhost ([127.0.0.1]:43418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P276M-00074e-Eu for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Oct 2010 14:46:30 -0400 Original-Received: from [140.186.70.92] (port=45232 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P24gS-0002Yb-PB for bug-gnu-emacs@gnu.org; Sat, 02 Oct 2010 12:11:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P24gQ-0002s5-8S for bug-gnu-emacs@gnu.org; Sat, 02 Oct 2010 12:11:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P24gQ-0002s1-6A for bug-gnu-emacs@gnu.org; Sat, 02 Oct 2010 12:11:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P24XC-0001s4-8N; Sat, 02 Oct 2010 12:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chen Levy Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Oct 2010 16:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7149 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.12860352757178 (code B ref -1); Sat, 02 Oct 2010 16:02:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Oct 2010 16:01:15 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P24WQ-0001ri-FV for submit@debbugs.gnu.org; Sat, 02 Oct 2010 12:01:15 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P21qj-0000iJ-3i for submit@debbugs.gnu.org; Sat, 02 Oct 2010 09:10:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P21tc-0000W3-VL for submit@debbugs.gnu.org; Sat, 02 Oct 2010 09:13:02 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:33536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P21tc-0000Vz-RR for submit@debbugs.gnu.org; Sat, 02 Oct 2010 09:13:00 -0400 Original-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@gnu.org; Sat, 02 Oct 2010 09:13:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P21tZ-0000VO-W2 for bug-gnu-emacs@gnu.org; Sat, 02 Oct 2010 09:12:59 -0400 Original-Received: from mail-qw0-f41.google.com ([209.85.216.41]:64552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P21tZ-0000VK-So for bug-gnu-emacs@gnu.org; Sat, 02 Oct 2010 09:12:57 -0400 Original-Received: by qwb8 with SMTP id 8so2098486qwb.0 for ; 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= Original-Received: by 10.224.11.18 with SMTP id r18mr4850524qar.115.1286025177087; Sat, 02 Oct 2010 06:12:57 -0700 (PDT) Original-Received: by 10.229.228.6 with HTTP; Sat, 2 Oct 2010 06:12:56 -0700 (PDT) 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-Mailman-Approved-At: Sat, 02 Oct 2010 12:01:12 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 02 Oct 2010 12:02:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Sat, 02 Oct 2010 14:46:25 -0400 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40642 Archived-At: --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
Description:
=3D=3D=3D=3D=3D=3D=3D

When starting emacs server with `emacs --daemon= ', and connecting to it with `emacsclient -c', then closing the las= t `emacsclient -c' frame and trying to open a new `emacsclient -c' = frame, the `emacs --daemon' process=C2=A0receive=C2=A0SYSSEGV.

Steps to=C2=A0reproduce:
=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D

0. Make sure no Emacs = processes are running.

1. Run: emacs --daemon
=C2=A0=C2=A0It prints:
=C2=A0=C2=A0("emacs")
=C2=A0=C2=A0Starting Emacs d= aemon.

=C2=A0=C2=A0and the process starts no= rmally.

2. Run: emacsclient -c
=C2= =A0=C2=A0It prints: Waiting for Emacs...
=C2=A0=C2=A0and a new frame opens as expected.

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

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

5.= Run: emacsclient -c
=C2=A0=C2=A0It prints: Waiting for Emacs...
=C2=A0=C2=A0but no new frame is opened.

=C2=A0=C2= =A0gdb prints something like:
=C2=A0=C2=A0Program received s= ignal SIGSEGV, Segmentation fault.
=C2=A0=C2=A00x00007f989f211527 in kill () from /lib/libc.so.6

=C2=A0=C2=A0And the output of `fuser=C2=A0/tmp/emacs= ${UID}/server'=C2=A0confirms=C2=A0that the socket is stale.
<= br>
6. Run: `emacsclient -c' prints:
=C2=A0=C2=A0emacsclient: connect: Connection refused
= =C2=A0=C2=A0emacsclient: No socket or alternate editor. =C2=A0Please use:

=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--socket-na= me
=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)
=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--alternate-editor (or environ= ment variable ALTERNATE_EDITOR)

Version info= rmation:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

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

# uname -a
L= inux xxxxxx 2.6.24-28-generic #1 SMP Thu Sep 16 14:18:43 UTC 2010 x86_64 GN= U/Linux

# cat /etc/lsb-release
DISTRIB_ID=3DUbuntu
DISTRIB_RELEASE=3D8.04
DISTRIB_CODE= NAME=3Dhardy
DISTRIB_DESCRIPTION=3D"Ubuntu 8.04.4 LTS"<= /div>


| Cheers,
| Chen.
--0015175ce134da41ed0491a211ae--