Closed Bug 444119 Opened 16 years ago Closed 15 years ago

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

Categories

(Cloud Services :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mbrito, Assigned: hello)

Details

Attachments

(1 file, 1 obsolete file)

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.
Proposed patch for this problem. I simply surrounded the whole lock response parsing in a try block, catching any exceptions thrown.
isn't this a duplicate of bug 443385?
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
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
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.
Weave no longer uses WebDAV.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Component: Weave → General
Product: Mozilla Labs → Weave
Target Milestone: -- → ---
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.

Attachment

General

Creator:
Created:
Updated:
Size: