Skip to content

Endless Loop on syncing folders with special char (Umlaut) #45

Closed

Description

@wulu-zz

A foldername including a german umlaut cant be synced.
It ends up in an endless loop, the client tries to find the folder,
cant find it, creates it & starts again.

OSX Client 1.1.1-1
Server 4.5.1 On Ubuntu 12 x64

FolderName on OSX Bügel1

Apache Log:
213.196.111.111 - username [03/Nov/2012:13:06:26 +0100] "PROPFIND /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1 HTTP/1.1" 404 106 "-" "csyncoC/0.60.1 neon/0.29.6"
213.196.111.111 - username [03/Nov/2012:13:06:26 +0100] "PROPFIND /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1 HTTP/1.1" 404 106 "-" "csyncoC/0.60.1 neon/0.29.6"
213.196.111.111 - username [03/Nov/2012:13:06:26 +0100] "MKCOL /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1/ HTTP/1.1" 201 53 "-" "csyncoC/0.60.1 neon/0.29.6"
213.196.111.111 - username [03/Nov/2012:13:06:26 +0100] "PROPFIND /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1 HTTP/1.1" 404 106 "-" "csyncoC/0.60.1 neon/0.29.6"
213.196.111.111 - username [03/Nov/2012:13:06:26 +0100] "PROPFIND /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1 HTTP/1.1" 404 106 "-" "csyncoC/0.60.1 neon/0.29.6"
213.196.111.111 - username [03/Nov/2012:13:06:26 +0100] "MKCOL /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1/ HTTP/1.1" 201 53 "-" "csyncoC/0.60.1 neon/0.29.6"
213.196.111.111 - username [03/Nov/2012:13:06:26 +0100] "PROPFIND /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1 HTTP/1.1" 404 106 "-" "csyncoC/0.60.1 neon/0.29.6"
213.196.111.111 - username [03/Nov/2012:13:06:26 +0100] "PROPFIND /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1 HTTP/1.1" 404 106 "-" "csyncoC/0.60.1 neon/0.29.6"
213.196.111.111 - username [03/Nov/2012:13:06:26 +0100] "MKCOL /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1/ HTTP/1.1" 201 53 "-" "csyncoC/0.60.1 neon/0.29.6"
213.196.111.111 - username [03/Nov/2012:13:06:26 +0100] "PROPFIND /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1 HTTP/1.1" 404 106 "-" "csyncoC/0.60.1 neon/0.29.6"
213.196.111.111 - username [03/Nov/2012:13:06:26 +0100] "PROPFIND /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1 HTTP/1.1" 404 106 "-" "csyncoC/0.60.1 neon/0.29.6"
213.196.111.111 - username [03/Nov/2012:13:06:26 +0100] "MKCOL /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1/ HTTP/1.1" 201 53 "-" "csyncoC/0.60.1 neon/0.29.6"

owncloud OSX Client Log:

11-03 13:07:57:365 csync.propagator - file: ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1/restore.rtf, command: open(O_CREAT), error: 2
11-03 13:07:57:365 csync.owncloud - owncloud_stat ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1 called
11-03 13:07:57:365 csync.owncloud - stat results fetched.
11-03 13:07:57:418 csync.owncloud - Request failed, don't take session header.
:11-03 13:07:57:080 csync.owncloud - stat results from fs cache - md5: 5095091adf2683.04556026
11-03 13:07:57:080 csync.owncloud - MKdir on /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1/
11-03 13:07:57:139 csync.owncloud - => open called for ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1/restore.rtf
11-03 13:07:57:139 csync.owncloud - Stating directory ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1
11-03 13:07:57:139 csync.owncloud - owncloud_stat ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1 called
11-03 13:07:57:139 csync.owncloud - stat results fetched.
11-03 13:07:57:199 csync.owncloud - Request failed, don't take session header.
11-03 13:07:57:199 csync.owncloud - WRN: propfind named failed with 1, request error: 404 Not Found
11-03 13:07:57:199 csync.owncloud - Session error string 404 Not Found
11-03 13:07:57:199 csync.owncloud - stat fails with errno 2
11-03 13:07:57:199 csync.owncloud - Directory ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1 of file to open does NOT exist.
11-03 13:07:57:199 csync.propagator - file: ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1/restore.rtf, command: open(O_CREAT), error: 2
11-03 13:07:57:199 csync.owncloud - owncloud_stat ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1 called
11-03 13:07:57:199 csync.owncloud - stat results fetched.
11-03 13:07:57:258 csync.owncloud - Request failed, don't take session header.
11-03 13:07:57:258 csync.owncloud - WRN: propfind named failed with 1, request error: 404 Not Found
11-03 13:07:57:258 csync.owncloud - Session error string 404 Not Found
11-03 13:07:57:258 csync.owncloud - stat fails with errno 2
11-03 13:07:57:259 csync.owncloud - owncloud_stat ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST called
11-03 13:07:57:259 csync.owncloud - stat results from fs cache - md5: 5095091adf2683.04556026
11-03 13:07:57:259 csync.owncloud - MKdir on /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1/
11-03 13:07:57:311 csync.owncloud - => open called for ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1/restore.rtf
11-03 13:07:57:311 csync.owncloud - Stating directory ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1
11-03 13:07:57:311 csync.owncloud - owncloud_stat ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1 called
11-03 13:07:57:311 csync.owncloud - stat results fetched.
11-03 13:07:57:364 csync.owncloud - Request failed, don't take session header.
11-03 13:07:57:364 csync.owncloud - WRN: propfind named failed with 1, request error: 404 Not Found
11-03 13:07:57:364 csync.owncloud - Session error string 404 Not Found
11-03 13:07:57:364 csync.owncloud - stat fails with errno 2
11-03 13:07:57:364 csync.owncloud - Directory ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1 of file to open does NOT exist.
11-03 13:07:57:365 csync.propagator - file: ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1/restore.rtf, command: open(O_CREAT), error: 2
11-03 13:07:57:365 csync.owncloud - owncloud_stat ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1 called
11-03 13:07:57:365 csync.owncloud - stat results fetched.
11-03 13:07:57:418 csync.owncloud - Request failed, don't take session header.
mbp-rt:MacOS thoenies$ tail -200 /tmp/ownc.log
11-03 13:08:02:509 csync.owncloud - WRN: propfind named failed with 1, request error: 404 Not Found
11-03 13:08:02:509 csync.owncloud - Session error string 404 Not Found
11-03 13:08:02:509 csync.owncloud - stat fails with errno 2
11-03 13:08:02:509 csync.owncloud - owncloud_stat ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST called
11-03 13:08:02:509 csync.owncloud - stat results from fs cache - md5: 5095091adf2683.04556026
11-03 13:08:02:509 csync.owncloud - MKdir on /ocloud/remote.php/webdav/owncloudTEST/Bu%cc%88gel1/
11-03 13:08:02:543 csync.owncloud - => open called for ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1/restore.rtf
11-03 13:08:02:543 csync.owncloud - Stating directory ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1
11-03 13:08:02:543 csync.owncloud - owncloud_stat ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1 called
11-03 13:08:02:543 csync.owncloud - stat results fetched.
11-03 13:08:02:577 csync.owncloud - Request failed, don't take session header.
11-03 13:08:02:577 csync.owncloud - WRN: propfind named failed with 1, request error: 404 Not Found
11-03 13:08:02:577 csync.owncloud - Session error string 404 Not Found
11-03 13:08:02:577 csync.owncloud - stat fails with errno 2
11-03 13:08:02:577 csync.owncloud - Directory ownclouds://www.server.de/ocloud/remote.php/webdav/owncloudTEST/Bügel1 of file to open does NOT exist.

