{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/client/issues/2676","labels_url":"https://api.github.com/repos/owncloud/client/issues/2676/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/client/issues/2676/comments","events_url":"https://api.github.com/repos/owncloud/client/issues/2676/events","html_url":"https://github.com/owncloud/client/issues/2676","id":53659618,"number":2676,"title":"1.7.1 client: data corruption when the client chunked PUT times out","user":{"login":"moscicki","id":621965,"avatar_url":"https://avatars.githubusercontent.com/u/621965?v=3","gravatar_id":"","url":"https://api.github.com/users/moscicki","html_url":"https://github.com/moscicki","followers_url":"https://api.github.com/users/moscicki/followers","following_url":"https://api.github.com/users/moscicki/following{/other_user}","gists_url":"https://api.github.com/users/moscicki/gists{/gist_id}","starred_url":"https://api.github.com/users/moscicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moscicki/subscriptions","organizations_url":"https://api.github.com/users/moscicki/orgs","repos_url":"https://api.github.com/users/moscicki/repos","events_url":"https://api.github.com/users/moscicki/events{/privacy}","received_events_url":"https://api.github.com/users/moscicki/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/client/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/client/milestones/12","labels_url":"https://api.github.com/repos/owncloud/client/milestones/12/labels","id":518706,"number":12,"title":"1.8 - UI Enhancements","description":"","creator":{"login":"MTRichards","id":1818977,"avatar_url":"https://avatars.githubusercontent.com/u/1818977?v=3","gravatar_id":"","url":"https://api.github.com/users/MTRichards","html_url":"https://github.com/MTRichards","followers_url":"https://api.github.com/users/MTRichards/followers","following_url":"https://api.github.com/users/MTRichards/following{/other_user}","gists_url":"https://api.github.com/users/MTRichards/gists{/gist_id}","starred_url":"https://api.github.com/users/MTRichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MTRichards/subscriptions","organizations_url":"https://api.github.com/users/MTRichards/orgs","repos_url":"https://api.github.com/users/MTRichards/repos","events_url":"https://api.github.com/users/MTRichards/events{/privacy}","received_events_url":"https://api.github.com/users/MTRichards/received_events","type":"User","site_admin":false},"open_issues":89,"closed_issues":22,"state":"open","created_at":"2013-12-20T19:27:10Z","updated_at":"2015-01-08T09:40:51Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-01-07T17:42:22Z","updated_at":"2015-01-08T09:43:43Z","closed_at":null,"body":"We have seen data corruption which happens when the chunked upload (of the first chunk) times out while talking to the nginx proxy (over SSL, proxy terminates SSL). That happened due to a network problem in the smashbox testing and after some pain I managed to reproduce it manually.\r\n\r\nSteps to reproduce (on redhat6):\r\n - run owncloudcmd 1.7.1 which starts chunked upload (our test files are 30MB)\r\n - suspend the owncloudcmd process (and all its threads)  immediately after it starts putting first chunk, keep it suspended for a bit more than 60 seconds\r\n\r\nIn the nginx logs we have records of three requests:\r\n - first PUT returning 408 after 60 seconds (Client TimeOut) -- never reached upstream server\r\n - two subsequent PUTs (two chunks uploaded) returning 200 -- processed correctly by the upstream server\r\n\r\nTo check what goes on on the nginx proxy I have configured nginx to leave temporary files with request bodies:\r\n```\r\nclient_body_in_file_only on;\r\nclient_body_in_single_buffer on;\r\nclient_body_temp_path /var/spool/nginx/tmp/client_body/;\r\n```\r\n\r\nI then concatenate two chunked PUT request bodies corresponding to my file:\r\n```\r\ncat /var/spool/nginx/tmp/client_body/0000000054 /var/spool/nginx/tmp/client_body/0000000055 > /tmp/FULL\r\n```\r\n\r\nWhen I run the md5sum on /tmp/FULL  it corresponds exactly the file saved by the upstream storage server but it is different than the checksum of the original file that sync client was uploading.\r\n\r\nCould you please examine the source code for client timeout condition for chunked PUTs? It is hard to sniff the traffic with SSL. Would it be plausible to have an option to save the payload of the PUT body into tmp files for debugging?\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/client/issues/comments/69156716","html_url":"https://github.com/owncloud/client/issues/2676#issuecomment-69156716","issue_url":"https://api.github.com/repos/owncloud/client/issues/2676","id":69156716,"user":{"login":"guruz","id":959327,"avatar_url":"https://avatars.githubusercontent.com/u/959327?v=3","gravatar_id":"","url":"https://api.github.com/users/guruz","html_url":"https://github.com/guruz","followers_url":"https://api.github.com/users/guruz/followers","following_url":"https://api.github.com/users/guruz/following{/other_user}","gists_url":"https://api.github.com/users/guruz/gists{/gist_id}","starred_url":"https://api.github.com/users/guruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guruz/subscriptions","organizations_url":"https://api.github.com/users/guruz/orgs","repos_url":"https://api.github.com/users/guruz/repos","events_url":"https://api.github.com/users/guruz/events{/privacy}","received_events_url":"https://api.github.com/users/guruz/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T09:43:42Z","updated_at":"2015-01-08T09:43:42Z","body":"@moscicki We're not the only Qt users though... are there similar bugreports e.g. on http://bugs.qt-project.org ?\r\nCan you reproduce this if you force the usage of the old propagator?  (```export OWNCLOUD_USE_LEGACY_JOBS=1```)\r\ncurl might not see it because of the HTTP 100 you mentioned?"}}