Subject: bug#8123: 24.0.50; [nnimap/Gnus] loose all flags if interrupted while entering a folder

From: Luca Capello <[email-masked]>
Date: Sat, 26 Feb 2011 16:37:26 +0100

Hi there!

This already happened in the past and it happened again with the latest
emacs-snapshot package, so it is sort of reproducible (but I do not want
to do that again, sorry).

I left my Gnus plugged to the IMAPs server, but then I inadvertently
plugged the cable out and before I realized that I entered the nnimap
group below.  Given that there was no more connection, Gnus was hanging
there and I pressed C-g: the result, when I re-connected to the server,
is that all the flags (unseen and ticked) in the group below were lost.
And I now need to restore them from my OfflineIMAP backup...

Here the relevant part from the `*imap log*` buffer:
=====
14:50:25 10277 SELECT "lists.Debian.devel.general"
14:50:25 10278 UID FETCH 8921,9000,9020,9029:9030,9311,9323,9331,9341:9344,9347,9349:9352,9355,9359,9362,9368,9371,9373,9378,9381:9383,9411,9432:9435,9440:9441,9682,9702,9704,9746,9754,9775,9777,9792,9794,9796,9818,9823:9824,9846,9848,9903,9910,9915,9918,9933,9951,9956,9958,9960,10020,10104,10106,10109:10110,10112,10114:10115,10117,10120:10121,10124,10126,10130,10133,10137:10138,10143,10147,10151,10159,10169,10185:10186,10212:10213,10215:10216,10239,10252,10255,10264,10270,10287:10288,10290:10291,10293:10294,10296:10306,10314:10315,10317,10319,10328,10334,10342,10348:10349,10351,10366,10373,10390,10396,10435,10478 (UID RFC822.SIZE BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS (Subject From Date Message-Id References In-Reply-To Xref To Newsgroups)])
14:50:29 10279 UID FETCH 10478 BODY.PEEK[]
14:50:53 10280 UID STORE 10478 +FLAGS.SILENT (\Seen)
15:01:13 10281 NOOP
15:01:13 10282 NOOP
15:04:48 10283 UID FETCH 8921,9000,9020,9029:9030,9311,9323,9331,9341:9344,9347,9349:9352,9355,9359,9362,9368,9371,9373,9378,9381:9383,9411,9432:9435,9440:9441,9682,9702,9704,9746,9754,9775,9777,9792,9794,9796,9818,9823:9824,9846,9848,9903,9910,9915,9918,9933,9951,9956,9958,9960,10020,10104,10106,10109:10110,10112,10114:10115,10117,10120:10121,10124,10126,10130,10133,10137:10138,10143,10147,10151,10159,10169,10185:10186,10212:10213,10215:10216,10239,10252,10255,10264,10270,10287:10288,10290:10291,10293:10294,10296:10306,10314:10315,10317,10319,10328,10334,10342,10348:10349,10351,10366,10373,10390,10396,10435 (UID RFC822.SIZE BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS (Subject From Date Message-Id References In-Reply-To Xref To Newsgroups)])
15:04:58 (inhibited)
15:04:58 10285 ENABLE QRESYNC
15:04:58 10286 SELECT "lists.Debian.devel.general"
15:04:59 10287 UID STORE 8921,9000,9020,9029:9030,9323,9341:9344,9347,9349:9352,9355,9359,9362,9371,9373,9378,9381:9383,9411,9432:9435,9440:9441,9682,9702,9704,9746,9754,9775,9777,9792,9794,9796,9846,9848,10020,10104,10106,10109:10110,10112,10114:10115,10117,10120:10121,10124,10126,10130,10133,10137:10138,10143,10147,10151,10159,10169,10185:10186,10212:10213,10215:10216,10239,10255,10264,10270,10287:10288,10290:10291,10293:10294,10296:10306,10314:10315,10317,10319,10328,10334,10342,10348:10349,10351,10373,10390,10396 +FLAGS.SILENT (\Seen)
15:05:00 10288 UID STORE 9311,9331,9368,9818,9823:9824,9903,9910,9915,9918,9933,9951,9956,9958,9960,10252,10366,10435 -FLAGS.SILENT (\Flagged)
=====

Thx, bye,
Gismo / Luca

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.0.50/etc/DEBUG.

In GNU Emacs 24.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2011-02-25 on keller, modified by Debian
 (emacs-snapshot package, version 1:20110224-1)