Activity

  1. dragotin commented on Nov 5, 2012

    @dragotin
    Contributor

    As you can see in the Server log the url is encoded, and Bügel1 is encoded to Bu%cc%88gel1 which appears to be correct as you can test on various online tools. Your server however does not seem to be able to deal with that encoding properly. Would you be so kind to check the apache error log if you can see if it shows errors on that?

    For me, Bügel1 works fine, but my client encodes Bügel1 to B%c3%bcgel1 which also is correct. The encoding is done by ne_path_escape of the neon lib. It boils down to this code:

       for (pnt = (const unsigned char *)path; *pnt != '\0'; pnt++) {
            if (path_escape_ch(*pnt)) {
                /* Escape it - %<hex><hex> */
                sprintf(p, "%%%02x", (unsigned char) *pnt);
                p += 3;
            } else {
                *p++ = *pnt;
            }
        }

    and I wonder how this can produce the different output on the platforms.

  2. wulu-zz commented on Nov 5, 2012

    @wulu-zz
    Author

    except from the message Password Mismatch its empty, but I think that is normal,
    Seems to happen on every access, even on folders that are ok.

    ==> error.log <==
    [Mon Nov 05 22:00:53 2012] [error] [client x.x.x.x] user username: authentication failure for "/webdav/owncloudTEST/Bu\xcc\x88gel1": Password Mismatch
    [Mon Nov 05 22:00:53 2012] [error] [client x.x.x.x] user username: authentication failure for "/webdav/owncloudTEST/Bu\xcc\x88gel1": Password Mismatch
    [Mon Nov 05 22:00:53 2012] [error] [client x.x.x.x] user username: authentication failure for "/webdav/owncloudTEST/Bu\xcc\x88gel1/": Password Mismatch

    I connected with a webdav client (cyberduck) and created the same Folder.
    That one works fine and uses your %c3%bc encoding.

    ==> access.log <==
    x.x.x.x - username [05/Nov/2012:22:24:27 +0100] "MKCOL /ocloud/remote.php/webdav/owncloudTEST/B%C3%BCgel2/ HTTP/1.1" 201 1580 "-" "Cyberduck/4.2.1 (Mac OS X/10.7.5) (i386)"
    x.x.x.x - username [05/Nov/2012:22:24:36 +0100] "PROPFIND /ocloud/remote.php/webdav/owncloudTEST/B%C3%BCgel2/ HTTP/1.1" 207 1255 "-" "Cyberduck/4.2.1 (Mac OS X/10.7.5) (i386)"

    path_escape_ch - I hate such complex defines, cant say i really understand it.

    As far as i understand it, OSX hamdles special chars with the
    NFD-Form (Unicode normalization form D)
    NFD: "u%CC%88"

    other OS's or applications seem to prefer
    NFC-Form (Unicode normalization form C)
    NFC: "%C3%BC"

    maybe the webdav server could run a function like this before it handles the url
    if (!normalizer_is_normalized($uri)) {
    $uri = normalizer_normalize($uri);
    }

  3. MTRichards commented on Nov 20, 2012

    @MTRichards

    I'm experiencing that a customer is causing a loop with it's client sync. This same log entry loops over and over twice every second. It gives an error 404, which might be a bug with special characters? Our primary customers are Danish which means that they are using characters like: æ, ø and å.

    [20/Nov/2012:10:52:12 +0100] "PROPFIND /remote.php/webdav/F%c3%b8rstehj%c3%a6lp.com/1-Kunder/2012/Salg%20af%20hjertestartere/8-Give%20st%c3%a5lsp%c3%a6r%20-%201%20zoll%20%2b%206%20timer%20FH/2012-3-Give%20st%c3%a5lsp%c3%a6r%20-%206%20timer%20FH%20og%20ZOLL/SV%20tilbud%20fra%20F%c3%b8rstehj%c3%a6lp.com-filer HTTP/1.1" 404 874 "-" "csyncoC/0.60.1 neon/0.29.6"

    The folder mentioned is existing, but no files are located in that folder at the moment.

    A little more information from apache error.log to assist you.

    [Tue Nov 20 10:36:17 2012] [apc-warning] Potential cache slam averted for key '50a25a3fcdc6e/[email protected]/fileid//[email protected]/files/Førstehjælp.com/1-Kunder/2012/Salg af hjertestartere/8-Give stålspær - 1 zoll + 6 timer FH' in /var/www/cloud/lib/cache/apc.php on line 35.

    [Tue Nov 20 10:53:47 2012] [error] [client 87.59.192.118] PHP Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) in /var/www/cloud/lib/base.php on line 265

    The OS is ubuntu 10.04.

  4. dragotin commented on Nov 21, 2012

    @dragotin
    Contributor

    I implemented a loop detection in csync today so that the mkdir routine can not loop any more. That will fix the symptom, but it will not fix the underlying issue of rong encodings.

  5. MTRichards commented on Dec 11, 2012

    @MTRichards
  6. wulu-zz commented on Jan 1, 2013

    @wulu-zz
    Author

    Problem solved with OSX Client 1.1.4

    Mirall/ownCloud Client, version 1.1.4
    csync 0.60.4 required.

    • No changes to mirall/ownCloud Client source.
    • [Fixes] csync: Fix encoding issues on MacOSX clients, now the client sends normalized unicode on that platform.

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions