[B2G][Helix][OTA][ChenHoulai]Close the data services and then open the data services when a system update file is downloading, the update file can not resume download.

RESOLVED FIXED in 1.3 Sprint 5 - 11/22

Status

Firefox OS
General
P1
major
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: lecky, Assigned: seinlin)

Tracking

unspecified
1.3 Sprint 5 - 11/22

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 3 obsolete attachments)

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; aff-kingsoft-ciba)

Steps to reproduce:

【Detail Description*】:
   [B2G][Helix][OTA][ChenHoulai]Close the data services and then open the data services when a system update file is downloading, the update file can not resume download.
【Repro Steps*】:
    1、Enter into the settings, click 'check now' to get update info.
    2、Download the update file.
    3、When it is downloading, go to the settings to close the data connection.
    4、Open the data connection.
    5、Observe the status of downloading.
【Expect Result*】:
    5、the update file can resume download.	
【Real Result*】:
    5、the update file can not resume download.	
【Test Count*】:5
【Found Count*】:5
【Gaia commit ID*】: f601fe6e5edb7d5016c07abfad8f069af7354f7b
【Gecko commit ID*】: 60d9e982e07e8d09e9d0e52bad6433c302c17f32
【Log*】:NA
【Network environment】:
【Resume operation】:
【Carrier】:
(Reporter)

Updated

5 years ago
Severity: normal → blocker
Priority: -- → P1
(Reporter)

Updated

5 years ago
Flags: needinfo?(wchang)

Updated

5 years ago
Flags: needinfo?(wchang)
(Assignee)

Comment 1

5 years ago
In case of downloading is stopped due to  
The timeout interval can be configured through
"app.update.socket.retryTimeout"
in "gecko/b2g/app/b2g.js"
(Assignee)

Comment 2

5 years ago
Please ignore comment 1.

In case of downloading is stopped due to network error, a timer will be started and attempt to resume download.

The timeout interval can be configured through "app.update.socket.retryTimeout" in "gecko/b2g/app/b2g.js".
(Reporter)

Comment 3

