GNOME Bugzilla – Bug 678615
_g_vfs_daemon_call_sync() does not cancel for HTTP request
Last modified: 2012-12-07 17:31:07 UTC
It would be good to have "Looking up account details" (when crating a new account, when moving on after Name/Email being filled) cancellable, as some servers can just reject response to the request, making it just timeout.
Created attachment 218237 [details] [review] Cancelling account details lookup I implemented this over the weekend and as far as I can tell I'm doing everything right, but when I actually cancel the lookup the gvfs call just hangs forever. Here's the backtrace:
+ Trace 230479
Thread 42 (Thread 0xa425ab70 (LWP 19751))
$1 = 1 So I guess I'll sit on this until I can figure out what's going on. I've attached the patch anyway.
(In reply to comment #1) > $1 = 1 Bugzilla ate my gdb log. Anyway I was trying to show that the GCancellable passed to _g_vfs_daemon_call_sync() in frame 3 is indeed cancelled, but this call seemingly never returns so the progress page with the spinner just spins forever.
Reassigning to gvfs, not to place blame but to solicit help because I'd like for this to work. If I'm doing it wrong I'm willing to change it. The relevant Evolution code is here: http://git.gnome.org/browse/evolution/tree/mail/e-mail-autoconfig.c#n331 I'm basically just calling g_file_load_contents() on an http URI pointing to "api.gnome.org".
gvfs takes cancellable in account more thoroughly now, after gdbus port. Any chance to retest this with at least 1.14 series of gvfs? (In reply to comment #3) > The relevant Evolution code is here: > http://git.gnome.org/browse/evolution/tree/mail/e-mail-autoconfig.c#n331 I see libsoup used, has the decision changed since the original intention? FYI, there's ongoing port to SoupRequester going on in bug 687757, that could change things a bit. In fact, cancelling a http transfer (read operation) is working fine on my side.
(In reply to comment #4) > I see libsoup used, has the decision changed since the original intention? Yes, I rewrote the Evolution code to use libsoup directly in: http://git.gnome.org/browse/evolution/commit/?id=de8aea580de68963bc61838c2889f040f6d3b563 Mainly to avoid the cancellation hang observed in this bug.
Okay, no problem. Closing for now, the SoupRequester port will change state of things anyway. Feel free to reopen if you spot this issue again.