configured using `configure  '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.0.50/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-x=yes' '--with-x-toolkit=gtk' '--with-imagemagick=yes' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: en_US.UTF-8
  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: Fundamental

Minor modes in effect:
  csv-field-index-mode: t
  gpm-mouse-mode: t
  display-battery-mode: t
  display-time-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-c C-p C-p C-p C-p C-u RET ESC [ B ESC [ B ESC [ A 
C-g ^ ESC [ B ESC [ B ESC [ B ESC [ B C ESC [ A C ESC 
[ A ESC [ A C ESC [ B ESC [ A D D ESC [ A O ESC [ A 
ESC [ A ESC [ A D ESC [ A O O q g L C-x b M e s s a 
RET ESC < ESC > C-x b i m a TAB l o TAB ESC < ESC > 
ESC v ESC v ESC v ESC v ESC v ESC v ESC > ESC < C-s 
d e b i a n . d e v e l C-s C-s C-s C-s C-s C-s C-s 
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s 
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s 
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s 
C-s C-s C-s C-s C-s ESC > C-r d e b i a n . d e v e 
l C-r C-r C-r C-r C-r C-r C-r C-r C-r C-p C-a C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-@ 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-p ESC w ESC x d e b i a TAB C-g ESC x r e 
p o r t - e m TAB b u TAB RET

Recent messages:
nnimap read 238k [5 times]
nnimap read 239k [6 times]
Reading active file via nndraft...done
Checking new news...done
Mark set [6 times]
Mark saved where search started
Mark set
Mark saved where search started
Mark set
Auto-saving...done
Quit

Load-path shadows:
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font
/usr/share/emacs/24.0.50/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp
/usr/share/emacs/24.0.50/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik
/usr/share/emacs/24.0.50/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-fptex hides /usr/share/emacs/site-lisp/auctex/tex-fptex
/usr/share/emacs/24.0.50/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style
/usr/share/emacs/24.0.50/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex
/usr/share/emacs/24.0.50/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite
/usr/share/emacs/24.0.50/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex
/usr/share/emacs/24.0.50/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar
/usr/share/emacs/24.0.50/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex
/usr/share/emacs/24.0.50/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en
/usr/share/emacs-snapshot/site-lisp/psgml/psgml hides /usr/share/emacs/site-lisp/psgml/psgml
/usr/share/emacs-snapshot/site-lisp/psgml/psgml-other hides /usr/share/emacs/site-lisp/psgml/psgml-other
/usr/share/emacs-snapshot/site-lisp/psgml/psgml-init hides /usr/share/emacs/site-lisp/psgml/psgml-init
/usr/share/emacs-snapshot/site-lisp/psgml/psgml-sysdep hides /usr/share/emacs/site-lisp/psgml/psgml-sysdep
/usr/share/emacs-snapshot/site-lisp/psgml/psgml-html hides /usr/share/emacs/site-lisp/psgml/psgml-html
/usr/share/emacs/24.0.50/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/local/share/emacs/site-lisp/fortune hides /usr/share/emacs/24.0.50/lisp/play/fortune
/usr/share/emacs-snapshot/site-lisp/emms/tq hides /usr/share/emacs/24.0.50/lisp/emacs-lisp/tq

Features:
(shadow emacsbug csv-mode flow-fill newcomment ffap w3m-form
gnus-registry mule-util help-mode gnus-dup multi-isearch ansi-color
mail-extr gnus-async qp time-stamp gnus-bcklg bbdb-hooks epa-mail
gnus-cite footnote gnus-draft gnus-ml pop3 gnus-topic nndraft nnmh nndoc
utf-7 rot13 disp-table nnimap parse-time utf7 netrc nnml nnfolder nnnil
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-cache ielm
t-mouse server hideshow gismo-full-emacs lisppaste xml-rpc ratpoison
ratpoisonrc-mode generic generic-x mpcel gismo-emacs gismo-modes battery
time ido paredit paren dna-mode cldoc eldoc gismo-w3m w3m-search
w3m-session gismo-tidy tidy compile comint ring gismo-popup
gismo-planner planner-calendar planner-diary bbdb-anniv planner-w3m
planner-lisp planner-gnus planner-erc planner-bbdb timeclock view
cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew holidays
hol-loaddefs appt diary-lib diary-loaddefs icalendar gismo-keybindings
nroff-mode under dictionary link connection w3m doc-view jka-compr
image-mode w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon
w3m-image w3m-proc w3m-util planner warnings cal-menu calendar
cal-loaddefs muse-html muse-xml-common muse-colors muse-publish
muse-project muse-protocols info muse-regexps muse muse-nested-tags
muse-mode gismo-gnus gnus-demon nntp proto-stream starttls tls spam
spam-stat gnus-uu yenc gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime
smime dig nnir gnus-sum macroexp gnus-group gnus-undo gnus-start
gnus-spec gnus-win browse-url nnrss xml mm-url 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 assoc password-cache
url-vars mailcap nnmail gnus-int gnus-range mail-source message sendmail
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
gmm-utils mailheader nnoo gnus gnus-ems nnheader gnus-util time-date
mail-utils gnus-BTS gismo-files gismo-eudc eudcb-ldap eudcb-bbdb
bbdb-com mailabbrev cl eudc eudc-options-file cus-edit cus-start
cus-load eudc-vars wid-edit ldap gismo-eshell gismo-erc erc-stamp
erc-log erc-dcc erc-goodies erc erc-backend erc-compat format-spec
thingatpt pp gismo-emms emms-playing-time emms-mode-line
emms-info-libtag emms-volume emms-volume-amixer emms-playlist-mode
emms-browser sort emms-playlist-sort emms-score emms-player-mpd tq
emms-stream-info emms-streams emms-source-playlist emms-source-file
dired emms-cache emms-info later-do emms-player-mplayer
emms-player-simple emms-setup emms emms-compat gismo-easypg epa derived
epg epg-config gismo-dired gismo-debian debian-bug rfc2047 rfc2045
ietf-drums mm-util mail-prsvr gismo-broken gismo-bbdb bbdb timezone
gismo-auctex latex tex-style tex regexp-opt advice help-fns
advice-preload easymenu gismo-functions-insert gismo-functions
bg-shell-command unicode-helper edmacro kmacro planner-autoloads
debian-el debian-el-loaddefs w3m-load psgml-init muse-autoloads
emms-auto emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs
easy-mmode dpkg-dev-el dpkg-dev-el-loaddefs bbdb-autoloads preview-latex
tex-site auto-loads 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 loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)