Better handling of unexpected failures during info/collections fetch

RESOLVED FIXED in Firefox 13

Status

Android Background Services
Android Sync
P2
normal
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: rnewman, Assigned: rnewman)

Tracking

unspecified
mozilla14
ARM
Android

Firefox Tracking Flags

(firefox13 fixed, firefox14 fixed)

Details

(Assignee)

Description

5 years ago
Two things that we didn't do in Bug 740326:

* Kill the cleanup thread when the sync is done.
* Catch exceptions in the background fetch thread.
Tested on top of m-c:

changeset:   90610:ff3521bc6559
tag:         tip
parent:      90526:563ea372f000
parent:      90609:d3cc19901240
user:        Marco Bonardo <mbonardo@mozilla.com>
date:        Thu Mar 29 17:37:31 2012 +0200
summary:     Merge last green PGO from inbound to central

Success:

I SyncAdapter(28016)          Stage completed: ensureClusterURL
I GlobalSession(28016)        Running next stage fetchInfoCollections (org.mozilla.gecko.sync.stage.FetchInfoCollectionsStage@410a2b90)...
D BaseResource(28016)         HTTP GET https://phx-sync433.services.mozilla.com/1.1/lvjppaa3q7cqjbfwmhdvivsekvtfwr3s/info/collections
V BaseResource(28016)         Adding Basic Auth header.
D dalvikvm(28016)             GC_CONCURRENT freed 345K, 6% free 8087K/8583K, paused 3ms+3ms
D BaseResource(28016)         Response: HTTP/1.1 200 OK
W GlobalSession(28016)        Aborting sync: Failure fetching info/collections.
W GlobalSession(28016)        java.lang.IllegalArgumentException: Log tag "SyncStorageResourceDelegate" exceeds limit of 23 characters
W GlobalSession(28016)        
W GlobalSession(28016)        	at android.util.Log.isLoggable(Native Method)
W GlobalSession(28016)        	at org.mozilla.gecko.sync.Logger.shouldLogDebug(Logger.java:84)
W GlobalSession(28016)        	at org.mozilla.gecko.sync.Logger.debug(Logger.java:148)
W GlobalSession(28016)        	at org.mozilla.gecko.sync.Logger.debug(Logger.java:143)
W GlobalSession(28016)        	at org.mozilla.gecko.sync.net.SyncStorageRequest$SyncStorageResourceDelegate.handleHttpResponse(SyncStorageRequest.java:100)
W GlobalSession(28016)        	at org.mozilla.gecko.sync.net.BaseResource.execute(BaseResource.java:253)
W GlobalSession(28016)        	at org.mozilla.gecko.sync.net.BaseResource.go(BaseResource.java:275)
W GlobalSession(28016)        	at org.mozilla.gecko.sync.net.BaseResource.get(BaseResource.java:281)
W GlobalSession(28016)        	at org.mozilla.gecko.sync.net.SyncStorageRequest.get(SyncStorageRequest.java:162)
W GlobalSession(28016)        	at org.mozilla.gecko.sync.InfoCollections$1.run(InfoCollections.java:111)
W GlobalSession(28016)        	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
W GlobalSession(28016)        	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
W GlobalSession(28016)        	at java.util.concurrent.FutureTask.run(FutureTask.java:137)
W GlobalSession(28016)        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W GlobalSession(28016)        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W GlobalSession(28016)        	at java.lang.Thread.run(Thread.java:856)
D GlobalSession(28016)        Uninstalling org.mozilla.gecko.sync.GlobalSession@41213340 as BaseResource HttpResponseObserver.
I SyncAdapter(28016)          GlobalSession indicated error. Flagging auth token as invalid, just in case.
I SyncAdapter(28016)          Notifying sync monitor.
I SyncAdapter(28016)          Setting minimum next sync time to 1333063548780
D ConnectionMonitorThread(28016) ConnectionMonitorThread told to shut down.
V BaseResource(28016)         Closing expired connections.
D class ch.boye.httpclientandroidlib.impl.conn.tsccm.ThreadSafeClientConnManager(28016) Closing expired connections
D class ch.boye.httpclientandroidlib.impl.conn.tsccm.ConnPoolByRoute(28016) Closing expired connections
V BaseResource(28016)         Closing idle connections.
D BaseResource(28016)         Shutting down connection manager.
D class ch.boye.httpclientandroidlib.impl.conn.tsccm.ThreadSafeClientConnManager(28016) Shutting down
D class ch.boye.httpclientandroidlib.impl.conn.DefaultClientConnection(28016) Connection closed
D class ch.boye.httpclientandroidlib.impl.conn.DefaultClientConnection(28016) Connection closed
D class ch.boye.httpclientandroidlib.impl.conn.DefaultClientConnection(28016) Connection closed
(Assignee)

Comment 2

5 years ago
Wonderful. Thanks for testing.
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/38b752214eaa
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/38b752214eaa
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
https://hg.mozilla.org/releases/mozilla-aurora/rev/94bac65543e7
status-firefox13: --- → fixed
status-firefox14: --- → fixed
Component: Android Sync → Android Sync
Product: Mozilla Services → Android Background Services
You need to log in before you can comment on or make changes to this bug.