Priority medium
Bug ID 57214
Summary SyncEvolution blocks when the server misbehaves
Severity minor
Classification Unclassified
OS All
Hardware Other
Status NEW
Version 1.3
Component SyncEvolution
Product SyncEvolution

I just realised, while debugging my auth problems from bug 56240 that
SyncEvolution can't be interrupted if the server misbehaves.

I my case, I tried to set up a simple digest auth server like so:

 1) pip install  -E /tmp/cyclone -e
 2) apply the following diff, i.e.
    cd /tmp/cyclone/src/cyclone/; patch -p1 <<EOF

diff --git a/demos/digest_auth/ b/demos/digest_auth/
index 020e6ef..e89561a 100755
--- a/demos/digest_auth/
+++ b/demos/digest_auth/
@@ -31,7 +31,7 @@ from twisted.internet import reactor
 class Application(cyclone.web.Application):
     def __init__(self):
         handlers = [
-            (r"/", MainHandler),
+            (r".*$", MainHandler),
         settings = dict(
@@ -40,8 +40,9 @@ class Application(cyclone.web.Application):
         cyclone.web.Application.__init__(self, handlers, **settings)

 class MainHandler(digest.DigestAuthMixin, cyclone.web.RequestHandler):
+    SUPPORTED_METHODS = cyclone.web.RequestHandler.SUPPORTED_METHODS +
     def passwordz(username):
         creds = {
                 'auth_username': 'test',


 3) run the /tmp/cyclone/bin/python

 4) Have the setup routine from bug 56263 comment #0 run with

 5) then run syncevolution --daemon=no  target-config@radicale cards1

The server should crash like this: 

$ ./ 2012-11-17 02:20:22+0100 [-] Log opened.
2012-11-17 02:20:22+0100 [-] Application starting on 8889
2012-11-17 02:20:22+0100 [-] Starting factory <__main__.Application instance at
2012-11-17 02:20:23+0100 [HTTPConnection,0,] 401 GET /foo/bar/cardss
( 0.78ms
2012-11-17 02:20:25+0100 [HTTPConnection,1,] 401 GET /foo/bar/c
( 0.38ms
2012-11-17 02:20:28+0100 [HTTPConnection,2,] Unhandled error in
2012-11-17 02:20:28+0100 [HTTPConnection,2,] Unhandled Error
    Traceback (most recent call last):
      File "/tmp/cyclone2/src/cyclone/cyclone/", line 185, in
      File "/tmp/cyclone2/src/cyclone/cyclone/", line 1358, in __call__
        handler._execute(transforms, *args, **kwargs)
      File "/tmp/cyclone2/src/cyclone/cyclone/", line 958, in _execute
        callbackArgs=(args, kwargs))
"/tmp/cyclone2/lib/python2.7/site-packages/twisted/internet/", line
290, in addCallbacks
    --- <exception caught here> ---
"/tmp/cyclone2/lib/python2.7/site-packages/twisted/internet/", line
551, in _runCallbacks
        current.result = callback(current.result, *args, **kw)
      File "/tmp/cyclone2/src/cyclone/cyclone/", line 967, in
        function = getattr(self, self.request.method.lower())
    exceptions.AttributeError: 'MainHandler' object has no attribute 'propfind'

And syncevolution blocks, i.e. SIGINT (Ctrl+C) doesn't help it to exit. I would
have expected to be able to press Ctrl+C to make it return at some stage.

(gdb) bt
#0  0x000000396d0e8b84 in __GI___poll (fds=0x7fffffffa1d0, nfds=1,
    at ../sysdeps/unix/sysv/linux/poll.c:83
#1  0x00007ffff5f8ce2f in ?? () from /lib64/
#2  0x00007ffff5f8d0df in ?? () from /lib64/
#3  0x00007ffff5f8d26b in ?? () from /lib64/
#4  0x00007ffff5f8dc54 in ne_sock_readline () from /lib64/
#5  0x00007ffff5f8650f in ?? () from /lib64/
#6  0x00007ffff5f86c15 in ne_begin_request () from /lib64/
#7  0x00007ffff5f8630d in ne_request_dispatch () from /lib64/
#8  0x00007ffff5f949ed in ?? () from /lib64/
#9  0x00007ffff624e194 in SyncEvo::Neon::Session::propfindURI(std::string
const&, int, ne_propname const*, boost::function<void (SyncEvo::Neon::URI
const&, ne_prop_result_set_s const*)> const&, SyncEvo::Timespec const&)
(this=0x6e2bd0, path="/foo/barmuelli/cards/", depth=1, props=
    0x7ffff64b1ec0, callback=..., deadline=...) at
Python Exception <type 'exceptions.IndexError'> list index out of range: 
#10 0x00007ffff62316fc in SyncEvo::WebDAVSource::listAllItems (this=0x6d9c20,
    std::map with 0 elements) at src/backends/webdav/WebDAVSource.cpp:1305
#11 0x00007ffff623e2d5 in SyncEvo::WebDAVSource::isEmpty (this=0x6d9c20)
    at src/backends/webdav/WebDAVSource.cpp:1138
#12 0x00000038b58d17f8 in boost::function0<bool>::operator() (this=<optimized
    at /usr/include/boost/function/function_template.hpp:760
#13 0x00000038b58bfeb1 in SyncEvo::SyncContext::getConfigXML (this=0x6900e0,
    "<?xml version=\"1.0\"?>\n<!-- SYNTHESIS SYNCML CLIENT Version 3.2
Configuration file -->\n\n<sysync_config version=\"1.0\">\n\n  <configvar
name=\"logpath\" value=\"$(defout_path)\"/>\n\n  <!-- this string is
output"..., configname=...) at src/syncevo/SyncContext.cpp:2527
#14 0x00000038b58bb8a9 in SyncEvo::SyncContext::initEngine
    logXML=logXML@entry=true) at src/syncevo/SyncContext.cpp:2796
---Type <return> to continue, or q <return> to quit---

FTR: Cyclone is not capable of doing digest auth in a manner that is reliably
testable (cf., so don't bother
looking into that as lightweight, fire and forget solution

You are receiving this mail because: