Bug 1204967 - Claws Mail keeps forgetting its configuration
Summary: Claws Mail keeps forgetting its configuration
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: claws-mail
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andreas Bierfert
QA Contact: Fedora Extras Quality Assurance
URL: http://www.thewildbeast.co.uk/claws-m...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-23 22:32 UTC by Björn Persson
Modified: 2015-12-02 17:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-02 10:26:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Björn Persson 2015-03-23 22:32:44 UTC
Description of problem:
After I upgraded to Fedora 21 most of the configuration in Claws Mail was gone. I reconfigured it all, but since then I've been struggling to get some settings to stick, such as which mail folders should be shown as unread mail in the tray icon.

Today I updated some packages, *not* including claws-mail, and rebooted, and now the configuration is mostly wiped out again. The mail accounts are still there, but all the plugins are gone, column widths are all crazy, the date format, fonts, whether to check for mail periodically, spell-check dictionaries and other settings are back to what I assume are the defaults.

I will have to go looking for another email program yet again, because this is unusable.

Version-Release number of selected component (if applicable):
claws-mail-3.11.1-3.fc21.x86_64

Comment 1 Michael Schwendt 2015-03-23 23:19:32 UTC
Kindly visit the upstream website and tell the Claws Mail developers:

  http://www.claws-mail.org/

Visit the users@ mailing-list where the developers prefer to discuss problems before rushing off into bugzilla.

But let me point out that your descriptions sounds very weird. And there are no details at all about your runtime environment.

Have you done any trouble-shooting yet?
What are the steps on how to reproduce the problem?
What do you discover in your $HOME/.claws-mail folder when it happens? Save a backup of that folder (particularly the config files), reproduce the problem, draw conclusions.

> I will have to go looking for another email program yet again,
> because this is unusable.

It's not a good idea to write something like that because people understand it as a threat, and that isn't helpful.

Comment 2 Björn Persson 2015-03-25 17:22:25 UTC
As should already be obvious from my description I don't know of a way to trigger the bug at will. Bugs that just happen sporadically for no apparent reason are very difficult for a user to troubleshoot. If I were familiar with the source I'd probably have an idea of where to start looking, but I'm not, so I don't.

Comment 3 Michael Schwendt 2015-03-25 21:02:43 UTC
Then you are just too lazy to collect some data. :-/

You are the first to report the problem at Fedora. We are aware of other Fedora users running Claws Mail for a long time. Apparently they are not affected.

I've been using Claws Mail (and Sylpheed before that) for several years and have never encountered such an issue. I remember metadata handling issues from a few years ago (Preferences > Other > Miscellaneous > Metadata handling), but the default is "Safer" for a long time.

Interesting and possibly relevant could be:

 - the desktop environment

 - the file system you use

 - your reboot/shutdown habits - do you quit Claws Mail before shutting down?

[...]

Look what I've just seen fly by on Claws Mail users@ list:
http://lists.claws-mail.org/pipermail/users/2015-March/012622.html

That user mentions:
  |  I should add that I don't manually quit Claws-Mail at system shutdown.

Perhaps there is some corner-case that isn't easy to trigger.

Comment 4 Simo Sorce 2015-03-25 21:39:42 UTC
When I use claws mail I noticed it never saves options until you exit cleanly.
And because it recentely was crashing quite often, I ofetn found myself w/o all the recent options I changed.
I wanted to investigate it before reporting and then forgot.
It seem quite easy to reproduce, just configure something then kill claws ... even minutes later.

Comment 5 Michael Schwendt 2015-03-25 21:46:19 UTC
That sounds different from "wiping out a previously saved configuration".

Comment 7 Björn Persson 2015-03-28 20:51:26 UTC
(In reply to Michael Schwendt (Fedora Packager Sponsors Group) from comment #3)
> Then you are just too lazy to collect some data. :-/

If by "lazy" you mean "works 40 hours a week, must sleep, eat and do housework, and struggles in the little time that remains to solve the most disrupting computer problems faster than new problems appear".

> Interesting and possibly relevant could be:
>
>  - the desktop environment

XFCE

>  - the file system you use

ext4

>  - your reboot/shutdown habits - do you quit Claws Mail before shutting down?

Usually not. I tend to leave it running all the time, and let the logout procedure shut it down so that it will be started automatically after the reboot.

> Look what I've just seen fly by on Claws Mail users@ list:
> http://lists.claws-mail.org/pipermail/users/2015-March/012622.html

That seems very similar to my greater problem, that large parts of the configuration get wiped out.

Jérôme says that he can restore the configuration by renaming clawsrc.bak to clawsrc. When I first looked in ~/.claws-mail after the configuration had been wiped out, clawsrc contained a blank line followed by "[Plugins_GTK2]" and another blank line, and clawsrc.bak contained nothing but a single linefeed character, but by then I had already adjusted some column widths and clicked around in the Preferences window. clawsrc.backup contains lots of settings, but is over two years old.

(In reply to Simo Sorce from comment #4)
> When I use claws mail I noticed it never saves options until you exit
> cleanly.
> And because it recentely was crashing quite often, I ofetn found myself w/o
> all the recent options I changed.

That might explain my lesser problem, that recent configuration changes sometimes don't seem to stick. It hasn't been crashing all that often to me, but I probably won't notice if it crashes instead of shutting down cleanly when I log out.

> It seem quite easy to reproduce, just configure something then kill claws
> ... even minutes later.

I can confirm that toggling the checkbox "Check for new mail on start-up" and clicking OK doesn't immediately update clawsrc or clawsrc.bak, but when I test shutting down Claws Mail it always saves clawsrc as clawsrc.bak and updates clawsrc. I have tested File → Exit, Ctrl-Q, Alt-F4, the × button, the TERM, INT and HUP signals, and XFCE's logout and reboot buttons. The QUIT signal made it dump core but that's probably normal.

I think it should save settings immediately instead of when shutting down, but I haven't really reproduced any problem so far.

Comment 8 Michael Schwendt 2015-03-29 16:25:24 UTC
A response to comment 6 would have been great.

To sum up, please quit Claws Mail when you want the preferences to be saved to disk, and as a work-around for this issue also quit Claws Mail before rebooting/shutting down.

[...]

Some of what you write in comment 7 sounds like different symptoms (e.g. a truncated clawsrc). And for the crashes you refer to, Fedora usually runs ABRT to intercept them and offer submitting reports in bugzilla. It could be that ABRT is not enabled in XFCE.

Comment 9 Björn Persson 2015-03-29 17:15:16 UTC
(In reply to Michael Schwendt (Fedora Packager Sponsors Group) from comment #8)
> A response to comment 6 would have been great.

Well, I haven't managed to confirm or disprove anything, but if it sometimes crashes between those two renamings, then that would be a plausible explanation for my greater problem.

Copying instead of renaming in the first step will prevent a race condition only if the OS offers an atomic operation that replaces a file with another. Otherwise the second step becomes two steps – delete clawsrc and then rename clawsrc.tmp – and the race condition is back. I don't know whether there is such an atomic operation on all of the OSes where Claws Mail runs, but if not, then I suggest instead to automatically look for clawsrc.bak if clawsrc is missing.

> And for the crashes you refer to, Fedora usually runs
> ABRT to intercept them and offer submitting reports in bugzilla. It could be
> that ABRT is not enabled in XFCE.

ABRT seems to be nonfunctional on this box since I moved to Fedora 21, but it works in my other Fedora 21 system.

Comment 10 Michael Schwendt 2015-03-29 17:28:02 UTC
> Copying instead of renaming in the first step will prevent
> a race condition only if the OS offers an atomic operation
> that replaces a file with another.

Which is _not_ the goal of copying clawsrc to clawsrc.bak.

If Claws Mail gets killed or crashes while copying clawsrc to clawsrc.bak, you've lost anyway. Crashes are fatal. And getting killed while processing a shutdown handler is similar.

However, if the copying succeeds, the current clawsrc would still be available, and the final atomic rename from clawsrc.tmp to clawsrc would not start with a missing clawsrc that has been renamed earlier.

Comment 11 Björn Persson 2015-06-27 15:43:49 UTC
It happened again: I rebooted, and when Claws Mail restarted the column widths were all wrong. (I haven't yet managed to replace Claws Mail entirely. Kmail was still unable to get attachments in signed messages right when I last checked.)

As I now recognize the symptom with the column widths I didn't touch anything in the GUI but immediately listed the contents of ~/.claws-mail. It contained these files:

-rw-------. 11446 19 jan  2013 clawsrc.backup
-rw-------. 11061 27 jun 13.55 clawsrc.bak
-rw-------. 11061 27 jun 13.55 clawsrc.tmp

clawsrc was missing, and clawsrc.bak and clawsrc.tmp were identical.

I closed Claws Mail, and then ~/.claws-mail contained these files:

-rw-------.  9361 27 jun 15.08 clawsrc
-rw-------. 11446 19 jan  2013 clawsrc.backup
-rw-------. 11061 27 jun 13.55 clawsrc.bak

I copied clawsrc.bak to clawsrc and started Claws Mail, and now the configuration is back to how it was.

This seems to confirm that what I've called my greater problem happens when Claws Mail crashes or gets killed after renaming clawsrc to clawsrc.bak but before renaming clawsrc.tmp to clawsrc.

It should be quite possible to look for clawsrc.bak or clawsrc.tmp if clawsrc is missing when the program starts, and do this recovery automatically.

Comment 12 Fedora End Of Life 2015-11-04 15:29:23 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 13 Fedora End Of Life 2015-12-02 10:27:00 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.