GNOME Bugzilla – Bug 751657
ESource can be removed after its property change
Last modified: 2015-08-05 14:25:23 UTC
IMAP accounts added in evolution (not using gnome-online-accounts) are deleted if I don't save the password in the keyring or I try to edit their properties. After the account is deleted, its .source file in ~/.config/evolution/sources is also deleted. I use evolution git master branch.
Thanks for a bug report. I tried to reproduce it with 3.17.3, but no luck. The IMAP account I added sticks evolution restarts with no problem. I didn't save a password for it, and I even changed its name and successfully saved it, which left the account in the view as expected. I need more detailed information and some investigation on your side. As the starter, please run from the console: $ ESR_DEBUG=1 /usr/libexec/evolution-source-registry (or from the PREFIX you build evolution-data-server to), then reproduce the issue and watch what will be shown on the console. Preferably run also evolution form the console, with no extra debugging flags, just to see what it writes there.
After I completed all steps in adding account, evolution-source-registry showed: Handling file monitor event 3 for URI: file:///home/lantw44/.config/evolution/sources/1435781670.83538.4@fbwn.sourceHandling file monitor event 3 for URI: file:///home/lantw44/.config/evolution/sources/1435781670.83538.0@fbwn.sourceHandling file monitor event 3 for URI: file:///home/lantw44/.config/evolution/sources/1435781672.83538.14@fbwn.sourceHandling file monitor event 1 for URI: file:///home/lantw44/.config/evolution/sources/1435781670.83538.4@fbwn.sourceHandling file monitor event 1 for URI: file:///home/lantw44/.config/evolution/sources/1435781670.83538.0@fbwn.sourceHandling file monitor event 1 for URI: file:///home/lantw44/.config/evolution/sources/1435781672.83538.14@fbwn.source After I entered my password and chose not to save the password, evolution-source-registry showed: Saving 1435781670.83538.4@fbwn : [Data Source] : DisplayName=Personal : Enabled=true : Parent= : : [Offline] : StaySynchronized=true : : [Refresh] : Enabled=true : IntervalMinutes=3 : : [Authentication] : Host=imap.some.domain : Method=none : Port=993 : ProxyUid=system-proxy - : RememberPassword=true + : RememberPassword=false : User=lantw44 : CredentialName= : : [Mail Account] : BackendName=imapx : IdentityUid=1435781670.83538.0@fbwn : ArchiveFolder= : : [Security] : Method=ssl-on-alternate-port : : [Imapx Backend] : FilterInbox=true : BatchFetchCount=500 : CheckAll=true : CheckSubscribed=true : ConcurrentConnections=3 : FetchOrder=ascending : FilterAll=false : FilterJunk=false : FilterJunkInbox=false : Namespace= : RealJunkPath= : RealTrashPath= : ShellCommand=ssh -C -l %u %h exec /usr/sbin/imapd : UseIdle=true : UseNamespace=false : UseQresync=true : UseRealJunkPath=false : UseRealTrashPath=false : UseShellCommand=false : UseSubscriptions=true : IgnoreOtherUsersNamespace=false : IgnoreSharedFoldersNamespace=false : Handling file monitor event 2 for URI: file:///home/lantw44/.config/evolution/sources/1435781670.83538.4@fbwn.sourceRemoving 1435781670.83538.0@fbwn ('Source_37') Removing 1435781672.83538.14@fbwn ('Source_38') Removing 1435781670.83538.4@fbwn ('Source_36') Handling file monitor event 3 for URI: file:///home/lantw44/.config/evolution/sources/1435781670.83538.4@fbwn.sourceRemoving 1435781670.83538.0@fbwn ('Source_37') Removing 1435781672.83538.14@fbwn ('Source_38') Removing 1435781670.83538.4@fbwn ('Source_36') Handling file monitor event 1 for URI: file:///home/lantw44/.config/evolution/sources/1435781670.83538.4@fbwn.source (evolution-source-registry:83512): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed Handling file monitor event 2 for URI: file:///home/lantw44/.config/evolution/sources/1435781670.83538.4@fbwn.sourceRemoving 1435781670.83538.0@fbwn ('Source_37') Removing 1435781672.83538.14@fbwn ('Source_38') Removing 1435781670.83538.4@fbwn ('Source_36') Handling file monitor event 2 for URI: file:///home/lantw44/.config/evolution/sources/1435781670.83538.0@fbwn.sourceHandling file monitor event 2 for URI: file:///home/lantw44/.config/evolution/sources/1435781672.83538.14@fbwn.source evolution showed (messages can be different when I try it next time): (evolution:83538): camel-CRITICAL **: camel_session_idle_add: assertion 'CAMEL_IS_SESSION (session)' failed (evolution:83538): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed (evolution:83538): GLib-GIO-CRITICAL **: g_network_address_set_addresses: assertion 'addresses != NULL && addr->priv->sockaddrs == NULL' failed (evolution:83538): GLib-GIO-CRITICAL **: g_network_address_set_addresses: assertion 'addresses != NULL && addr->priv->sockaddrs == NULL' failed ** (evolution:83538): CRITICAL **: mail_session_configure_proxy_resolver: assertion 'source != NULL' failed ** (evolution:83538): CRITICAL **: mail_session_add_service: assertion 'source != NULL' failed (evolution:83538): evolution-mail-CRITICAL **: e_mail_account_store_add_service: assertion 'source != NULL' failed ** (evolution:83538): CRITICAL **: mail_session_add_service: assertion 'source != NULL' failed And my newly added IMAP account was deleted. If I don't close evolution, it shows more messages after several minutes: (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Archives_preview (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Archives (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Archives (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Archives camel-imapx-Message: Unable to load summary: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Cron_preview (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Cron (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Cron (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Cron camel-imapx-Message: Unable to load summary: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Drafts_preview (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Drafts (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Drafts (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Drafts camel-imapx-Message: Unable to load summary: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Sent_preview (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Sent (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Sent (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Sent camel-imapx-Message: Unable to load summary: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Trash_preview (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Trash (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Trash (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.Trash camel-imapx-Message: Unable to load summary: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.root_preview (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.root (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.root (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.root camel-imapx-Message: Unable to load summary: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX_preview (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX camel-imapx-Message: Unable to load summary: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX_preview (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX_preview (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX_preview (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX_preview (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: attempt to write a readonly database (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX_preview (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX (evolution:83538): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: no such table: main.INBOX Archives, Cron, Drafts, ... are folders in the deleted IMAP account.
Most recent changes in the related code were done in bug #751119. That is included in the 3.17.3 I tested with, but they also may not cause removals of the source. Maybe my file monitor is not that quick as that yours, and a file overwrite is not treated as file remove and create. I'll test this. The errors on the evolution side are caused by the incorrect removal, I'd not bother with them right now. The code 1 stands for G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT. The code 2 stands for G_FILE_MONITOR_EVENT_DELETED. The code 3 stands for G_FILE_MONITOR_EVENT_CREATED.
I just now extended (and partly corrected) the debugging output of the "Handling file monitor event", thus it's easier to read. I tried here to change an option only, which meant to right-click the account in the folder tree, choose Properties, on Receiving tab turning on/off the Quick resync option and finally saving the change with the OK button. The debugging output of the evolution-source-registry console is: > ... > > : UseIdle=true > : UseNamespace=false > - : UseQresync=false > + : UseQresync=true > : UseRealJunkPath=true > > ... > Handling file monitor event CREATED (3) for URI: file:///home/mcrha/.config/evolution/sources/.goutputstream-CLC50X > Handling file monitor event ATTRIBUTE_CHANGED (4) for URI: file:///home/mcrha/.config/evolution/sources/.goutputstream-CLC50X > Handling file monitor event CHANGES_DONE_HINT (1) for URI: file:///home/mcrha/.config/evolution/sources/1373559007.9908.6@zyxPad.source > Handling file monitor event CHANGED (0) for URI: file:///home/mcrha/.config/evolution/sources/.goutputstream-CLC50X > Handling file monitor event CHANGES_DONE_HINT (1) for URI: file:///home/mcrha/.config/evolution/sources/.goutputstream-CLC50X > Handling file monitor event DELETED (2) for URI: file:///home/mcrha/.config/evolution/sources/.goutputstream-CLC50X > Handling file monitor event CREATED (3) for URI: file:///home/mcrha/.config/evolution/sources/1373559007.9908.6@zyxPad.source > Handling file monitor event CHANGES_DONE_HINT (1) for URI: file:///home/mcrha/.config/evolution/sources/1373559007.9908.6@zyxPad.source > Handling file monitor event CHANGES_DONE_HINT (1) for URI: file:///home/mcrha/.config/evolution/sources/1373559007.9908.6@zyxPad.source where the main difference is that my (file) system uses temporary file, instead of delete & create on the main .source file. That's the main issue, I believe, but I do not know why your system does things differently. Let's pile the file monitor events and postpone their processing for 3 seconds, to gather them all together, thus from the above sequence only the last wins, which is the CHANGES_DONE_HINT. It seems to do the trick here. Please test on your system and let me know. Thanks in advance. Created commit 5736bd5 in eds master (3.17.4+)
Thanks. The problem is fixed, and the output is easier to read now. Here is the output of evolution-source-registry: Handling file monitor event CREATED (3) for URI: file:///home/lantw44/.config/evolution/sources/1435945540.39122.4@fbwn.source Handling file monitor event CREATED (3) for URI: file:///home/lantw44/.config/evolution/sources/1435945540.39122.0@fbwn.source Handling file monitor event CREATED (3) for URI: file:///home/lantw44/.config/evolution/sources/1435945541.39122.14@fbwn.source Handling file monitor event CHANGES_DONE_HINT (1) for URI: file:///home/lantw44/.config/evolution/sources/1435945540.39122.4@fbwn.source Handling file monitor event CHANGES_DONE_HINT (1) for URI: file:///home/lantw44/.config/evolution/sources/1435945540.39122.0@fbwn.source Handling file monitor event CHANGES_DONE_HINT (1) for URI: file:///home/lantw44/.config/evolution/sources/1435945541.39122.14@fbwn.source Processing file monitor event CHANGES_DONE_HINT (1) for UID: 1435945541.39122.14@fbwn Processing file monitor event CHANGES_DONE_HINT (1) for UID: 1435945540.39122.4@fbwn Processing file monitor event CHANGES_DONE_HINT (1) for UID: 1435945540.39122.0@fbwn Saving 1435945540.39122.4@fbwn : [Data Source] : DisplayName=Personal : Enabled=true : Parent= : : [Offline] : StaySynchronized=true : : [Refresh] : Enabled=true : IntervalMinutes=3 : : [Authentication] : Host=imap.some.domain : Method=none : Port=993 : ProxyUid=system-proxy - : RememberPassword=true + : RememberPassword=false : User=lantw44 : CredentialName= : : [Mail Account] : BackendName=imapx : IdentityUid=1435945540.39122.0@fbwn : ArchiveFolder= : : [Security] : Method=ssl-on-alternate-port : : [Imapx Backend] : FilterInbox=true : BatchFetchCount=500 : CheckAll=true : CheckSubscribed=true : ConcurrentConnections=3 : FetchOrder=ascending : FilterAll=false : FilterJunk=false : FilterJunkInbox=false : Namespace= : RealJunkPath= : RealTrashPath= : ShellCommand=ssh -C -l %u %h exec /usr/sbin/imapd : UseIdle=true : UseNamespace=false : UseQresync=true : UseRealJunkPath=false : UseRealTrashPath=false : UseShellCommand=false : UseSubscriptions=true : IgnoreOtherUsersNamespace=false : IgnoreSharedFoldersNamespace=false : Handling file monitor event DELETED (2) for URI: file:///home/lantw44/.config/evolution/sources/1435945540.39122.4@fbwn.source Handling file monitor event CREATED (3) for URI: file:///home/lantw44/.config/evolution/sources/1435945540.39122.4@fbwn.source Handling file monitor event CHANGES_DONE_HINT (1) for URI: file:///home/lantw44/.config/evolution/sources/1435945540.39122.4@fbwn.source Processing file monitor event CHANGES_DONE_HINT (1) for UID: 1435945540.39122.4@fbwn
After using gdb to break on g_file_replace, I found the .goutputstream-XXXXXX temporary file did exist on my system. I guess the problem is that some file monitor events get lost on my system. If I run this simple program in ~/.config/evolution/sources: #include <fcntl.h> #include <stdio.h> int main (){ open("old", O_WRONLY | O_EXCL | O_CREAT, 600); rename("old", new"); return 0; } The output of evolution-source-registry is: Handling file monitor event DELETED (2) for URI: file:///home/lantw44/.config/evolution/sources/new Handling file monitor event CREATED (3) for URI: file:///home/lantw44/.config/evolution/sources/new Handling file monitor event CHANGES_DONE_HINT (1) for URI: file:///home/lantw44/.config/evolution/sources/new If I run 'touch old && mv -f old new' instead, I get: Handling file monitor event CREATED (3) for URI: file:///home/lantw44/.config/evolution/sources/old Handling file monitor event CHANGES_DONE_HINT (1) for URI: file:///home/lantw44/.config/evolution/sources/old Handling file monitor event DELETED (2) for URI: file:///home/lantw44/.config/evolution/sources/old Handling file monitor event CREATED (3) for URI: file:///home/lantw44/.config/evolution/sources/new Handling file monitor event CHANGES_DONE_HINT (1) for URI: file:///home/lantw44/.config/evolution/sources/new I think this means kqueue backend of file monitor is too slow to handle events. As the kernel doesn't tell applications the name of added file, finding it requires saving the directory content before the event and calculating the difference after the event. (found in gio/kqueue/kqueue-helper.c, function process_kqueue_notifications and _kh_dir_diff)
Aha, good, that explains it pretty well. I cheated in the code to simulate yours deleted&created events order too.
*** Bug 752833 has been marked as a duplicate of this bug. ***
Bug #752833 mentions similar issue spotted in 3.16.4, while the change from this bug fixes it, thus: Created commit 045d515 in eds gnome-3-16 (3.16.5+)