5 years ago
(In reply to Kai-Zhen Li from comment #2)
> Please ignore comment 1.
> 
> In case of downloading is stopped due to network error, a timer will be
> started and attempt to resume download.
> 
> The timeout interval can be configured through
> "app.update.socket.retryTimeout" in "gecko/b2g/app/b2g.js".

hi, Kai-Zhen:
I trace into the issue, and find that when the data services is closed, the status value passed to the onStopRequest function in the nsUpdateService.js file is 'Cr.NS_BINDING_ABORTED' and not 'Cr.NS_ERROR_NET_TIMEOUT'. So it goes another process and do not resume download after open the data services . 
I'd ask that what do the 'Cr.NS_BINDING_ABORTED' represent and in which case it will occur?
Thanks.
(Reporter)

Updated

5 years ago
Flags: needinfo?(kli)
(Assignee)

Comment 4

5 years ago
Hi Lecky,

In normal case when network is going offline 'Cr.NS_ERROR_OFFLINE' should be report and a OnlineObserver will be register and the update downloading will be resume when network get online.

If 'Cr.NS_BINDING_ABORTED' is reported, the update downloading will be also cancel, this does work as expected.
http://dxr.mozilla.org/mozilla-central/source/toolkit/mozapps/update/nsUpdateService.js#l4356

So I think need to check why Cr.NS_BINDING_ABORTED is reported, unfortunately I can't reproduce the same error.

Can you try again and attach the logcat?
Flags: needinfo?(kli)
(Reporter)

Updated

5 years ago
blocking-b2g: --- → hd?
(Reporter)

Comment 5

5 years ago
Created attachment 825772 [details]
ota.log
(Reporter)

Comment 6

5 years ago
hi, Kai-Zhen:
  The attachment ota.log is the logcat log. The onStopRequest status is 2147500036 which corresponds Cr.NS_ERROR_ABORT.
  I tried 10 times again, when i close the data services, the status is  'Cr.NS_ERROR_ABORT' for 9 times, and the other is 'Cr.NS_ERROR_NET_TIMEOUT'.
(Reporter)

Comment 7

5 years ago
Kai-Zhen, Can you suggest me to add some log in other places?  Thanks!
(Reporter)

Updated

5 years ago
Flags: needinfo?(kli)
(Assignee)

Comment 8

5 years ago
Lecky, onStopRequest in update service is called from netwerk/base/src/nsIncrementalDownload.cpp, may be you can add some log in this module?
Flags: needinfo?(kli)
(Assignee)

Comment 9

5 years ago
Created attachment 825853 [details] [diff] [review]
bug-927325-fix.patch

Hi, Robert and Dave, 

In case of network get offline during downloading update, AUS mostly received the error NS_ERROR_ABORT, but sometime NS_ERROR_OFFLINE.
So I think we should also register the OnlineObserver for NS_ERROR_ABORT in order to resume the update downloading when network get online.

How do you think?
Flags: needinfo?(robert.bugzilla)
Flags: needinfo?(dhylands)
What steps did you follow to get the NS_ERROR_ABORT?
Flags: needinfo?(dhylands) → needinfo?(kli)
It would be best to find out why necko is returning NS_ERROR_ABORT and fix it to return NS_ERROR_OFFLINE if at all possible. Perhaps file a necko bug for that.
Flags: needinfo?(robert.bugzilla)
(Assignee)

Comment 12

5 years ago
(In reply to Dave Hylands [:dhylands] from comment #10)
> What steps did you follow to get the NS_ERROR_ABORT?

I simply disabled the data connection during the FOTA update is downloading. It is step 3 in comment 0.
Flags: needinfo?(kli)

Comment 13

5 years ago
After discussing with OB, this is not blocking for v1.1hd.
Severity: blocker → major
per comment 13
blocking-b2g: hd? → ---
(Assignee)

Comment 15

5 years ago
Created attachment 831975 [details] [diff] [review]
bug-927325-fix-2.patch

Hi, Patrick, Could you kindly have a look to this patch?
When data connection is offline, if NS_ERROR_ABORT is reported the update services will take a wrong action and can't resume downloading when data connection is online.
But I am not sure if it is possible to report NS_ERROR_ABORT in nsSocketTransport2 as in attach patch.
Flags: needinfo?(mcmanus)
Comment on attachment 831975 [details] [diff] [review]
bug-927325-fix-2.patch

Review of attachment 831975 [details] [diff] [review]:
-----------------------------------------------------------------

I think that would be fine
Attachment #831975 - Flags: feedback+
(Assignee)

Comment 17

5 years ago
Created attachment 832742 [details] [diff] [review]
bug-927325-fix.patch
Attachment #825853 - Attachment is obsolete: true
Attachment #831975 - Attachment is obsolete: true
Attachment #832742 - Flags: review?(mcmanus)
(Assignee)

Comment 18

5 years ago
Try server result - https://tbpl.mozilla.org/?tree=Try&rev=760e7af4f074
Flags: needinfo?(mcmanus)
Comment on attachment 832742 [details] [diff] [review]
bug-927325-fix.patch

this patch is empty
Attachment #832742 - Flags: review?(mcmanus) → review-
(Assignee)

Comment 20

5 years ago
Created attachment 833306 [details] [diff] [review]
bug-927325-fix.patch
Attachment #832742 - Attachment is obsolete: true
Attachment #833306 - Flags: review?(mcmanus)
Attachment #833306 - Flags: review?(mcmanus) → review+
(Assignee)

Updated

5 years ago
Assignee: nobody → kli
Keywords: checkin-needed
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/56fa2530264f
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.3 Sprint 5 - 11/22
You need to log in before you can comment on or make changes to this bug.