Bug 1346179

Summary: [Camel] Set default connection timeout to 90 seconds
Product: Red Hat Enterprise Linux 7 Reporter: Anthony Symons <ant>
Component: evolution-data-serverAssignee: Milan Crha <mcrha>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.2CC: jkoten, mbarnes, mcrha, vbenes
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: evolution-data-server-3.12.11-33.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 00:25:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
bt.txt requested in comment 1 none

Description Anthony Symons 2016-06-14 08:08:56 UTC
Description of problem:

When Evolution is configured to access email via IMAP it appears to locally cache the IP of the remote server and use it in a way which is blocking inside the kernel. A "killall -9 evolution" is required to force the app to exit, and a restart of the app is required to collect more mail.

Version-Release number of selected component (if applicable):
evolution-3.12.11-15.el7.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. Connect to an imap mail service and leave evolution viewing the mailbox
2. Move the imap server to a different IP and update dns (eg a different network view or a mail server on a dynamic IP)
3. Note that no new mail appears and you cant view unread mail.
4. Close evolution via the UI - notice it greys out but never closes.
5. killall evolution - notice that it does not close.
6. killall -9 evolution - notice it took the really big hammer to close it.

Actual results:
No new mail, cant close or kill app without kill -9

Expected results:
App fails to connect, trys again, resolves the host and new IP and connects to that. If it can not contact the server, not to get in to a state which requires kill -9.

Additional info:
If this is not a bug in evolution core but it can be identified which component has the bug feel free to move it.

Comment 1 Milan Crha 2016-06-14 09:19:21 UTC
Thanks for a bug report. The IMAPx (and basically whole evolution-data-server) uses glib2/glib-networking for the connections, either directly or indirectly (through libsoup). There are set some timeouts for the connections, as far as I know.

Could you install debuginfo packages for the evolution-data-server, evolution, glib2 and glib-networking (make sure the versions match the binary package version), then run the evolution and get it into this "doesn't want to quit" state. When it's there, get the backtrace of it with this command:

   $ 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). It will show what the evolution does and why it doesn't want to quit.

Could you provide also the evolution-data-server package version, please?

By the way, you can also run `evolution --force-shutdown` to stop the evolution related processes. More recent evolution allows to quit gracefully when the quit is not done within a minute or so, by asking the user whether to wait or to quit immediately.

Comment 3 Anthony Symons 2016-06-15 01:53:25 UTC
Hi Milan,

Thanks for looking in to this. Package versions:

evolution-3.12.11-15.el7.x86_64
evolution-devel-3.12.11-15.el7.x86_64

evolution-data-server-3.12.11-24.el7.x86_64
evolution-data-server-devel-3.12.11-24.el7.x86_64

glib2-2.42.2-5.el7.x86_64
glib2-devel-2.42.2-5.el7.x86_64

glib-networking-debuginfo-2.42.0-1.el7.x86_64
glib-networking-2.42.0-1.el7.x86_64

I'll attach bt.txt

Comment 4 Anthony Symons 2016-06-15 01:55:15 UTC
Created attachment 1168122 [details]
bt.txt requested in comment 1

Comment 5 Milan Crha 2016-06-15 07:44:51 UTC
Thanks for the update. You forgot to install debuginfo packages, thus the backtrace is missing line numbers and other valuable information which helps with debugging, but it also shows that one of the threads is waiting inside the call to g_socket_client_connect().

The Camel code (inside evolution-data-server) doesn't set any timeout for this connection, keeping there the default value, which is apparently no timeout at all. I changed this upstream for 3.21.3+ [1] and 3.20.4+ [2].

I'm not sure whether there would be any way to deal with this in a quicker way, maybe on the glib2 side.

[1] https://git.gnome.org/browse/evolution-data-server/commit/?id=4d23a81
[2] https://git.gnome.org/browse/evolution-data-server/commit/?id=594c548

Comment 9 errata-xmlrpc 2016-11-04 00:25:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2206.html