Subject: 24.3; Emacs Desktop does not allow quit emacs when on read-only file system

From: Sergey Fukanchik <[email-masked]>
Date: Sun, 7 Jun 2015 02:35:54 -0400

Package: emacs
Version: 24.3

This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgment at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

1. enable (desktop-save-mode 1)
2. do some activity: create modified buffers, open some files etc
3. remount the FS where desktop saved into R/O mode mount -o remount,ro /
4. Try exiting emacs C-x C-c
5. emacs will ask if you want to save files etc and in the end - a
message in minibuffer saying desktop.lock could not be deleted (see below)
Error while saving the desktop.  Ignore?  y
desktop-release-lock: Removing old name: read-only file system,
/home/fuxx/.emacs.desktop.lock

6. And emacs does not exit. Repeating C-x C-c does not help. Closing
via window manager does not help.
7. Additionally it is not possible to report bug from the emacs itself

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/share/emacs/24.3/etc/DEBUG.

In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7)
 of 2014-03-07 on lamiak, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:    Ubuntu 14.04.2 LTS

Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars'
 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_MONETARY: ru_RU.UTF-8
  value of $LC_NUMERIC: ru_RU.UTF-8
  value of $LC_TIME: ru_RU.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  display-time-mode: t
  recentf-mode: t
  desktop-save-mode: t
  global-linum-mode: t
  linum-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Recent input:
M-/ ) M-b M-b M-b M-b M-b M-f C-f C-f C - у C-e C-x
C-s C-x C-e C-x k <return> C-a C-e C-a ф ы в <backspace>
<backspace> <backspace> C-ф C-у C-ф C-у C-ф C-у C-ф
C-ч C-ы C-т C-т C-n C-n C-n <up> <up> <left> . SPC
З А П <backspace> <backspace> <backspace> з а п а д
SPC п о г р я з SPC в SPC т о т а л и т а р и з м е
<left> <left> <left> <left> <left> <left> <left> <left>
<left> <left> <left> <left> <left> <left> <left> <left>
<left> <left> <left> <left> <left> <left> с а м SPC
C-у C-т C-т C-S-x C-S-s A S <backspace> <backspace>
C-S-x C-S-s M-> C-x C-s 1 ) <backspace> 0 ) SPC С <backspace>
Р е к л а м а SPC н а у ч н о г о <C-backspace> р а
ц и о н а л ь <C-backspace> н а у н о г о SPC <C-backspace>
н а у ч н о г о SPC о б р а з а SPC ж и з н и SPC -
SPC о к . SPC н о SPC х о т е л о с ь SPC б ы SPC р
а ц и о н о <backspace> <backspace> н а л ь н о г о
SPC о б р а з а SPC ж и з н и C-x C-s C-x C-c n y y
C-x C-c n y y a s d <backspace> <backspace> <backspace>
C-x C-c n y y y y C-x C-c n n <return> n <return> n
<return> n <return> n <return> n a s d M-x r e p o
r t - e m a c s - b u g <return>

Recent messages:
Saving places: can't write /home/fuxx/.emacs-places
Error while saving the desktop.  Ignore? (y or n)  y
desktop-release-lock: Removing old name: read-only file system,
/home/fuxx/.emacs.desktop.lock
byte-code: Opening output file: read-only file system,
/tmp/buffer-content-160453C-
Modified buffers exist; exit anyway?  y
Saving file /home/fuxx/.recentf...
File .recentf is write-protected; try to save anyway?  n
Buffer .recentf modified; kill anyway?  y
Saving places: can't write /home/fuxx/.emacs-places
Error while saving the desktop.  Ignore?  y
desktop-release-lock: Removing old name: read-only file system,
/home/fuxx/.emacs.desktop.lock

Load-path shadows:
/usr/share/emacs/24.3/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides
/usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/24.3/site-lisp/emacspeak/lisp/tetris hides
/usr/share/emacs/24.3/lisp/play/tetris

Features:
(shadow sort gnus-util mail-extr emacsbug message cl-macs gv format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils diff pp warnings debug two-column
iso-transl apropos dabbrev misearch multi-isearch dired help-mode python
rx comint ansi-color cc-langs cl cl-lib cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs git
log-edit ring pcvs-util add-log ewoc time recentf tree-widget wid-edit
easymenu saveplace desktop linum edmacro kmacro paren emacs-goodies-el
emacs-goodies-custom emacs-goodies-loaddefs easy-mmode time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment 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 macroexp 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)

-- 
Sergey