Closed Bug 1116366 Opened 9 years ago Closed 9 years ago

[FFOS7715 v2.1][system]Download failed,when switch SIM card data to wifi

Categories

(Firefox OS Graveyard :: Gaia::Browser, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.1 affected)

RESOLVED WONTFIX
Tracking Status
b2g-v2.1 --- affected

People

(Reporter: David.Zhao, Assigned: vliu)

References

Details

(Whiteboard: sprd386926)

Attachments

(2 files, 3 obsolete files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20141119030200

Steps to reproduce:

 1.close the wifi and make sure SIM card data are available 
 2.open broswer and download one apk file 
 3.open wifi and connect the wifi
 4.download file failed


Actual results:

download file failed


Expected results:

download file continue
Attached file log.txt (obsolete) —
OS: All → Gonk (Firefox OS)
Hardware: All → ARM
Hi paolo:
   
    I know you are expected in download, please help me to investigate. 
    thanks a lot. 

    ps: if you have any problem, please need info for me, i will reply quickly.
Flags: needinfo?(paolo.mozmail)
Hi! I believe this issue may be specific to Firefox OS networking or front-end, about which unfortunately I don't know much. I can't see anything obvious from the logs, thanks for attaching them anyways.

Francisco maybe may know more or can find the right people?
Flags: needinfo?(paolo.mozmail) → needinfo?(francisco)
(In reply to :Paolo Amadini from comment #3)
> Hi! I believe this issue may be specific to Firefox OS networking or
> front-end, about which unfortunately I don't know much. I can't see anything
> obvious from the logs, thanks for attaching them anyways.
> 
> Francisco maybe may know more or can find the right people?

Hi Paolo! 
Thanks! I am sorry, and I will try to find the right people.
Hi francisco!

   As of 5 comments, you are expected!Can you help me to analyze the problem?

   Thanks a lot!

   ps: if you have any problem, please need info for me, i will reply quickly.
when WiFi network to download a file, switch to the SIM card data download:

  if download video files (download Youku Video),download failed, error:2152398868; 
  if download the file format for.Apk or other documents, can continue to download;
Hi,

not my area of expertise, since I think this is necko related. When switching to wifi we are using a different interface and I have the feeling, by what I'm reading here that we shut down the telephony interface.

Not sure if we can do something, perhaps Fabrice could clarify a bit, or redirect to someone that could help.
Flags: needinfo?(francisco) → needinfo?(fabrice)
(In reply to Francisco Jordano [:arcturus] [:francisco] from comment #7)
> Hi,
> 
> not my area of expertise, since I think this is necko related. When
> switching to wifi we are using a different interface and I have the feeling,
> by what I'm reading here that we shut down the telephony interface.
> 
> Not sure if we can do something, perhaps Fabrice could clarify a bit, or
> redirect to someone that could help.

Hi,
Tank you very much!
We would need to debug more, but when we switch from Wifi to Data (or vice versa) it's similar to shutting down and restarting network. The download code is smart enough to use http range request when they are supported by the server side. That may be why we can resume the document downloads but not the streaming ones.
Flags: needinfo?(fabrice)
(In reply to Fabrice Desré [:fabrice] from comment #9)
> We would need to debug more, but when we switch from Wifi to Data (or vice
> versa) it's similar to shutting down and restarting network. The download
> code is smart enough to use http range request when they are supported by
> the server side. That may be why we can resume the document downloads but
> not the streaming ones.

Hi Fabrice,
Could you tell your progress on this issure?

Thanks!
There's nothing I can do without knowing the urls to try to reproduce. Can you add them to this bug?
Hi Fabrice,
sorry!

url:www.apk8.com
download one apk file,and switch wifi to data

Thanks!
Summary: 【Download】Download failed,when switch SIM card data to wifi → [FFOS7715 v2.1][system]Download failed,when switch SIM card data to wifi
Whiteboard: sprd386926
Hi Fabrice, the url information is on Comment#12, could you help on this one?

Thanks
Flags: needinfo?(fabrice)
Hi Shawn -

Any one at device team side can also help to take a look at this one?

Thanks

Vance
Hi Steven.

Partner just want to clarify that if this is a per design behavior or it is indeed a bug. Could you help to find someone to clarify?

Thanks
Flags: needinfo?(styang)
This issue should be resolved at Bug 1008091.
Please nominate 2.1s? if fix is really needed.

Similar bug - Bug 1106220.
Flags: needinfo?(sku)
See Also: → 1008091
(In reply to shawn ku [:sku] from comment #16)
> This issue should be resolved at Bug 1008091.
> Please nominate 2.1s? if fix is really needed.
> 
> Similar bug - Bug 1106220.

Yes, we need it for 2.1S. Vincent, could you help?
blocking-b2g: --- → 2.1S+
Flags: needinfo?(styang) → needinfo?(vliu)
Hi Vincent,

  we need it for 2.1,please help
  Thanks a lot
Blocks: 1123554
(In reply to Steven Yang [:styang] from comment #17)
> (In reply to shawn ku [:sku] from comment #16)
> > This issue should be resolved at Bug 1008091.
> > Please nominate 2.1s? if fix is really needed.
> > 
> > Similar bug - Bug 1106220.
> 
> Yes, we need it for 2.1S. Vincent, could you help?

I assume that we need the patch of Bug 1008091 for this bug. If so, I'd merged the patch of Bug 1008091.
Flags: needinfo?(vliu)
Vincent, please update if the merge has been completed. thanks
Assignee: nobody → vliu
Flags: needinfo?(vliu)
Attached file download-log (obsolete) —
Hi daniel,
   
   this is the bug I referred in the email,and I add the log when switch data to wifi,after apply your patch.please help give advices
   
   Thanks a lot
Attachment #8542389 - Attachment is obsolete: true
Flags: needinfo?(daniel)
(In reply to zhaoyang from comment #21)
> Created attachment 8555142 [details]

>    this is the bug I referred in the email,and I add the log when switch
> data to wifi,after apply your patch.please help give advices

Thanks. Any chance you can enable more logging from some of the affected network modules? Like this: NSPR_LOG_MODULES=timestamp,nsHttp:5,nsSocketTransport:5,nsStreamPump:5,nsHostResolver:5,nsNotifyAddr:5

Further: I'm not sure how many things work in b2g land but there's a method in dom/system/gonk/NetworkManager.js that according to its comments "watches for network interfaces changing state and then adjusts routes etc. accordingly". Do we need to make something extra to make sure this happens?
Flags: needinfo?(daniel)
Attached file download (obsolete) —
Hi Daniel,

  there is new download log,after add NSPR_LOG_MODULES=nsStreamPump:5;NSPR_LOG_MODULES=nsNotifyAddr:5; NSPR_LOG_MODULES=nsSocketTransport:5
and open debug networkmanager.js 

would you get more from it?if you need others,please tell me,I will provide rapidly
Attachment #8555142 - Attachment is obsolete: true
Flags: needinfo?(daniel)
(In reply to zhaoyang from comment #23)

>   there is new download log,after add
> NSPR_LOG_MODULES=nsStreamPump:5;NSPR_LOG_MODULES=nsNotifyAddr:5;
> NSPR_LOG_MODULES=nsSocketTransport:5
> and open debug networkmanager.js 
> 
> would you get more from it?if you need others,please tell me,I will provide
> rapidly

Thanks for your hard work on getting this. I think something was wrong in there since I couldn't see any messages at all from those requested log modules in the log file you attached.

Also note that I mentioned a few more modules than you said you enabled, like for example I was particularly interested in nsHostResolver as well (also, having the full request set will make the log better comparable to other Firefox runs in similar situations that may not be b2g).

Is that really how you are supposed to do it? You assign the variable several times with new values?

Finally, it'd be great if you just made a note at which time you switch the wifi on/off to give some good data points at where in the log stuff should occur.

About the problem, just to be perfectly clear: you first download without wifi and then you switch on wifi and you can't get to the file anymore, right? What is the exact error message/problem that you see when it fails (as detailed as possible please) ?
Flags: needinfo?(daniel)
Hi Daniel,

  sorry,my bad
  I add newdownloadlog.txt and PRdownloadlog.txt. newdownloadlog.txt is common log. PRdownloadlog.txt is about network modules.
  About the problem:first download without wifi and then switch on wifi and can't get to the file anymore, download failed. error:NS_ERROR_NET_TIMEOUT

  I can find from newdownloadlog.txt:

wifi connected:
01-28 22:06:01.285 I/Gecko   ( 5080): -*- DataConnectionHandler[0]: Disconnect data call when Wifi is connected.

downloaderror:
01-28 22:06:17.575 I/Gecko   ( 5080): -*- DownloadsAPI.jsm : onDownloadChanged ({totalBytes:17191793, currentBytes:522524, url:"http://d2.apk8.com:8020/game_g/xiaoledepenqibeibao.apk", path:"/storage/sdcard0/downloads/xiaoledepenqibeibao.apk", contentType:"application/vnd.android.package-archive", startTime:1422453942267, error:(new DownloadError("[Exception... \"The connection has timed out\"  nsresult: \"0x804b000e (NS_ERROR_NET_TIMEOUT)\"  location: \"JS frame :: resource://gre/modules/DownloadCore.jsm :: this.DownloadError :: line 1238\"  data: no]", "")), id:"download-1", state:"stopped"})
01-28 22:06:17.585 I/Gecko   ( 5080): -*- DownloadsIPC.jsm : message: Downloads:Changed
01-28 22:06:17.585 I/Gecko   ( 5080): -*- DownloadsIPC.jsm : notifyChanges notifying changes for download-1
01-28 22:06:17.595 I/Gecko   ( 5080): -*- DownloadsAPI.js : DOMDownloadImpl observe downloads-state-change-download-1
01-28 22:06:17.595 I/Gecko   ( 5080): -*- DownloadsAPI.js : update ({totalBytes:17191793, currentBytes:522524, url:"http://d2.apk8.com:8020/game_g/xiaoledepenqibeibao.apk", path:"/storage/sdcard0/downloads/xiaoledepenqibeibao.apk", contentType:"application/vnd.android.package-archive", startTime:(new Date(1422453942267)), id:"download-1", state:"stopped", error:{name:"DownloadError", result:2152398862, message:"[Exception... \"The connection has timed out\"  nsresult: \"0x804b000e (NS_ERROR_NET_TIMEOUT)\"  location: \"JS frame :: resource://gre/modules/DownloadCore.jsm :: this.DownloadError :: line 1238\"  data: no]", becauseSourceFailed:true, becauseTargetFailed:false, stack:"this.DownloadError@resource://gre/modules/DownloadCore.jsm:1266:16\nDLS_onTransferFinished@resource://gre/modules/DownloadCore.jsm:2012:33\nDLT_OSC_onDownload@jar:file:///system/b2g/omni.ja!/components/DownloadLegacy.js:176:9\nHandler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:865:23\nthis.PromiseWalker.walkerLoop@reso
01-28 22:06:17.605 I/Gecko   ( 5080): -*- DownloadsAPI.js : Dispatching statechange event. state=stopped
Flags: needinfo?(daniel)
Attached file newdownloadlog.txt
Attachment #8555761 - Attachment is obsolete: true
Attached file PRdownloadlog.txt
in PRdownloadlog.txt:

9493896[b6a49880]: nsHttpConnection::Close [this=ab956c40 reason=80004004]
9493896[b6a49880]: nsHttpConnection::EndIdleMonitoring [this=ab956c40]
9493896[b6a49880]: Leaving Idle Monitoring Mode [this=ab956c40]
9493896[b6a49880]: nsSocketInputStream::AsyncWait [this=ae9c3dc8]
9493896[b6a49880]: nsSocketInputStream::Read [this=ae9c3dc8 count=4000]
9493896[b6a49880]:   calling PR_Read [count=4000]
9493896[b6a49880]:   PR_Read returned [n=-1]
9493896[b6a49880]: JIMB: ReleaseFD_Locked: mFDref = 2
9493896[b6a49880]: ErrorAccordingToNSPR [in=-5990 out=804b000e]
9493896[b6a49880]: nsSocketTransport::OnMsgInputClosed [this=ae9c3cd0 reason=804b000e]

I find 'reason=804b000e',it just the download failed error:NS_ERROR_NET_TIMEOUT
Yes, I see the 804b000e there. But what _isn't_ there is a logged event saying that the network changed (from nsNotifyAddr) which I would've expected - the question is really why it didn't and it could very well be a clue to this problem. I intend to get this version onto a local device of my own and see what I can dig up. May take a little while.
Flags: needinfo?(daniel)
Hi Daniel,

   Could you update your analysis progress?
   Thanks a lot
Flags: needinfo?(daniel)
I haven't progressed much since, as I've been held up in other things. Can you double check that you had "nsNotifyAddr" as module specified when you asked for a log? Since there was no message from that module something is odd...
Flags: needinfo?(daniel)
Hi Ghislain Aus,
  
   what do you think of this bug,or could you give some guidences ?
 
   Thanks a lot
Flags: needinfo?(aus)
Seems been fixed on partner side. clear the blocking flag.
blocking-b2g: 2.1S+ → ---
Clear the ni? since Comment 33
Flags: needinfo?(vliu)
Close this one per Comment#33
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(vchen)
Flags: needinfo?(fabrice)
Flags: needinfo?(aus)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: