GNU bug report logs - #13289
bookmarks not saved if kill Emacs from command-line

Previous Next

Package: emacs;

Reported by: Xue Fuqiao <xfq.free <at> gmail.com>

Date: Thu, 27 Dec 2012 17:33:02 UTC

Severity: normal

Tags: confirmed, help

Found in version 24.2

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13289 in the body.
You can then email your comments to 13289 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#13289; Package emacs. (Thu, 27 Dec 2012 17:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xue Fuqiao <xfq.free <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 27 Dec 2012 17:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Xue Fuqiao <xfq.free <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2; bookmark didn't save when using emacsclient
Date: Thu, 27 Dec 2012 21:16:15 +0800
--text follows this line--
I started emacs using `emacsclient -c -a ""', and use `C-x r m' to
set a bookmark.  Then I used C-x C-c to exit emacs and used `killall
emacs' to kill the emacs process.  After that, I started emacs again
using `emacsclient -c -a ""', and pressed `C-x r b', but Emacs said that
the bookmark didn't exist.

Everything is OK when using `emacs' to start Emacs.


In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.13)
 of 2012-11-23 on Emacs
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
Configured using:
 `configure '--without-toolkit-scroll-bars' '--with-wide-int''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Info

Minor modes in effect:
  global-whitespace-mode: t
  global-hl-line-mode: t
  global-ede-mode: t
  display-time-mode: t
  delete-selection-mode: t
  savehist-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
C-x r b <tab> <return> d s e m a c s <return> m e m 
a c s <return> s b u g <return> s <return> <return> 
SPC C-h C-p C-s b o o k m a r k C-s C-s C-g C-g q C-x 
b <return> <tab> <tab> C-a SPC C-z C-z C-p C-n C-n 
C-n C-n C-n C-n C-f C-f C-f C-f C-f C-f <menu> f f 
a p <return> <return> SPC C-z SPC SPC M-v SPC SPC C-z 
SPC SPC <menu> r e p o r t - e m a c s - b u g <re
turn>

Recent messages:
Starting Emacs daemon.
Restarting server
When done with this frame, type C-x 5 0
OVERVIEW [2 times]
Composing main Info directory...done
OVERVIEW
View mode: type C-h for help, h for commands, q to quit.
Entering debugger...
Quit
Back to top level.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils browse-url url-handlers
ffap help-mode debug misearch multi-isearch goto-addr thingatpt view
jka-compr info bookmark pp ede/linux ede/emacs ede/cpp-root flyspell
ispell eldoc org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc
org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks find-func
org-agenda org-info org-gnus org-docview org-bibtex bibtex org-bbdb org
ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table org-footnote org-src
ob-comint ob-keys ob ob-eval org-pcomplete pcomplete comint ansi-color
ring org-list org-faces org-compat org-entities org-macs noutline
outline easy-mmode format-spec disp-table saveplace uniquify whitespace
hl-line ede/speedbar ede/files ede ede/base ede/auto ede/source
eieio-base eieio-speedbar speedbar sb-image ezimage dframe eieio-custom
wid-edit cedet time battery delsel cus-start cus-load cal-china lunar
solar cal-dst cal-bahai cal-islam cal-hebrew holidays hol-loaddefs
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs xfq-backup
xfq-ido ido xfq-org xfq-abbrev xfq-minor-modes glasses savehist paren
xfq-debug xfq-accelerate warnings accelerate advice help-fns
advice-preload xfq-elisp xfq-server server xfq-require elp hideshow
easymenu url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-util url-parse auth-source eieio byte-opt bytecomp
byte-compile cconv macroexp assoc gnus-util time-date password-cache
url-vars mm-util mail-prsvr mailcap dired regexp-opt ediff-merg
ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff
bmi cl xfq-packages package tabulated-list tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)


-- 
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13289; Package emacs. (Thu, 27 Dec 2012 18:09:01 GMT) Full text and rfc822 format available.

Message #8 received at 13289 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Xue Fuqiao <xfq.free <at> gmail.com>
Cc: 13289 <at> debbugs.gnu.org
Subject: Re: bug#13289: 24.2; bookmark didn't save when using emacsclient
Date: Thu, 27 Dec 2012 13:07:12 -0500
Xue Fuqiao wrote:

> I started emacs using `emacsclient -c -a ""', and use `C-x r m' to
> set a bookmark.  Then I used C-x C-c to exit emacs and used `killall
> emacs' to kill the emacs process.

If you kill it from the shell, Emacs doesn't shut down gracefully.
You could use M-x kill-emacs from inside Emacs instead.




Changed bug title to 'bookmarks not saved if kill Emacs from command-line' from '24.2; bookmark didn't save when using emacsclient' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 27 Dec 2012 18:24:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13289; Package emacs. (Thu, 27 Dec 2012 22:15:01 GMT) Full text and rfc822 format available.

Message #13 received at 13289 <at> debbugs.gnu.org (full text, mbox):

From: Xue Fuqiao <xfq.free <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 13289 <at> debbugs.gnu.org
Subject: Re: bug#13289: 24.2; bookmark didn't save when using emacsclient
Date: Fri, 28 Dec 2012 06:13:06 +0800
On Thu, 27 Dec 2012 13:07:12 -0500
Glenn Morris <rgm <at> gnu.org> wrote:

> If you kill it from the shell, Emacs doesn't shut down gracefully.
> You could use M-x kill-emacs from inside Emacs instead.

Thanks, it works.
-- 
Best regards.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13289; Package emacs. (Fri, 28 Dec 2012 01:50:02 GMT) Full text and rfc822 format available.

Message #16 received at 13289 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Xue Fuqiao <xfq.free <at> gmail.com>
Cc: 13289 <at> debbugs.gnu.org
Subject: Re: bug#13289: 24.2; bookmark didn't save when using emacsclient
Date: Thu, 27 Dec 2012 20:48:50 -0500
Xue Fuqiao wrote:

>> If you kill it from the shell, Emacs doesn't shut down gracefully.
>> You could use M-x kill-emacs from inside Emacs instead.
>
> Thanks, it works.

Mind you, SIGTERM is supposed to run kill-emacs, so it's not clear that
"killall emacs" should not have had the same effect...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13289; Package emacs. (Fri, 04 Jan 2013 02:53:01 GMT) Full text and rfc822 format available.

Message #19 received at 13289 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Xue Fuqiao <xfq.free <at> gmail.com>
Cc: 13289 <at> debbugs.gnu.org
Subject: Re: bug#13289: 24.2; bookmark didn't save when using emacsclient
Date: Thu, 03 Jan 2013 21:52:08 -0500
Glenn Morris wrote:

> Mind you, SIGTERM is supposed to run kill-emacs, so it's not clear that
> "killall emacs" should not have had the same effect...

It seems that bookmark-write-file fails to return from:

(dolist (i bookmark-alist) (pp i (current-buffer)))

pp-buffer dies someway through trying to process something like this:

  ("README" (filename . "/misc/emacs/bzr/emacs24/README") (front-context-string . "Copyright (C) 20") (rear-context-string) (position . 1))

I don't know why.




Added tag(s) confirmed and help. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 04 Jan 2013 02:55:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13289; Package emacs. (Fri, 18 Jan 2013 16:26:01 GMT) Full text and rfc822 format available.

Message #24 received at 13289 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Xue Fuqiao <xfq.free <at> gmail.com>, 13289 <at> debbugs.gnu.org
Subject: Re: bug#13289: 24.2; bookmark didn't save when using emacsclient
Date: Sat, 19 Jan 2013 00:24:17 +0800
Glenn Morris <rgm <at> gnu.org> writes:

> It seems that bookmark-write-file fails to return from:
>
> (dolist (i bookmark-alist) (pp i (current-buffer)))
>
> pp-buffer dies someway through trying to process something like this:
>
>   ("README" (filename . "/misc/emacs/bzr/emacs24/README")
> (front-context-string . "Copyright (C) 20") (rear-context-string)
> (position . 1))
>
> I don't know why.

The reason is the following.  The above call to `pp' contains a call to
`scan-lists' which is enclosed in `ignore-errors'.  Normally, the error
is caught and `pp' goes on to do its job.  However, because the hook is
being run while Emacs is in a sigterm handler waiting to die (so that
waiting_for_input is true), the Fsignal aborts Emacs instead of
signalling a Lisp error:


Program received signal SIGABRT, Aborted.
0x00007ffff1fc40bb in raise () from /usr/lib/libpthread.so.0
(gdb) bt
#0  0x00007ffff1fc40bb in raise () from /usr/lib/libpthread.so.0
#1  0x0000000000536b79 in terminate_due_to_signal (sig=6, backtrace_limit=
    40) at emacs.c:342
#2  0x000000000055b8d4 in emacs_abort () at sysdep.c:2152
#3  0x00000000005d3ab2 in Fsignal (error_symbol=12920114, data=19830086)
    at eval.c:1370
#4  0x00000000005d3df7 in xsignal (error_symbol=12920114, data=19830086)
    at eval.c:1466
#5  0x00000000005d3ec6 in xsignal3 (error_symbol=12920114, arg1=15034017, 
    arg2=196, arg3=200) at eval.c:1493
#6  0x0000000000612d6b in scan_lists (from=196, count=1, depth=-2, 
    sexpflag=0) at syntax.c:2614
#7  0x0000000000615a82 in Fscan_lists (from=60, count=4, depth=-4)
    at syntax.c:2877
#8  0x00000000005d674d in Ffuncall (nargs=4, args=0x7fffffff9698)
    at eval.c:2682
...
#36 0x00000000005d5b7c in Frun_hooks (nargs=1, args=0x7fffffffc0e8)
    at eval.c:2248
#37 0x0000000000538cb4 in Fkill_emacs (arg=60) at emacs.c:1852
#38 0x0000000000536b12 in terminate_due_to_signal (sig=15, backtrace_limit=
    40) at emacs.c:324
#39 0x000000000055b390 in handle_fatal_signal (sig=15) at sysdep.c:1653
...
Lisp Backtrace:
"scan-lists" (0xffff96a0)
"down-list" (0xffff9b90)
"byte-code" (0xffff9f90)
"pp-buffer" (0xffffa770)
"pp-to-string" (0xffffac58)
"pp" (0xffffb130)
"bookmark-write-file" (0xffffb620)
"bookmark-save" (0xffffbb00)
"bookmark-exit-hook-internal" (0xffffc0b8)




Reply sent to Chong Yidong <cyd <at> gnu.org>:
You have taken responsibility. (Sat, 19 Jan 2013 08:52:02 GMT) Full text and rfc822 format available.

Notification sent to Xue Fuqiao <xfq.free <at> gmail.com>:
bug acknowledged by developer. (Sat, 19 Jan 2013 08:52:03 GMT) Full text and rfc822 format available.

Message #29 received at 13289-done <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Xue Fuqiao <xfq.free <at> gmail.com>, 13289-done <at> debbugs.gnu.org
Subject: Re: bug#13289: 24.2; bookmark didn't save when using emacsclient
Date: Sat, 19 Jan 2013 16:50:51 +0800
Chong Yidong <cyd <at> gnu.org> writes:

> The reason is the following.  The above call to `pp' contains a call to
> `scan-lists' which is enclosed in `ignore-errors'.  Normally, the error
> is caught and `pp' goes on to do its job.  However, because the hook is
> being run while Emacs is in a sigterm handler waiting to die (so that
> waiting_for_input is true), the Fsignal aborts Emacs instead of
> signalling a Lisp error:

The straightforward fix---setting waiting_for_input to 0 in
Fkill_emacs---seems to work fine, so I went ahead and committed it to
trunk.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Feb 2013 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 84 days ago.

Previous Next


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