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 785618 - Unread mail count in IMAP folder not always updated
Unread mail count in IMAP folder not always updated
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.24.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2017-07-31 09:30 UTC by André Klapper
Modified: 2017-09-13 09:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (407.76 KB, image/png)
2017-07-31 09:30 UTC, André Klapper
Details
gdb output (329.26 KB, text/plain)
2017-09-07 12:56 UTC, André Klapper
Details
gdb output 2 (241.02 KB, text/plain)
2017-09-07 21:31 UTC, André Klapper
Details
gdb output 3 (93.88 KB, text/plain)
2017-09-08 11:34 UTC, André Klapper
Details
Status bar screenshot (9.57 KB, image/png)
2017-09-10 12:54 UTC, André Klapper
Details

Description André Klapper 2017-07-31 09:30:40 UTC
Created attachment 356625 [details]
Screenshot

evolution-3.24.4-1.1.fc26.x86_64
evolution-data-server-3.24.4-1.1.fc26.x86_64

1. I am not connected to a wifi/wlan.
2. Evolution somehow thinks I am online (maybe because I suspended the
   device when I was connected to a wifi)
3. I go through mail in a subfolder of my GMail inbox and mark some as read
4. The unread count is not updated in some places.
Comment 1 Milan Crha 2017-07-31 10:17:11 UTC
Thanks for a bug report. Could you capture a backtrace of the running evolution when this happens again, please? I'd guess that the folder in question is somehow locked to propagate changes, but I can be wrong. This can be also related to an evolution commit 3df39f3d08e70, which you already have.

You can get the backtrace with command like this:
   $ gdb --batch --ex "t a a bt" -pid=`pidof evolution` &>bt.txt
Please check the bt.txt for any private information, like passwords, email address, server addresses,... I usually search for "pass" at least (quotes for clarity only). You know how it works with respect of the debuginfo packages for evolution-data-server and evolution, thus I'm not going to bother you with that.
Comment 2 André Klapper 2017-07-31 12:38:00 UTC
(In reply to Milan Crha from comment #1)
> You can get the backtrace with command like this:
>    $ gdb --batch --ex "t a a bt" -pid=`pidof evolution` &>bt.txt

This is a different case though as I am online (after switching from one wifi to another though, might be related) and **none** of the 'unread mail in that folder' indicators updated after I had marked a few unread emails as read:

[New LWP 3129]
[New LWP 3130]
[New LWP 3131]
[New LWP 3132]
[New LWP 3133]
[New LWP 3148]
[New LWP 3149]
[New LWP 3150]
[New LWP 3153]
[New LWP 3170]
[New LWP 3171]
[New LWP 7984]
[New LWP 9539]

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

0x00007f44d31dba9d in poll () at ../sysdeps/unix/syscall-template.S:84
84	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)

Thread 14 (Thread 0x7f42b37fe700 (LWP 9539))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait_until
    at gthread-posix.c line 1442
  • #2 g_async_queue_pop_intern_unlocked
    at gasyncqueue.c line 422
  • #3 g_async_queue_timeout_pop
    at gasyncqueue.c line 543
  • #4 g_thread_pool_wait_for_new_pool
    at gthreadpool.c line 167
  • #5 g_thread_pool_thread_proxy
    at gthreadpool.c line 364
  • #6 g_thread_proxy
    at gthread.c line 784
  • #7 start_thread
    at pthread_create.c line 456
  • #8 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 97

Comment 3 Milan Crha 2017-07-31 14:03:28 UTC
I just noticed you even have the test builds which have fixes for the "IMAP flag change in offline" issue. Knowing why it fails on your side, but works on mine, would make it much easier to uncover.
Comment 4 André Klapper 2017-08-15 15:47:37 UTC
This is super annoying and wastes my time as I need to go through mail *again* to mark it as unread. 
Anything else I can provide?
Comment 5 Milan Crha 2017-08-22 15:57:30 UTC
I'm missing the reproducer and I've not much idea what to look for, which is even worse. I'm sorry.

Regarding your step 2 in comment #0, what is selected in Edit->Preferences->Network Preferences->Method to detect online state? It might be "Default"; try to change it to something else, maybe "networkmanager". Then stop & run evolution (just to make sure the change is fully propagated). If your connection is managed by network manager, then evolution should know when you are online and when offline now. Eventually try other methods.
Comment 6 André Klapper 2017-08-22 16:51:06 UTC
(In reply to Milan Crha from comment #5)
> Regarding your step 2 in comment #0, what is selected in
> Edit->Preferences->Network Preferences->Method to detect online state? It
> might be "Default"; try to change it to something else

Method is set to "Default". I've set it to "networkmanager" and will keep an eye on whether this happens again (normally happens about 2 or 3 times a week).
Comment 7 Milan Crha 2017-09-01 09:55:59 UTC
I tried to reproduce this in a similar environment. I set evolution to be "Always Online", then I went to my account which requires VPN, but that VPN is off. Evolution is quite unhappy, shows plenty of errors about failed operations, but the read/unread flag changes stick in an IMAP folder for me.

I noticed that the unread count changes only up in the folder tree, not down, while the window title and the label above folder tree show correct unread count, which reminded me of commit 3df39f3d08e70f3f02. It looks like it's still not perfect, but it's a different issue than that yours, where you claim to be forced to retag messages as read, thus that your previous read/unread changes are not locally stored for later store to the server. I tested this also with 3.24.5, not only with the current development version.
Comment 8 Milan Crha 2017-09-01 10:55:55 UTC
(In reply to Milan Crha from comment #7)
> I noticed that the unread count changes only up in the folder tree, not
> down...

Fixed this with eds commit:
https://git.gnome.org/browse/evolution-data-server/commit/?id=6c98483
Comment 9 André Klapper 2017-09-06 13:48:39 UTC
(In reply to André Klapper from comment #6)
> Method is set to "Default". I've set it to "networkmanager"

Does not change a thing. 
Problem still happens several times a week on 3.24.5-1.

I still need to capture a backtrace via Ctrl+C, will do that soon.
Comment 10 André Klapper 2017-09-07 12:56:44 UTC
Created attachment 359350 [details]
gdb output

Pulled new mail from Gmail IMAP, went into offline mode and synced data for offline use, I tried to manually apply filters in a subfolder, Evo showed me an error as not all mail was synced, I went into online mode again, went into offline mode again and let Evo sync data again.
Marking emails as read in that subfolder changes the font from bold to normal in the message list but does not change the unread number in the application title bar, folder pane, grey box above the folder pane.

Interesting artifacts:
* The bold font does not become normal when pressing Ctrl+K. It is only re-rendered once I use "." to go to the next unread message.
* If I mark a message as read (Ctrl+K) and then as unread (Ctrl+Shift+K), the unread count in the folder pane (only there!) increases by one. It does not decrease by one if I mark as read (which is what this task is about).

Attaching as BZ barks that "Comments cannot be longer than 65535 characters."
Comment 11 André Klapper 2017-09-07 21:31:52 UTC
Created attachment 359378 [details]
gdb output 2

Same issue but now in online mode, after going online from offline. In a different Gmail IMAP subfolder than earlier today.
Comment 12 Milan Crha 2017-09-08 06:33:17 UTC
Thanks. Both backtraces show evolution basically idle, while I thought there something stuck in the background, which is not the case, which is good. Both backtraces also show one other thing, invalid unref:

> (evolution:17065): GLib-GObject-CRITICAL **: g_object_unref: assertion
> 'G_IS_OBJECT (object)' failed
>
> (evolution:17065): GLib-GObject-CRITICAL **: g_object_unref: assertion
> 'G_IS_OBJECT (object)' failed

I do not see it here, but maybe it's related to the issue. I cannot tell from the message itself, there can be either passed a NULL pointer (which is bad, but doesn't cause issues) or an invalid pointer (like a use-after-free, which can cause "random" issues in some cases).

You can catch them with gdb when you run it as this:

   $ gdb evolution --ex "b g_logv if log_level<=16" --ex r

You might have installed debuginfo also for glib2, thus it knows about the arguments. Once gdb stops, get the backtrace of the warning and continue with:

   (gdb) bt
   (gdb) c

That may happen twice, like it did in both backtraces. I'm wondering where it happens and what address is passed to the g_object_unref().

The sub-issue mentioned in comment #10, about download for offline being unreliable, it's out of scope of this bug report and can depends also on the download limit setting in the account properties, Receiving Options tab, but I do not recall whether 3.24 has it or not. Feel free to open a new bug report for this.
Comment 13 André Klapper 2017-09-08 11:34:02 UTC
Created attachment 359395 [details]
gdb output 3

Might not be the issue itself, but going online after being offline in Evo, gdb stopped. Full output in attachment, only pasting the trace itself here:

Thread 1 "evolution" hit Breakpoint 1, g_logv (log_domain=0x7ffff5e9806e "GLib", 
    log_level=G_LOG_LEVEL_CRITICAL, format=0x7ffff5ea17f4 "%s: assertion '%s' failed", 
    args=args@entry=0x7fffffffd5f0) at gmessages.c:1243
1243	{
(gdb) bt
  • #0 g_logv
    at gmessages.c line 1243
  • #1 g_log
    at gmessages.c line 1398
  • #2 g_return_if_fail_warning
    at gmessages.c line 2687
  • #3 g_base64_decode_step
    at gbase64.c line 337
  • #4 mime_filter_basic_complete
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-mime-filter-basic.c line 234
  • #5 camel_mime_filter_complete
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-mime-filter.c line 269
  • #6 filter_output_stream_flush
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-filter-output-stream.c line 181
  • #7 g_output_stream_flush
    at goutputstream.c line 477
  • #8 filter_output_stream_flush
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-filter-output-stream.c line 194
  • #9 g_output_stream_flush
    at goutputstream.c line 477
  • #10 camel_data_wrapper_write_to_output_stream_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-data-wrapper.c line 1157
  • #11 data_wrapper_decode_to_output_stream_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-data-wrapper.c line 354
  • #12 camel_data_wrapper_decode_to_output_stream_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-data-wrapper.c line 1302
  • #13 e_mail_formatter_format_text
    at /usr/src/debug/evolution-3.24.5/src/em-format/e-mail-formatter.c line 1118
  • #14 emfe_text_plain_format
    at /usr/src/debug/evolution-3.24.5/src/em-format/e-mail-formatter-text-plain.c line 120
  • #15 e_mail_formatter_format_as
    at /usr/src/debug/evolution-3.24.5/src/em-format/e-mail-formatter.c line 1027
  • #16 mail_request_process_mail_sync
    at /usr/src/debug/evolution-3.24.5/src/mail/e-mail-request.c line 241
  • #17 process_mail_request_idle_cb
    at /usr/src/debug/evolution-3.24.5/src/mail/e-mail-request.c line 400
  • #18 g_idle_dispatch
    at gmain.c line 5586
  • #19 g_main_dispatch
    at gmain.c line 3234
  • #20 g_main_context_dispatch
    at gmain.c line 3899
  • #21 g_main_context_iterate
    at gmain.c line 3972
  • #22 g_main_loop_run
    at gmain.c line 4168
  • #23 gtk_main
    at gtkmain.c line 1322
  • #24 main
    at /usr/src/debug/evolution-3.24.5/src/shell/main.c line 667
Continuing.

(evolution:31299): GLib-CRITICAL **: g_base64_decode_step: assertion 'out != NULL' failed

Thread 1 "evolution" hit Breakpoint 1, g_logv (log_domain=0x7ffff5e9806e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=0x7ffff5ea17f4 "%s: assertion '%s' failed", args=args@entry=0x7fffffffd590)
    at gmessages.c:1243
1243	{
(gdb) c
Continuing.

(evolution:31299): GLib-CRITICAL **: g_base64_decode_step: assertion 'out != NULL' failed

Thread 1 "evolution" hit Breakpoint 1, g_logv (log_domain=0x7ffff5e9806e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=0x7ffff5ea17f4 "%s: assertion '%s' failed", args=args@entry=0x7fffffffd5c0)
    at gmessages.c:1243
1243	{
(gdb) c
Continuing.

(evolution:31299): GLib-CRITICAL **: g_base64_decode_step: assertion 'out != NULL' failed
Comment 14 André Klapper 2017-09-10 12:54:17 UTC
Created attachment 359460 [details]
Status bar screenshot

Was pulling mail and probably also manually moving message to subfolders.

[Thread 0x7ffb8ebac700 (LWP 28943) exited]

Thread 140718622926592 (LWP 28909)

  • #0 g_logv
    at gmessages.c line 1243
  • #1 g_log
    at gmessages.c line 1398
  • #2 g_hash_table_remove_all_nodes
    at ghash.c line 548
  • #3 g_hash_table_remove_all_nodes
    at ghash.c line 1428
  • #4 g_hash_table_remove_all
    at ghash.c line 1431
  • #5 g_hash_table_destroy
    at ghash.c line 1124
  • #6 camel_imapx_server_copy_message_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-server.c line 4488
  • #7 imapx_conn_manager_copy_message_run_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 2087
  • #8 camel_imapx_job_run_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-job.c line 472
  • #9 camel_imapx_conn_manager_run_job_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 1252
  • #10 imapx_conn_manager_copy_message_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 2137
  • #11 imapx_conn_manager_move_to_real_trash_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 1711
  • #12 camel_imapx_conn_manager_sync_changes_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 1831
  • #13 imapx_conn_manager_copy_message_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 2117
  • #14 camel_imapx_conn_manager_copy_message_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 2170
  • #15 imapx_transfer_messages_to_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-folder.c line 863
  • #16 do_move
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-filter-driver.c line 686
  • #17 camel_sexp_term_eval
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-sexp.c line 855
  • #18 term_eval_begin
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-sexp.c line 786
  • #19 camel_sexp_term_eval
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-sexp.c line 845
  • #20 camel_sexp_eval
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-sexp.c line 1826
  • #21 camel_filter_driver_filter_message
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-filter-driver.c line 1864
  • #22 folder_filter
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-folder.c line 432
  • #23 session_job_thread
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-session.c line 196
  • #24 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #25 g_thread_proxy
    at gthread.c line 784
  • #26 start_thread
    at pthread_create.c line 456
  • #27 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 97

(gdb) info register
rax            0x7ffb9b8852d0	140718622921424
rbx            0x1	1
rcx            0x7ffb9b8852b0	140718622921392
rdx            0x7ffff5ea17f4	140737319147508
rsi            0x8	8
rdi            0x7ffff152e944	140737242130756
rbp            0x7ffef89b3360	0x7ffef89b3360
rsp            0x7ffb9b8852a8	0x7ffb9b8852a8
r8             0x7ffff1530ab0	140737242139312
r9             0x6	6
r10            0x60	96
r11            0x11	17
r12            0x7ffef84da6a0	140733064259232
r13            0x7ffef872a610	140733066683920
r14            0x0	0
r15            0x55555a4d4640	93825075594816
rip            0x7ffff5e56ec0	0x7ffff5e56ec0 <g_logv>
eflags         0x246	[ PF ZF IF ]
cs             0x33	51
ss             0x2b	43
ds             0x0	0
es             0x0	0
fs             0x0	0
gs             0x0	0
(gdb) list
1238	void
1239	g_logv (const gchar   *log_domain,
1240		GLogLevelFlags log_level,
1241		const gchar   *format,
1242		va_list	       args)
1243	{
1244	  gboolean was_fatal = (log_level & G_LOG_FLAG_FATAL) != 0;
1245	  gboolean was_recursion = (log_level & G_LOG_FLAG_RECURSION) != 0;
1246	  gchar buffer[1025], *msg, *msg_alloc = NULL;
1247	  gint i;
Comment 15 André Klapper 2017-09-10 12:58:08 UTC
Oh and continuing from the last comment, as I hibernated and moved to a different place (hence the disconnect stuff in here):

(gdb) c
Continuing.
[Thread 0x7ffb912a1700 (LWP 28942) exited]

(evolution:31299): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Thread 9501 "pool" hit Breakpoint 1, g_logv (log_domain=0x7ffff152e944 "GLib-GObject", log_level=G_LOG_LEVEL_CRITICAL, format=0x7ffff5ea17f4 "%s: assertion '%s' failed", args=args@entry=0x7ffb9b8852b0)
    at gmessages.c:1243
1243	{
(gdb) bt

Thread 140719489046272 (LWP 28905)

  • #0 g_logv
    at gmessages.c line 1243
  • #1 g_log
    at gmessages.c line 1398
  • #2 g_set_error_literal
    at gerror.c line 621
  • #3 g_cancellable_set_error_if_cancelled
    at gcancellable.c line 314
  • #4 camel_imapx_conn_manager_run_job_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 1116
  • #5 imapx_conn_manager_expunge_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 1903
  • #6 camel_imapx_conn_manager_sync_changes_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 1851
  • #7 imapx_conn_manager_expunge_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 1897
  • #8 imapx_expunge_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-folder.c line 516
  • #9 camel_folder_expunge_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/camel-folder.c line 2990
  • #10 e_mail_folder_expunge_sync
    at /usr/src/debug/evolution-3.24.5/src/libemail-engine/e-mail-folder-utils.c line 430
  • #11 mail_folder_expunge_thread
    at /usr/src/debug/evolution-3.24.5/src/libemail-engine/e-mail-folder-utils.c line 193
  • #12 run_in_thread
    at gsimpleasyncresult.c line 898
  • #13 io_job_thread
    at gioscheduler.c line 85
  • #14 g_task_thread_pool_thread
    at gtask.c line 1328
  • #15 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #16 g_thread_proxy
    at gthread.c line 784
  • #17 start_thread
    at pthread_create.c line 456
  • #18 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 97

Thread 140719456589568 (LWP 28917)

  • #0 g_logv
    at gmessages.c line 1243
  • #1 g_log
    at gmessages.c line 1398
  • #2 g_set_error_literal
    at gerror.c line 621
  • #3 g_cancellable_set_error_if_cancelled
    at gcancellable.c line 314
  • #4 camel_imapx_conn_manager_run_job_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 1116
  • #5 imapx_conn_manager_expunge_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 1903
  • #6 camel_imapx_conn_manager_sync_changes_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 1851
  • #7 imapx_conn_manager_copy_message_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 2117
  • #8 camel_imapx_conn_manager_copy_message_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-conn-manager.c line 2170
  • #9 imapx_transfer_messages_to_sync
    at /usr/src/debug/evolution-data-server-3.24.6/src/camel/providers/imapx/camel-imapx-folder.c line 863
  • #10 em_utils_selection_get_uidlist
    at /usr/src/debug/evolution-3.24.5/src/mail/em-utils.c line 832
  • #11 folder_tree_drop_async__exec
    at /usr/src/debug/evolution-3.24.5/src/mail/em-folder-tree.c line 2330
  • #12 mail_msg_proxy
    at /usr/src/debug/evolution-3.24.5/src/libemail-engine/mail-mt.c line 381
  • #13 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #14 g_thread_proxy
    at gthread.c line 784
  • #15 start_thread
    at pthread_create.c line 456
  • #16 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 97
Continuing.
[Thread 0x7ffbcf285700 (LWP 28905) exited]
[Thread 0x7ffb8ebac700 (LWP 30042) exited]

(evolution:31299): 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: Operation was cancelled
[Switching to Thread 0x7ffb9b886700 (LWP 28909)]

Thread 9501 "pool" hit Breakpoint 1, g_logv (log_domain=0x7ffff5e9806e "GLib", log_level=G_LOG_LEVEL_WARNING, 
    format=0x7ffff5e9c340 "GError set over the top of a previous GError or uninitialized memory.\nThis indicates a bug in someone's code. You must ensure an error is NULL before it's set.\nThe overwriting error message was: %s", args=args@entry=0x7ffb9b885480) at gmessages.c:1243
1243	{
(gdb) c
Continuing.

(evolution:31299): 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: You must be working online to complete this operation
[New Thread 0x7ffb8ebac700 (LWP 30044)]
[New Thread 0x7ffbcf285700 (LWP 30045)]
[New Thread 0x7ffb8e3ab700 (LWP 30046)]
[New Thread 0x7ffb9b085700 (LWP 30047)]
[New Thread 0x7ffbc9c12700 (LWP 30048)]
[New Thread 0x7ffb9310d700 (LWP 30049)]
[New Thread 0x7ffb90aa0700 (LWP 30050)]
[Thread 0x7ffb912a1700 (LWP 30040) exited]
evolution-shell-Message: Connection established.  Going online.
[New Thread 0x7ffb912a1700 (LWP 30051)]
[Thread 0x7ffb912a1700 (LWP 30051) exited]
[New Thread 0x7ffb912a1700 (LWP 30052)]
[New Thread 0x7ffb9029f700 (LWP 30053)]
[New Thread 0x7ffb8ccb8700 (LWP 30054)]
[New Thread 0x7ffb8c4b7700 (LWP 30055)]
[New Thread 0x7ffb8bcb6700 (LWP 30056)]
[Thread 0x7ffb9b085700 (LWP 30047) exited]
[Thread 0x7ffbc9c12700 (LWP 30048) exited]
[Thread 0x7ffb8e3ab700 (LWP 30046) exited]
[Thread 0x7ffb90aa0700 (LWP 30050) exited]
[Thread 0x7ffb9310d700 (LWP 30049) exited]
[Thread 0x7ffb9029f700 (LWP 30053) exited]
[Thread 0x7ffb912a1700 (LWP 30052) exited]
[Thread 0x7ffb8bcb6700 (LWP 30056) exited]
[Thread 0x7ffb8ccb8700 (LWP 30054) exited]
[Thread 0x7ffb98aa0700 (LWP 28923) exited]
[Thread 0x7ffb9b886700 (LWP 28909) exited]
[Thread 0x7ffb8c4b7700 (LWP 30055) exited]
[Thread 0x7ffbcd391700 (LWP 28917) exited]
[Thread 0x7ffbcf285700 (LWP 30045) exited]
Comment 16 Milan Crha 2017-09-12 15:20:52 UTC
Okay, enough to update to Fedora 26 and I can (suddenly) reproduce it too. I'm wondering what broke it, might be even glib2, but whatever. Good news for you is that it's not needed to update backtraces anymore.
Comment 17 Milan Crha 2017-09-12 17:00:16 UTC
Let's use this bug report for the initial issue, unread count not always updating. That failed g_object_unref() seems like happening when moving some messages which are not in the source folder's summary yet and it happens when some message filter moves the message from one folder to another and then the source message is deleted and moved to the Trash folder (that's complicated, right). I will investigate it further later.

Created commit d86f2064e1 in evo master (3.27.1+)
Created commit 92cc8b127a in evo gnome-3-26 (3.26.1+)
Comment 18 Milan Crha 2017-09-12 17:02:33 UTC
I forgot to mention, maybe if you'd like to give a quick test to the change you can do it when following the steps from here:
https://wiki.gnome.org/Apps/Evolution/Flatpak
Comment 19 Milan Crha 2017-09-13 08:55:36 UTC
(In reply to André Klapper from comment #15)
> Oh and continuing from the last comment, as I hibernated and moved to a
> different place (hence the disconnect stuff in here):

The first wrong g_object_unref() is described in comment #17. I suspect the object is NULL, thus no big deal (it will not break anything in the memory), but I just noticed that there is a continuation, which shows:

> evolution-shell-Message: Network disconnected.  Forced offline.

and right after that there's a catch of:

> (evolution:31299): GLib-GObject-CRITICAL **: g_object_ref: assertion
> 'object->ref_count > 0' failed

That shows a ref/unref imbalance, something which can cause harm eventually. Pity you didn't get backtrace of it too.
Comment 20 Milan Crha 2017-09-13 09:52:19 UTC
I just tried and I cannot reproduce even that filtering runtime warning, my newly received message is moved (to a subfolder of my Gmail account) after being received in the Inbox (of the same Gmail account) and no such warning on the console. Having two "Move message to" filter rules applying to the same message also doesn't matter, because the first move explicitly stops further filter rule processing. I'm out of idea on the two left issues.