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 766016 - Evolution can not receive mailbox with SSL
Evolution can not receive mailbox with SSL
Status: RESOLVED DUPLICATE of bug 765317
Product: evolution
Classification: Applications
Component: Mailer
3.18.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2016-05-05 08:08 UTC by Clemens
Modified: 2016-05-21 11:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evo.log from call: CAMEL_DEBUG=all evolution >& evo.log (26.74 KB, text/x-log)
2016-05-05 08:08 UTC, Clemens
Details
CAMEL_DEBUG=imapx evolution &>log.txt (115 bytes, text/plain)
2016-05-08 19:39 UTC, Clemens
Details
gdb --batch --ex "t a a bt" -pid=`pidof evolution` &>bt.txt (15.36 KB, text/plain)
2016-05-08 19:41 UTC, Clemens
Details
CAMEL_DEBUG=imapx evolution &>log.txt (2nd try) (304 bytes, text/plain)
2016-05-09 12:29 UTC, Clemens
Details
gdb --batch --ex "t a a bt" -pid=`pidof evolution` &>bt.txt (2nd try) (19.11 KB, text/plain)
2016-05-09 12:30 UTC, Clemens
Details
gdb --batch --ex "t a a bt" -pid=`pidof evolution` &>bt.txt (2nd try 30 sec later) (18.63 KB, text/plain)
2016-05-09 12:31 UTC, Clemens
Details

Description Clemens 2016-05-05 08:08:57 UTC
Created attachment 327326 [details]
evo.log from call: CAMEL_DEBUG=all evolution >& evo.log

Hi,

i have a debian server with mailboxes managed by courier (IMAP/SSL certificate from startssl). 

if i enable ssl (Port 993), then the evolution can not call the mailbox folder and CPU cores are hot (processor load of 1-2 cores is 100% ). 

The attachment contains the log file from the terminal call: 

# CAMEL_DEBUG=all evolution >& evo.log


The geary mail client has the same problem. The problem exists since the ubuntu upgrade to 16.04. 

i have create a demo mailbox on my server: 

imap server: mail.cylancer.net
mailbox (username): bug@cylancer.net
password: password

Can you confirm this issue? 

regards 
Clemens 

PS: thunderbird and outlook do not have this problem.
Comment 1 André Klapper 2016-05-05 16:09:04 UTC
I cannot confirm the problem.

I'm using evolution-3.18.5.2-1 and evolution-data-server-3.18.5-1 on Fedora 23 and I could access your test mailbox with the given settings. 
There is one message in that test inbox called 
"Systemmeldung: Ihre Mail-Adresse wurde erfolgreich eingerichtet".
Comment 2 Clemens 2016-05-06 09:22:53 UTC
Maybe this is a ubuntu problem. 

I have installed a 15.10 ubuntu and after i have upgraded the ubuntu to 16.04 (on a virtual machine). 

Before 15.10: 
- SSL: ok. 
- IMAP+: ok

After 16.04: 
- Evolution displays "Sanning folders in 'IMAP-server mail.cylancer.net'" and top displays CPU% 110.2%  ???

@André: 
Have you in your fedora log-file also the entry: 

(evolution:6619): camel-WARNING **: Failed to initialize NSS SQL database in sql:/etc/pki/nssdb: NSS error -8126

nssdb is a folder with different db-files in ubuntu. 

and the second intressting detail is the log-file stopped by "E"

Quote: 
"Added extension 'EMailFormatterTextEnriched' for type 'text/enriched'
Added extension 'E"
Comment 3 Milan Crha 2016-05-06 09:56:25 UTC
Thanks for a bug report. The Ubuntu versions do not mean anything here. What does mean something is the evolution/evolution-data-server version.

With respect of the SSL, there had been SSL as such disabled system wide in some distributions some time ago, only TLS is used (and enabled by default).

The attached log is cut at the end, similarly as you wrote in the previous comment. It can be that the buffer wasn't flushed. In any case, the log would help only partly. if you have a busy loop for some reason, then a better option is to grab a backtrace of the running process which uses the CPU and see what it does. It can be partly caused by the inefficient gtk3 spinner in the folder tree, the animation which shows that something is happening (the account is connecting in this case), but hard to tell whether it's really it without the backtrace.

Similar to Andre, I can also connect to the server using evolution 3.20.0 and even 3.16.5.

Please do the following:
a) provide exact versions of the evolution-data-server, evolution, glib2,
   gnutls and gtk3
b) install debuginfo packages for the packages from a) (their dependencies
   not needed)
c) verify that the account properties use SSL/TLS encryption (not STARTTLS)
   and port 993. Though even the STARTTLS on port 143 worked fine here
d) run the evolution from the command line as this (please copy&paste):
   $ CAMEL_DEBUG=imapx evolution &>log.txt
e) once the evolution gets to that busy-loop, get the backtrace of it with:
   $ 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).

Report back your findings and both log.txt and bt.txt files, possibly sanitized from the private information. Thanks in advance.
Comment 4 Clemens 2016-05-08 19:37:07 UTC
Thanks for your help. Here are the requested informations: 
1. dpkg -l| grep ... 
evolution-data-server    3.18.5-1ubuntu1

evolution                3.18.5.2-0ubuntu1 

libglib2.0-0:amd64   2.48.0-1ubuntu4                                     
libglib2.0-bin                                              2.48.0-1ubuntu4                                     
libglib2.0-data                                             2.48.0-1ubuntu4                                     
libpackagekit-glib2-16:amd64                                0.8.17-4ubuntu6~gcc5.4ubuntu1                       


libgnutls-openssl27:amd64                                   3.4.10-4ubuntu1                                     amd64        
libgnutls30:amd64                                           3.4.10-4ubuntu1                                     amd64        

ibus-gtk3:amd64                                             1.5.11-1ubuntu2                                     amd64        
libavahi-ui-gtk3-0:amd64                                    0.6.32~rc+dfsg-1ubuntu2                             amd64        
libcanberra-gtk3-0:amd64                                    0.30-2.1ubuntu1                                     amd64        
libcanberra-gtk3-module:amd64                               0.30-2.1ubuntu1                                     amd64        
libdbusmenu-gtk3-4:amd64                                    12.10.3+16.04.20160223.1-0ubuntu1                   amd64        
libwxgtk3.0-0v5:amd64                                       3.0.2+dfsg-1.3                                      amd64        
python-aptdaemon.gtk3widgets                                1.1.1+bzr982-0ubuntu14                              all          
python3-aptdaemon.gtk3widgets                               1.1.1+bzr982-0ubuntu14                              all
Comment 5 Clemens 2016-05-08 19:38:53 UTC
To fast saved (Tab + Space ;-) )

The log-files are in the attachements.
Comment 6 Clemens 2016-05-08 19:39:44 UTC
Created attachment 327481 [details]
CAMEL_DEBUG=imapx evolution &>log.txt
Comment 7 Clemens 2016-05-08 19:41:27 UTC
Created attachment 327482 [details]
gdb --batch --ex "t a a bt" -pid=`pidof evolution` &>bt.txt
Comment 8 Clemens 2016-05-08 19:43:21 UTC
Additional comment: My evolution do not make a different between START/TLS on port 143 and SSL on port 993. :-(
Comment 9 André Klapper 2016-05-09 08:11:01 UTC
(In reply to Clemens from comment #8)
> Additional comment: My evolution do not make a different between START/TLS
> on port 143 and SSL on port 993. :-(

Please explain **how** you found out.
Comment 10 Milan Crha 2016-05-09 10:28:58 UTC
Thanks for the update. The CAMEL_DEBUG log shows that the evolution-data-server (IMAPx) didn't get far enough, which can be it didn't connect to the server yet. The backtrace supports it, as I see two connect attempts being ongoing in the backtrace. It seems to me that Thread 6 is the problem, the glib's gio (sub) library is doing something with the certificate returned by the server, but I cannot get from the backtrace whether it's only the snapshot (the current backtrace) where it was caught, or whether the code got stuck in this place. Possibly related bug #765317.

Finally, I see the Thread 1 (the main/GUI) thread is drawing something, where I believe it's the spinner drawing, which is also causing the higher CPU usage. That had been discussed and addressed for the status bar (not for the folder tree) at bug #732180.

Could you install debuginfo package for the libglib2 too, please, then catch two backtraces, with a gap of, say at least 5 seconds, to be able to compare whether the Thread 6 with the call to g_tls_certificate_get_issuer() moved forward or not, please?

By the way, can you go to the Edit->Preferences->Mail Accounts-><choose the affected account>->Edit->Receiving Email tab and click the "Check for Supported Types" button of the Authentication section at the bottom of that page, please? I'm wondering whether it'll work or not. If successful, you should see some of the options in the authentication type combo box stroke through.
Comment 11 Clemens 2016-05-09 12:28:46 UTC
@Milian: 

The last question first: 
If the SSL (and TLS) is disabled then the function "Check for Supported Types" delivers only "PASSWORD". The other options are strikethrough. 

If i select SSL and click on "Check for Supported Types" then the button "Check for Supported Types" and the drop down menu are grey (disabled).

I have installed libglib2.0.0-dbg and i have run the two commands, which are created the two files: bt.txt and log.txt. (see attachments). This log are create on a virtual machine. 



@André: 
Between SSL and TLS are not different for a simple user (as me). Evolution stay in a "busy-loop".
Comment 12 Clemens 2016-05-09 12:29:49 UTC
Created attachment 327512 [details]
CAMEL_DEBUG=imapx evolution &>log.txt (2nd try)
Comment 13 Clemens 2016-05-09 12:30:17 UTC
Created attachment 327513 [details]
gdb --batch --ex "t a a bt" -pid=`pidof evolution` &>bt.txt (2nd try)
Comment 14 Clemens 2016-05-09 12:30:57 UTC
Comment on attachment 327513 [details]
gdb --batch --ex "t a a bt" -pid=`pidof evolution` &>bt.txt (2nd try)

>[New LWP 1760]
>[New LWP 1759]
>[New LWP 1746]
>[New LWP 1745]
>[New LWP 1742]
>[New LWP 1741]
>[New LWP 1740]
>[New LWP 1739]
>[New LWP 1738]
>[New LWP 1737]
>[New LWP 1736]
>[New LWP 1735]
>[New LWP 1734]
>[New LWP 1733]
>[Thread debugging using libthread_db enabled]
>Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>0x00007f36593dee8d in poll () at ../sysdeps/unix/syscall-template.S:84
>84	../sysdeps/unix/syscall-template.S: Datei oder Verzeichnis nicht gefunden.
>
>Thread 15 (Thread 0x7f363e7e5700 (LWP 1733)):
>#0  0x00007f365d4763a0 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
>#1  0x00007f36426f9aa3 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
>#2  0x00007f36426f9907 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
>#3  0x00007f365d4706fa in start_thread (arg=0x7f363e7e5700) at pthread_create.c:333
>#4  0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 14 (Thread 0x7f363dfe4700 (LWP 1734)):
>#0  0x00007f365d4763a0 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
>#1  0x00007f36426f9aa3 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
>#2  0x00007f36426f9907 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
>#3  0x00007f365d4706fa in start_thread (arg=0x7f363dfe4700) at pthread_create.c:333
>#4  0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 13 (Thread 0x7f363d5ab700 (LWP 1735)):
>#0  0x00007f36593dee8d in poll () at ../sysdeps/unix/syscall-template.S:84
>#1  0x00007f36596f731c in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7f36380008e0, timeout=<optimized out>, context=0x55fdd7d35b30) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4135
>#2  0x00007f36596f731c in g_main_context_iterate (context=context@entry=0x55fdd7d35b30, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:3835
>#3  0x00007f36596f742c in g_main_context_iteration (context=0x55fdd7d35b30, may_block=may_block@entry=1) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:3901
>#4  0x00007f36596f7469 in glib_worker_main (data=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:5672
>#5  0x00007f365971db45 in g_thread_proxy (data=0x55fdd7cdb400) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthread.c:780
>#6  0x00007f365d4706fa in start_thread (arg=0x7f363d5ab700) at pthread_create.c:333
>#7  0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 12 (Thread 0x7f363c93c700 (LWP 1736)):
>#0  0x00007f36593dee8d in poll () at ../sysdeps/unix/syscall-template.S:84
>#1  0x00007f36596f731c in g_main_context_iterate (priority=2147483647, n_fds=3, fds=0x7f36300010c0, timeout=<optimized out>, context=0x55fdd7f72db0) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4135
>#2  0x00007f36596f731c in g_main_context_iterate (context=0x55fdd7f72db0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:3835
>#3  0x00007f36596f76a2 in g_main_loop_run (loop=0x55fdd7f72d40) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4034
>#4  0x00007f3659cf5906 in gdbus_shared_thread_func (user_data=0x55fdd7f72d80) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gio/gdbusprivate.c:246
>#5  0x00007f365971db45 in g_thread_proxy (data=0x55fdd7cdb5e0) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthread.c:780
>#6  0x00007f365d4706fa in start_thread (arg=0x7f363c93c700) at pthread_create.c:333
>#7  0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 11 (Thread 0x7f3637df2700 (LWP 1737)):
>#0  0x00007f36593dee8d in poll () at ../sysdeps/unix/syscall-template.S:84
>#1  0x00007f36596f731c in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7f362c0010c0, timeout=<optimized out>, context=0x55fdd800fca0) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4135
>#2  0x00007f36596f731c in g_main_context_iterate (context=context@entry=0x55fdd800fca0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:3835
>#3  0x00007f36596f742c in g_main_context_iteration (context=0x55fdd800fca0, may_block=1) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:3901
>#4  0x00007f3637dfa28d in  () at /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
>#5  0x00007f365971db45 in g_thread_proxy (data=0x55fdd7f8ff20) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthread.c:780
>#6  0x00007f365d4706fa in start_thread (arg=0x7f3637df2700) at pthread_create.c:333
>#7  0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 10 (Thread 0x7f36375f1700 (LWP 1738)):
>#0  0x00007f36593dee8d in poll () at ../sysdeps/unix/syscall-template.S:84
>#1  0x00007f36596f731c in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7f36240765c0, timeout=<optimized out>, context=0x55fdd818f670) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4135
>#2  0x00007f36596f731c in g_main_context_iterate (context=0x55fdd818f670, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:3835
>#3  0x00007f36596f76a2 in g_main_loop_run (loop=0x55fdd8165d40) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4034
>#4  0x00007f365d1ef7d7 in source_registry_object_manager_thread (data=0x55fdd8184a80) at e-source-registry.c:1164
>#5  0x00007f365971db45 in g_thread_proxy (data=0x7f36300048a0) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthread.c:780
>#6  0x00007f365d4706fa in start_thread (arg=0x7f36375f1700) at pthread_create.c:333
>#7  0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 9 (Thread 0x7f36356ab700 (LWP 1739)):
>#0  0x00007f365d4763a0 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
>#1  0x00007f36542a94e6 in WTF::TCMalloc_PageHeap::scavengerThread() () at /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-3.0.so.0
>#2  0x00007f36542a9509 in  () at /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-3.0.so.0
>#3  0x00007f365d4706fa in start_thread (arg=0x7f36356ab700) at pthread_create.c:333
>#4  0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 8 (Thread 0x7f3634eaa700 (LWP 1740)):
>#0  0x00007f365d4763a0 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
>#1  0x00007f365b8097ec in  () at /usr/lib/x86_64-linux-gnu/libwebkitgtk-3.0.so.0
>#2  0x00007f365b80ad28 in  () at /usr/lib/x86_64-linux-gnu/libwebkitgtk-3.0.so.0
>#3  0x00007f36542c1b0a in  () at /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-3.0.so.0
>#4  0x00007f365d4706fa in start_thread (arg=0x7f3634eaa700) at pthread_create.c:333
>#5  0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 7 (Thread 0x7f35d8487700 (LWP 1741)):
>#0  0x00007f36593dee8d in poll () at ../sysdeps/unix/syscall-template.S:84
>#1  0x00007f36596f731c in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7f35d0001570, timeout=<optimized out>, context=0x7f35d0004c00) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4135
>#2  0x00007f36596f731c in g_main_context_iterate (context=0x7f35d0004c00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:3835
>#3  0x00007f36596f76a2 in g_main_loop_run (loop=0x7f35d0001590) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4034
>#4  0x00007f365cea2f16 in camel_async_closure_wait (closure=closure@entry=0x7f363001da30) at camel-async-closure.c:132
>#5  0x00007f365cf06ec7 in camel_service_connect_sync (service=service@entry=0x55fdd8281130 [CamelIMAPXStore], cancellable=cancellable@entry=0x55fdd8345490 [CamelOperation], error=error@entry=0x7f35d8486aa8) at camel-service.c:1767
>#6  0x00007f365cf1542c in camel_store_get_folder_info_sync (error=0x7f35d8486aa8, cancellable=0x55fdd8345490 [CamelOperation], store=0x55fdd8281130 [CamelIMAPXStore]) at camel-store.c:327
>#7  0x00007f365cf1542c in camel_store_get_folder_info_sync (store=0x55fdd8281130 [CamelIMAPXStore], top=top@entry=0x0, flags=flags@entry=(CAMEL_STORE_FOLDER_INFO_FAST | CAMEL_STORE_FOLDER_INFO_RECURSIVE | CAMEL_STORE_FOLDER_INFO_SUBSCRIBED), cancellable=cancellable@entry=0x55fdd8345490 [CamelOperation], error=error@entry=0x7f35d8486aa8) at camel-store.c:1543
>#8  0x00007f35e3be2ca8 in mail_folder_cache_note_store_thread (simple=0x55fdda4e25c0 [GSimpleAsyncResult], source_object=<optimized out>, cancellable=0x55fdd8345490 [CamelOperation]) at mail-folder-cache.c:1884
>#9  0x00007f3659c8732f in run_in_thread (job=<optimized out>, c=0x55fdd8345490 [CamelOperation], _data=0x55fdda4e1b90) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gio/gsimpleasyncresult.c:898
>#10 0x00007f3659c732b6 in io_job_thread (task=<optimized out>, source_object=<optimized out>, task_data=0x55fdda4cba40, cancellable=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gio/gioscheduler.c:85
>#11 0x00007f3659c992fd in g_task_thread_pool_thread (thread_data=0x55fdd8100000, pool_data=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gio/gtask.c:1288
>#12 0x00007f365971e4de in g_thread_pool_thread_proxy (data=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthreadpool.c:307
>#13 0x00007f365971db45 in g_thread_proxy (data=0x55fdd8183630) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthread.c:780
>#14 0x00007f365d4706fa in start_thread (arg=0x7f35d8487700) at pthread_create.c:333
>#15 0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 6 (Thread 0x7f35d7c86700 (LWP 1742)):
>#0  0x00007f36593dee8d in poll () at ../sysdeps/unix/syscall-template.S:84
>#1  0x00007f36596f731c in g_main_context_iterate (priority=2147483647, n_fds=1, fds=0x7f35c8001ac0, timeout=<optimized out>, context=0x7f35c8002610) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4135
>#2  0x00007f36596f731c in g_main_context_iterate (context=0x7f35c8002610, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:3835
>#3  0x00007f36596f76a2 in g_main_loop_run (loop=0x7f35c80025f0) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4034
>#4  0x00007f365cea2f16 in camel_async_closure_wait (closure=closure@entry=0x55fdda6f6590) at camel-async-closure.c:132
>#5  0x00007f365cf06ec7 in camel_service_connect_sync (service=service@entry=0x55fdd8281130 [CamelIMAPXStore], cancellable=cancellable@entry=0x55fdda6d3f90 [CamelOperation], error=error@entry=0x7f35d7c85b00) at camel-service.c:1767
>#6  0x00007f365cf1542c in camel_store_get_folder_info_sync (error=0x7f35d7c85b00, cancellable=0x55fdda6d3f90 [CamelOperation], store=0x55fdd8281130 [CamelIMAPXStore]) at camel-store.c:327
>#7  0x00007f365cf1542c in camel_store_get_folder_info_sync (store=0x55fdd8281130 [CamelIMAPXStore], top=top@entry=0x0, flags=flags@entry=(CAMEL_STORE_FOLDER_INFO_FAST | CAMEL_STORE_FOLDER_INFO_RECURSIVE | CAMEL_STORE_FOLDER_INFO_SUBSCRIBED), cancellable=cancellable@entry=0x55fdda6d3f90 [CamelOperation], error=error@entry=0x7f35d7c85b00) at camel-store.c:1543
>#8  0x00007f365cf158c6 in store_get_folder_info_thread (task=0x55fdda6f48d0 [GTask], source_object=0x55fdd8281130, task_data=<optimized out>, cancellable=0x55fdda6d3f90 [CamelOperation]) at camel-store.c:1676
>#9  0x00007f3659c992fd in g_task_thread_pool_thread (thread_data=0x55fdda6f48d0, pool_data=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gio/gtask.c:1288
>#10 0x00007f365971e4de in g_thread_pool_thread_proxy (data=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthreadpool.c:307
>#11 0x00007f365971db45 in g_thread_proxy (data=0x55fdd82ec850) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthread.c:780
>#12 0x00007f365d4706fa in start_thread (arg=0x7f35d7c86700) at pthread_create.c:333
>#13 0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 5 (Thread 0x7f35d723b700 (LWP 1745)):
>#0  0x00007f365d4752b7 in __GI___pthread_rwlock_rdlock (rwlock=0x55fdd7caddc0) at pthread_rwlock_rdlock.c:135
>#1  0x00007f36599f3053 in g_type_check_value (type=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gobject/gtype.c:4167
>#2  0x00007f36599f3053 in g_type_check_value (value=value@entry=0x7f35d723a480) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gobject/gtype.c:4206
>#3  0x00007f36599f5436 in g_value_unset (value=value@entry=0x7f35d723a480) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gobject/gvalue.c:270
>#4  0x00007f36599d5cce in g_object_get_valist (object=0x55fdda96cc30 [GTlsCertificateGnutls], first_property_name=<optimized out>, var_args=0x7f35d723a530) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gobject/gobject.c:2243
>#5  0x00007f36599d60cc in g_object_get (_object=0x55fdda96cc30, first_property_name=first_property_name@entry=0x7f3659d1cc8b "issuer") at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gobject/gobject.c:2322
>#6  0x00007f3659c9d315 in g_tls_certificate_get_issuer (cert=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gio/gtlscertificate.c:670
>#7  0x00007f35d5251e13 in  () at /usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so
>#8  0x00007f35d524fa12 in  () at /usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so
>#9  0x00007f3659c992fd in g_task_thread_pool_thread (thread_data=0x7f362c0074e0, pool_data=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gio/gtask.c:1288
>#10 0x00007f365971e4de in g_thread_pool_thread_proxy (data=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthreadpool.c:307
>#11 0x00007f365971db45 in g_thread_proxy (data=0x55fdd82ec9e0) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthread.c:780
>#12 0x00007f365d4706fa in start_thread (arg=0x7f35d723b700) at pthread_create.c:333
>#13 0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 4 (Thread 0x7f35d6885700 (LWP 1746)):
>#0  0x00007f36593e4c19 in syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
>#1  0x00007f365973bbaf in g_cond_wait (cond=cond@entry=0x7f362c007568, mutex=mutex@entry=0x7f362c007560) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthread-posix.c:1397
>#2  0x00007f3659c990a3 in g_task_run_in_thread_sync (task=0x7f362c0074e0 [GTask], task_func=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gio/gtask.c:1451
>#3  0x00007f35d52504aa in  () at /usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so
>#4  0x00007f3659c90602 in g_socket_client_connect (client=client@entry=0x55fdd8350680 [GSocketClient], connectable=connectable@entry=0x7f35c4002570, cancellable=cancellable@entry=0x55fdd8345490 [CamelOperation], error=error@entry=0x7f35d6884a90) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gio/gsocketclient.c:1130
>#5  0x00007f365cef1862 in network_service_connect_sync (service=0x55fdd8281130, cancellable=0x55fdd8345490 [CamelOperation], error=0x7f35d6884a90) at camel-network-service.c:553
>#6  0x00007f363699fa30 in imapx_connect_to_server (is=is@entry=0x55fdd82f07a0 [CamelIMAPXServer], cancellable=cancellable@entry=0x55fdd8345490 [CamelOperation], error=error@entry=0x7f35d6884a90) at camel-imapx-server.c:2656
>#7  0x00007f36369a4764 in camel_imapx_server_connect_sync (error=0x7f35d6884a90, cancellable=0x55fdd8345490 [CamelOperation], is=0x55fdd82f07a0 [CamelIMAPXServer]) at camel-imapx-server.c:3063
>#8  0x00007f36369a4764 in camel_imapx_server_connect_sync (is=is@entry=0x55fdd82f07a0 [CamelIMAPXServer], cancellable=cancellable@entry=0x55fdd8345490 [CamelOperation], error=error@entry=0x7f35d6884a90) at camel-imapx-server.c:3873
>#9  0x00007f363698b2dc in camel_imapx_conn_manager_ref_connection (error=0x7f35d6884a90, cancellable=0x55fdd8345490 [CamelOperation], mailbox=0x0, conn_man=0x55fdd7f08ec0 [CamelIMAPXConnManager]) at camel-imapx-conn-manager.c:760
>#10 0x00007f363698b2dc in camel_imapx_conn_manager_ref_connection (conn_man=conn_man@entry=0x55fdd7f08ec0 [CamelIMAPXConnManager], mailbox=mailbox@entry=0x0, cancellable=cancellable@entry=0x55fdd8345490 [CamelOperation], error=error@entry=0x7f35d6884b00) at camel-imapx-conn-manager.c:885
>#11 0x00007f363698b8b1 in camel_imapx_conn_manager_connect_sync (conn_man=0x55fdd7f08ec0 [CamelIMAPXConnManager], cancellable=0x55fdd8345490 [CamelOperation], error=0x7f35d6884b00) at camel-imapx-conn-manager.c:1006
>#12 0x00007f365cf04a35 in service_shared_connect_thread (task=0x7f3630003680 [GTask], source_object=0x55fdd8281130, task_data=<optimized out>, cancellable=0x55fdd8345490 [CamelOperation]) at camel-service.c:555
>#13 0x00007f3659c992fd in g_task_thread_pool_thread (thread_data=0x7f3630003680, pool_data=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gio/gtask.c:1288
>#14 0x00007f365971e4de in g_thread_pool_thread_proxy (data=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthreadpool.c:307
>#15 0x00007f365971db45 in g_thread_proxy (data=0x55fdd82eca30) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gthread.c:780
>#16 0x00007f365d4706fa in start_thread (arg=0x7f35d6885700) at pthread_create.c:333
>#17 0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 3 (Thread 0x7f35b67fc700 (LWP 1759)):
>#0  0x00007f365d4763a0 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
>#1  0x00007f36559db90c in std::condition_variable::wait(std::unique_lock<std::mutex>&) () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
>#2  0x00007f3653fe095a in JSC::BlockAllocator::blockFreeingThreadMain() () at /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-3.0.so.0
>#3  0x00007f36542c1b0a in  () at /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-3.0.so.0
>#4  0x00007f365d4706fa in start_thread (arg=0x7f35b67fc700) at pthread_create.c:333
>#5  0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 2 (Thread 0x7f35b5ffb700 (LWP 1760)):
>#0  0x00007f365d4763a0 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
>#1  0x00007f36559db90c in std::condition_variable::wait(std::unique_lock<std::mutex>&) () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
>#2  0x00007f3653fe1d1b in JSC::GCThread::waitForNextPhase() () at /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-3.0.so.0
>#3  0x00007f3653fe1e08 in JSC::GCThread::gcThreadMain() () at /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-3.0.so.0
>#4  0x00007f36542c1b0a in  () at /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-3.0.so.0
>#5  0x00007f365d4706fa in start_thread (arg=0x7f35b5ffb700) at pthread_create.c:333
>#6  0x00007f36593eab5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
>
>Thread 1 (Thread 0x7f365e09dac0 (LWP 1732)):
>#0  0x00007f36593dee8d in poll () at ../sysdeps/unix/syscall-template.S:84
>#1  0x00007f36596f731c in g_main_context_iterate (priority=2147483647, n_fds=4, fds=0x55fdda4e2380, timeout=<optimized out>, context=0x55fdd7d07630) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4135
>#2  0x00007f36596f731c in g_main_context_iterate (context=0x55fdd7d07630, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:3835
>#3  0x00007f36596f76a2 in g_main_loop_run (loop=0x55fdda4dbeb0) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4034
>#4  0x00007f365a1aa6f5 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
>#5  0x000055fdd5f44a61 in main (argc=1, argv=0x7ffca7380b48) at main.c:660
Comment 15 Clemens 2016-05-09 12:31:36 UTC
Created attachment 327514 [details]
gdb --batch --ex "t a a bt" -pid=`pidof evolution` &>bt.txt (2nd try 30 sec later)
Comment 16 Milan Crha 2016-05-09 16:02:41 UTC
This is about Thread 5. The two backtraces show that the operation is not fully stuck, because the thread changed there.

I realized that I used older glib2 than you. Using glib 2.48.0 and glib-networking 2.48.0 I can reproduce the high CPU usage too, with the same backtrace as you above. I updated glib-networking to 2.48.1 and the issue went away, which led me to bug #765317. Please update the glib-networking to 2.48.1, or let the distribution maintainers know to update it in the repositories, eventually to include fix [1] in the build system.

Thanks for your help with the investigation and your patience.

[1] https://git.gnome.org/browse/glib-networking/commit/?id=7db4dbf

*** This bug has been marked as a duplicate of bug 765317 ***
Comment 17 Michael Catanzaro 2016-05-09 17:01:41 UTC
Note that bug #765317 only occurs when a broken TLS server sends a malformed chain of certificates, so if you can reproduce that, it indicates a bug in the mail server (in addition to the client-side bug).
Comment 18 Clemens 2016-05-21 11:23:42 UTC
@Michael Catanzaro: 
Thanks for your hint. I have corrected the imap ssl courier configuration. Evolution works. :-)