Weave deadlocks if an invalid response is received from the WebDAV server

RESOLVED FIXED

Status

RESOLVED FIXED
11 years ago
10 years ago

People

(Reporter: mbrito, Assigned: hello)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0; Weave 0.2.0

I'm seeing the following error on my logs:

2008-07-08 12:40:19     Async.Generator ERROR   Exception: Component returned fa
ilure code: 0x80004005 (NS_ERROR_FAILURE) [nsIJSON.decode] (JS frame :: file:///
Users/pazu/Library/Application%20Support/Firefox/Profiles/b3whpukl.default/exten
sions/%7B340c2bbc-ce74-4362-90b5-7c26312808ef%7D/modules/service.js :: WeaveSvc_
_getKeypair :: line 419)

After this, every subsequently scheduled sync says:

2008-07-08 12:43:51     Service.Main    INFO    Skipping scheduled sync; local o
peration in progress

Apparently the WebDAV server returned a malformed response (caused by a bad proxy, most likely), and Weave never recovers from this situation.

Reproducible: Didn't try

Steps to Reproduce:
Happens sporadically, but should be reproduceable if you can somehow make the WebDAV server return garbage for a lock request.
(Reporter)

Comment 1

11 years ago
Created attachment 328504 [details] [diff] [review]
patch to catch (and ignore) any exceptions thrown while parsing the lock response

Proposed patch for this problem. I simply surrounded the whole lock response parsing in a try block, catching any exceptions thrown.
(Assignee)

Comment 2

11 years ago
isn't this a duplicate of bug 443385?
(Assignee)

Comment 3

11 years ago
Ah, this is when locking.  Your patch seems like a good approach, though I think we should rethrow.  Hacking on it now.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 4

11 years ago
Created attachment 328588 [details] [diff] [review]
catch lock errors v2

Here's my version, based on yours.  I extended the try-catch to the whole method, and rethrow any exceptions.  Will probably commit this soon after some more testing.
Assignee: nobody → thunder
Attachment #328504 - Attachment is obsolete: true
Status: NEW → ASSIGNED

Comment 5

10 years ago
Also noticed this issue when signing in... if the sign-in fails with:
Async.Generator	ERROR  Exception: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.open]
 (JS frame :: file:///C:/Documents%20and%20Settings/user/Application%20Data/Mozilla/Firefox/Profiles/xxxxxxxx.default/extensions/%7B340c2bbc-ce74-4362-90b5-7c26312808ef%7D/modules/dav.js :: DC__makeRequest :: line 147)

Then it will never try again, it just fails immediately with:
Async.Generator	ERROR  Exception: Request already in progress

Noticed it because I'm using mydisk.se as DAV server which (usually) works really well, but sometimes their response is incorrect/malformed, but will work if retried a couple times...
But with weave, if one time fails, it never tries again.
(Assignee)

Comment 6

10 years ago
Weave no longer uses WebDAV.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Updated

10 years ago
Component: Weave → General
Product: Mozilla Labs → Weave
Target Milestone: -- → ---

Updated

10 years ago
Component: Weave → General
Product: Mozilla Labs → Weave
Target Milestone: -- → ---
QA Contact: weave → general
You need to log in before you can comment on or make changes to this bug.