After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 587739 - Evolution stopped functioning after network outage
Evolution stopped functioning after network outage
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.28.x (obsolete)
Other All
: Normal major
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2009-07-04 12:16 UTC by Ruchir Brahmbhatt
Modified: 2013-09-13 01:03 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28



Description Ruchir Brahmbhatt 2009-07-04 12:16:03 UTC
Please describe the problem:
I had some network outage and I had to switch between lan and wifi several times. After that I had to settle with wifi. But since then evolution is repeatedly giving errors while refreshing inbox folder. When I run from gdb, i see lots of errors like below:

(evolution.bin:12841): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 3 char 57: Invalid UTF-8 encoded text in name - not valid 'Could not open '\xe0\xd9\xd4\u0008mob/Accounts':
No such folder \xe0\xd9\xd4\u0008mob/Accounts
Changes made to this folder will not be resynchronized.'


Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?
Yes

Other information:
Comment 1 Ruchir Brahmbhatt 2009-07-04 12:55:43 UTC
I'm not able to move any mail from inbox to other folders.
Comment 2 Ruchir Brahmbhatt 2009-07-04 13:02:53 UTC
Sorry I missed to provide some details.
Account: Gmail IMAP(Download offline enabled)
Comment 3 Ruchir Brahmbhatt 2009-07-07 05:15:23 UTC
When I click warning icon, I see following error.

Could not open '':
No such folder 
Changes made to this folder will not be resynchronized
Comment 4 Ruchir Brahmbhatt 2009-07-07 05:16:23 UTC
Another error I see while refreshing inbox is as below:

Error while Refreshing folder.

Cannot write offline journal for folder 'INBOX': Success
Comment 5 Ruchir Brahmbhatt 2009-07-07 09:25:29 UTC
Another error I see is as below:

Cannot write offline journal for folder 'INBOX': No such file or directory
Comment 6 Milan Crha 2009-07-07 09:53:51 UTC
It seems your summary got broken meanwhile you switched from one connection to the other. The final result seems to be that Evolution is offline. Do you see in evolution's File menu Work Online or Work Offline menu item at the bottom? Try to go online, if you are in offline, then close evolution, do evolution --force-shutdown and start evolution from the console. It might fetch your folder list again, and fix possible issues with that.
Comment 7 Ruchir Brahmbhatt 2009-07-07 10:46:31 UTC
I tried going offline-online several times. I tried restarting also(even laptop). Tried starting form console but no luck. I still see those errors and warning and still can't move messages from inbox.
Comment 8 Ruchir Brahmbhatt 2009-07-07 11:04:12 UTC
By the way I see two inbox folders in folders directory of mailbox on disk; "inbox" and "INBOX" not sure if it was there previously or it has something to do with this problem.
Comment 9 Ruchir Brahmbhatt 2009-07-07 11:31:43 UTC
Further I noticed that for each folder having name in all capital letters, there is one corresponding folder in lowercase also. Is it normal?
Comment 10 Milan Crha 2009-07-07 11:47:59 UTC
No, it isn't normal. it seems you summary got broken for some reason. Just to be sure, All this you see is within your IMAP GMail account, thus the rest,
under On This Computer node is all fine, right?

Please try this:
a) in running evolution make a backup, File->Backup Settings
b) when done, close evolution, run also evolution --force-shutdown
c) ~/.evolution/mail/imap contains all your IMAP accounts and a local cache
   of remote messages. If you've only a GMail IMAP account then you see only
   one folder there. Move it somewhere else.
d) Run evolution; it'll fetch all the IMAP account information again, hopefully
   will fix all the bad things you see in the folder tree.

Is it possible your evolution crashed which you were playing with your network connection? It's the only user's possibility I can think of, how you could get your local account cache broken.
Comment 11 Ruchir Brahmbhatt 2009-07-07 12:02:57 UTC
In that case I may loose all my offline data which is quite big :(

Evolution didn't crash but I think I killed it(using kill window utility of kde) as it was not closing. I should have used evolution --force-shutdown instead?
Comment 12 Milan Crha 2009-07-07 12:27:05 UTC
(In reply to comment #11)
> In that case I may loose all my offline data which is quite big :(

With IMAP all you have is stored on the server, thus you do not loose anything (though I do not know your exact setup). That's the reason why to have a backup, when something goes wrong you can always go back. Or you can try to remove only ~/.evolution/mail/imap/<account>/folders.db
file, where is stored only information about your remote account. Anyway, do backup before playing with files.

> Evolution didn't crash but I think I killed it(using kill window utility of
> kde) as it was not closing. I should have used evolution --force-shutdown
> instead?

No, it's pretty the same thing.
Comment 13 Ruchir Brahmbhatt 2009-07-07 12:46:36 UTC
I mean downloaded mails from laptop might be lost and have to download from imap server again. By the way I tried deleting folders.db but that didn't help. I'll try the steps mentioned in Comment #10.
Comment 14 Ruchir Brahmbhatt 2009-07-07 13:09:55 UTC
That did fix the issue. Thanks a lot for the hint!
One question. I have enabled option "Automatically synchronize remote mail locally" in receiving options of account. Do I still have to enable download mails for offline usage from each folder? I have lots of folders and enabling this option individually is very tedious. 
Comment 15 Milan Crha 2009-07-07 14:47:47 UTC
That should be enough to enable (check) the option in the account preferences, not necessary to check on every single folder. I recall some issues, as not working, with respect of the global option, but I think it got fixed some time ago. If not, please open a new bug report for that (and possibly CC me there). Thanks in advance.

The broken summary, I'm interested in one thing, if you could try for me, please unpack this file from your backup
   mail/imap/<account>/folders.db
and run this command on it:
   $ sqlite3 folders.db "PRAGMA integrity_check;"
I'm only interested whether it returns any error, or just "ok" on the broken summary file.

I consider this as fixed, and closing it. There is for example a crashing bug #583179 about the similar, though it doesn't crash for you.
Comment 16 Ruchir Brahmbhatt 2009-07-07 17:13:33 UTC
I'll test that option thoroughly and open new report if doesn't work well.

I ran that cmd and got "ok" in result.

Comment 17 Ruchir Brahmbhatt 2009-07-08 07:12:30 UTC
I tested and it doesn't download mails if that option enabled. So I filed bug #588044.
Comment 18 Ruchir Brahmbhatt 2009-08-20 13:39:19 UTC
It happened to me again today. I think there should be some mechanism which prevents corruption of summary for such small issues like network outage or force-restart.
Comment 19 Milan Crha 2009-08-20 14:04:36 UTC
(In reply to comment #18)
> It happened to me again today. I think there should be some mechanism which
> prevents corruption of summary for such small issues like network outage or
> force-restart.

I agree with a network outage, but for a --force-shutdown it's impossible, as you are killing the process immediately, no matter what it is doing at the moment. Thus if it's in the middle of saving the db file...
Comment 20 Ruchir Brahmbhatt 2009-08-20 14:06:18 UTC
(In reply to comment #19)
> I agree with a network outage, but for a --force-shutdown it's impossible, as
> you are killing the process immediately, no matter what it is doing at the
> moment. Thus if it's in the middle of saving the db file...

Isn't it possible to kill process only after saving the db file? Network operations can be skipped but db file should be updated before killing the process.
Comment 21 Matthew Barnes 2009-08-20 15:29:55 UTC
Knowing when the database save is complete implies the program isn't deadlocked and doesn't need to be forced to shutdown to begin with.
Comment 22 Ruchir Brahmbhatt 2009-08-21 04:39:06 UTC
(In reply to comment #21)
> Knowing when the database save is complete implies the program isn't deadlocked
> and doesn't need to be forced to shutdown to begin with.

Just to confirm if I understand correctly, does that mean we have to wait and not do --force-shutdown no matter whatever time it takes to close?
Comment 23 Matthew Barnes 2009-08-21 13:15:04 UTC
It means --force-shutdown always carries a risk of data corruption.
Comment 24 Ruchir Brahmbhatt 2009-08-25 10:42:56 UTC
I think some steps should be taken to prevent data corruption. Today evolution hanged while rendering a mail. I connected with gdb and noticed this. But the only way out of this situations was to do --force-shutdown which may cause account data corruption. I was very afraid to do it but I had no choice. Fortunately this time it didn't corrupt my account. :)