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 659873 - wastes minutes chasing after dead IMAP connections
wastes minutes chasing after dead IMAP connections
Status: RESOLVED DUPLICATE of bug 551788
Product: evolution
Classification: Applications
Component: Mailer
3.2.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 661138 661310 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-09-22 20:24 UTC by robert
Modified: 2012-05-18 15:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description robert 2011-09-22 20:24:57 UTC
Evolution should use Network Manager's D-Bus API to realise/decide when its IMAP connections will have been severed by a change in local IP or default route when a new interface comes up (not down - as they can come back with the same IP and TCP connections intact). Otherwise when you come back from suspend/resume or just move network, it sits for ages trying to talk down the old TCP connections, rendering the UI semi-useless until you manually toggle between offline/online (complete with the "do you want to synchronise?" dialog in between) or the TCP connections time out, leaving the user frustrated and confused at why their Internet connection isn't working.
Comment 1 Matthias Clasen 2011-09-22 22:45:27 UTC
Amen.
Comment 2 Matthew Barnes 2011-09-22 23:53:26 UTC
Well we already listen for "StateChanged" signals from Network Manager and respond accordingly.  Are there other parts of Network Manager's D-Bus API that we should be listening to?

The problem as I see it is that libcamel still rolls its own DNS resolver and network stream APIs, parts of which are not responsive to the cancellations that Evolution sends it when the network state changes.
Comment 3 Ian B. MacDonald 2011-09-28 16:00:06 UTC
I believe this may be my number one use for --force-shutdown.  Unless there is another reason my exits tend to hang-up on expunge operations.
Comment 4 Matthew Barnes 2011-10-06 23:51:56 UTC
*** Bug 661138 has been marked as a duplicate of this bug. ***
Comment 5 Matthew Barnes 2011-10-09 13:52:19 UTC
*** Bug 661310 has been marked as a duplicate of this bug. ***
Comment 6 Johannes Schmid 2011-10-12 22:51:15 UTC
> Well we already listen for "StateChanged" signals from Network Manager and
> respond accordingly.  Are there other parts of Network Manager's D-Bus API that
> we should be listening to?
 
In my personal experience this doesn't seem to work well. Evolution doesn't show me that it is "Offline" when NetworkManager clearly shows it. It also seems to try to sync folders with the server even if the NM is offline.

> The problem as I see it is that libcamel still rolls its own DNS resolver and
> network stream APIs, parts of which are not responsive to the cancellations
> that Evolution sends it when the network state changes.

It probably shouldn't do that! Is there a reason for it or does it just do that because things like GSocket haven't been in place back then?
Comment 7 Matthew Barnes 2011-10-12 23:27:44 UTC
(In reply to comment #6)
> > The problem as I see it is that libcamel still rolls its own DNS resolver and
> > network stream APIs, parts of which are not responsive to the cancellations
> > that Evolution sends it when the network state changes.
> 
> It probably shouldn't do that! Is there a reason for it or does it just do that
> because things like GSocket haven't been in place back then?

Camel's stream APIs predate GSocket by a million years or so.

Looking forward to dumping it just as soon as glib-networking supports NSS certificates...
Comment 8 Johannes Schmid 2011-10-13 00:36:55 UTC
> Camel's stream APIs predate GSocket by a million years or so.

Yeah, the good old days where we believed in Bonobo/CORBA and grey was the color of choice for a desktop...


> Looking forward to dumping it just as soon as glib-networking supports NSS
> certificates...

Is there a bug about it? I found some bugs related to TLS but nothing seems to mention NSS. Maybe it should be filed for reference?
Comment 9 Matthew Barnes 2011-10-13 00:46:27 UTC
(In reply to comment #8)
> Is there a bug about it? I found some bugs related to TLS but nothing seems to
> mention NSS. Maybe it should be filed for reference?

I'm sure Dan Winship has bugs filed already, just don't have 'em handy.

Last we spoke he thought I'd have something to work with by 3.5.
Comment 10 Matthew Barnes 2011-11-04 22:48:16 UTC
I think I may have made some progress on this today, quite by accident, having stumbled upon PR_Interrupt() for secure connections and figuring out how to make it work with GCancellable.  Quite simple in the end, but I'm still on the NSS/NSPR learning curve.

I had a situation where Evolution was blocked in a PR_Connect() call and didn't respond to cancellation requests.  It now does.

DNS lookup is still an issue, but that's a different beast.

My changes today will ship in Evolution-Data-Server 3.3.2.
Comment 11 Milan Crha 2011-12-05 10:47:18 UTC
Similar downstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=759735
Comment 12 Milan Crha 2012-05-18 15:01:58 UTC

*** This bug has been marked as a duplicate of bug 551788 ***