Closed Bug 1189143 Opened 9 years ago Closed 9 years ago

[Browser] Video cannot be loaded when network is connected back

Categories

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

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:2.5+)

RESOLVED WORKSFORME
blocking-b2g 2.5+

People

(Reporter: ashiue, Unassigned)

References

()

Details

(Keywords: regression)

Attachments

(4 files)

Attached file infinitely_load.log
STR:
1. Exist a cached youtube page
2. Disable network
3. Open the cached youtube page and tried to load the video
4. Enable network while loading video
5. Open multiple browsers to open the cached youtube page
6. Try to kill browsers via task manager

Expected result:
1. in step 4, the video can be loaded

Actual result:
1. In step 4, the video cannot be loaded
2. In step 6, device reboot 

Device info:
I tried with the latest 2.5 aries build, and found that the video still unable to load even if I enable wifi during video loading.
Build ID               20150728035120
Gaia Revision          14e32276025b0310d3e89027320cf4b2a24cedfb
Gaia Date              2015-07-27 16:43:18
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/33dc8a83cfc0
Gecko Version          42.0a1
Device Name            aries
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.worker.20150728.033538
Firmware Date          Tue Jul 28 03:35:46 UTC 2015
Bootloader             s1
Alison, does this bug happen only in browser?
What if you use the Youtube app?
Flags: needinfo?(ashiue)
Hi Ethan, video in youtube app also unable be loaded when network comes back.
Flags: needinfo?(ashiue)
(In reply to Alison Shiue from comment #2)
> Hi Ethan, video in youtube app also unable be loaded when network comes back.

Got it. Thanks.
I've asked Winnie to help to debug on this.
Assignee: nobody → wsun
Status: NEW → ASSIGNED
Attached file gdb.log
The result of back track when the crush happened.
The attachment in comment #4 is the back track from the gdb.

I simplify the steps to cause the crush.

STR:
1. Open a youtube page, and play the vedio.
2. Open another youtube page, and play the vedio.
3. Reload the page in step 2, and play the vedio again.
4. Use the task manager to kill the page in step 2 then step 1.

More Info. about the STR. (To short, the page in step1 calls p1, the page in step2 calls p2.)
1. If the reload page changes to p1, the crush won't happen.
2. All the action "play" in STR couldn't be ignore, or the crush may not happen.
3. In step 4, if the killing order is p1 then p2, the crush won't happen.
4. In step 4, if we kill the p2 first, then back to the homepage, we still can open a new page, and kill it, but the crush will still happen, after the p1 being killed.

Device info:
Gaia revision    9b10722c5299c45ca62b341e9619f640c5dc39be
Gaia date        2015-8-1
Gecko revision   abb4d538ee8d3a978147609aa2b826ab81b49982
Gecko date       2015-8-1
Device Name      aries
(In reply to XiaoLe Sun from comment #5)
> The attachment in comment #4 is the back trace from the gdb.
> I simplify the steps to cause the crash.
Thank you Winnie!
This information could be helpful for further debugging.
blocking-b2g: --- → -
[Blocking Requested - why for this release]:
The STR in comment 5 is not quite unusual scenario for normal users. The result causes a system crash, which is critical.
blocking-b2g: - → 2.5?
Parts of the GDB back trace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 2768.2831]
0xb6e9d5fe in mozalloc_abort (msg=msg@entry=0xae6af6c4 "[Parent 2768] ###!!! ABORT: corrupted actor state: file PMediaSystemResourceManager.cpp, line 34") at /home/xiaole/aries-kk/gecko/memory/mozalloc/mozalloc_abort.cpp:33
33      MOZ_CRASH();
(gdb) bt
#0  0xb6e9d5fe in mozalloc_abort (msg=msg@entry=0xae6af6c4 "[Parent 2768] ###!!! ABORT: corrupted actor state: file PMediaSystemResourceManager.cpp, line 34") at /home/xiaole/aries-kk/gecko/memory/mozalloc/mozalloc_abort.cpp:33
#1  0xb4a647e2 in Abort (aMsg=0xae6af6c4 "[Parent 2768] ###!!! ABORT: corrupted actor state: file PMediaSystemResourceManager.cpp, line 34") at ../../../gecko/xpcom/base/nsDebugImpl.cpp:472
#2  NS_DebugBreak (aSeverity=<optimized out>, aStr=0xb6098dd5 "corrupted actor state", aExpr=0x0, aFile=0xb60af7a5 "PMediaSystemResourceManager.cpp", aLine=34) at ../../../gecko/xpcom/base/nsDebugImpl.cpp:459
#3  0xb4c2c3ae in Transition (from=<optimized out>, trigger=..., next=<optimized out>) at PMediaSystemResourceManager.cpp:34
#4  mozilla::media::PMediaSystemResourceManager::Transition (from=<optimized out>, trigger=..., next=<optimized out>) at PMediaSystemResourceManager.cpp:14
#5  0xb4c2d6bc in mozilla::media::PMediaSystemResourceManagerParent::SendResponse (this=0xa7218440, aId=@0xac0c770c: 2, aSuccess=@0xae6afb2c: true) at PMediaSystemResourceManagerParent.cpp:57
#6  0xb5415fc6 in mozilla::MediaSystemResourceService::UpdateRequests (this=<optimized out>, aResourceType=<optimized out>) at /home/xiaole/aries-kk/gecko/dom/media/systemservices/MediaSystemResourceService.cpp:266
...

(Refer to attachment 8652670 [details] for the complete back trace log).

Blake,
According to back trace and STR in comment 5, this issue seems to be relevant to Media.
Could you help assign someone look into this bug?
Flags: needinfo?(bwu)
Blocks 2.5. Unexpected reboot.
blocking-b2g: 2.5? → 2.5+
Component: Gaia::Browser → Audio/Video
Product: Firefox OS → Core
Hi Sotaro,
This bug seems related to MediaSystemResourceManager.cpp per comment 8, may I have your help to check this bug?
Flags: needinfo?(bwu) → needinfo?(sotaro.ikeda.g)
The crash seems to be related to MediaSystemResourceManager's problem. But "Video cannot be loaded when network is connected back" seems not related to it. About the crash, I am going to look into it, though I could failed to reproduce the problem on my side. attachment 8652670 [details] in comment 4 seems to provide enough information.
Flags: needinfo?(sotaro.ikeda.g)
Depends on: 1200903
Component: Audio/Video → Audio/Video: Playback
Priority: -- → P1
Hi XiaoLe,
Since bug 1200903 is fixed, could you help check if the crash mentioned in comment 5 is gone or not?
Thanks!
Flags: needinfo?(wsun)
(In reply to Blake Wu [:bwu][:blakewu] from comment #12)
> Hi XiaoLe,
> Since bug 1200903 is fixed, could you help check if the crash mentioned in
> comment 5 is gone or not?
> Thanks!

I have tried it, and the crash seems gone!!!!! :目
Flags: needinfo?(wsun)
(In reply to XiaoLe Sun from comment #13)
> (In reply to Blake Wu [:bwu][:blakewu] from comment #12)
> > Hi XiaoLe,
> > Since bug 1200903 is fixed, could you help check if the crash mentioned in
> > comment 5 is gone or not?
> > Thanks!
> 
> I have tried it, and the crash seems gone!!!!! :目
Thanks for your help!
Hi Alison, 
Could you help to check if this problem in comment 0 still happens? And how about the case on Firefox browser on laptop?
Flags: needinfo?(ashiue)
Attached file load_video_crash.log
Hi Blake,

I tried STR on comment 0 with today's ariest build, and found that youtube would crash easily, the reproduce rate is 3/5.
Please refer: https://youtu.be/APNJ3Kx4pCo
Crash report: https://crash-stats.mozilla.com/report/index/324fbbff-dd46-4199-ba9d-781032151005

Aries build info:
Build ID               20151004181256
Gaia Revision          f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e
Gaia Date              2015-10-02 13:52:20
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/3d7532ce81ac571962abc3b99582fe7f5d685192
Gecko Version          44.0a1
Device Name            aries
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.worker.20151004.173222
Firmware Date          Sun Oct  4 17:32:29 UTC 2015
Bootloader             s1
Flags: needinfo?(ashiue)
I tried the desktop nightly browser: 44.0a1 (2015-10-04)
While play cached video when network disable, in the meantime, the youtube would show error (please refer the attached screenshot), and I cannot play it when  network comes back unless refresh this page.

I am not sure if this problem is as same as phone.
(In reply to Alison Shiue from comment #16)
> Created attachment 8669556 [details]
> load_video_crash.log
> 
> Hi Blake,
> 
> I tried STR on comment 0 with today's ariest build, and found that youtube
> would crash easily, the reproduce rate is 3/5.
> Please refer: https://youtu.be/APNJ3Kx4pCo
> Crash report:
> https://crash-stats.mozilla.com/report/index/324fbbff-dd46-4199-ba9d-
> 781032151005
> 
> Aries build info:
> Build ID               20151004181256
> Gaia Revision          f3d9981dccfa4dfdfcb865d95fdcfb85e4077e1e
> Gaia Date              2015-10-02 13:52:20
> Gecko Revision        
> https://hg.mozilla.org/mozilla-central/rev/
> 3d7532ce81ac571962abc3b99582fe7f5d685192
> Gecko Version          44.0a1
> Device Name            aries
> Firmware(Release)      4.4.2
> Firmware(Incremental)  eng.worker.20151004.173222
> Firmware Date          Sun Oct  4 17:32:29 UTC 2015
> Bootloader             s1

Thanks! I can repro it on my Areis as well. 

Back trace: 
#0  Begin (aRequest=..., this=<optimized out>) at ../../dist/include/mozilla/MozPromise.h:822
#1  mozilla::MediaFormatReader::AsyncReadMetadata (this=<optimized out>) at /Volumes/firefoxos/z3c/B2G/gecko/dom/media/MediaFormatReader.cpp:267
#2  0xb46d08c0 in MethodCallInvokeHelper<nsRefPtr<mozilla::MozPromise<nsRefPtr<mozilla::MetadataHolder>, mozilla::ReadMetadataFailureReason, true> >, mozilla::MediaDecoderReader> (aArgs=..., 
    aThisVal=0xaff2cc00, aMethod=&virtual mozilla::MediaDecoderReader::AsyncReadMetadata()) at ../../dist/include/mozilla/MozPromise.h:874
#3  Invoke (this=<optimized out>) at ../../dist/include/mozilla/MozPromise.h:899
#4  mozilla::detail::ProxyRunnable<mozilla::MozPromise<nsRefPtr<mozilla::MetadataHolder>, mozilla::ReadMetadataFailureReason, true>, mozilla::MediaDecoderReader>::Run (this=0xabbf1730)
    at ../../dist/include/mozilla/MozPromise.h:917
#5  0xb3d2a488 in mozilla::AutoTaskDispatcher::TaskGroupRunnable::Run (this=0xae499280) at ../../dist/include/mozilla/TaskDispatcher.h:180
#6  0xb3d30188 in mozilla::TaskQueue::Runner::Run (this=0xae499310) at /Volumes/firefoxos/z3c/B2G/gecko/xpcom/threads/TaskQueue.cpp:170
#7  0xb3d2dcaa in nsThreadPool::Run (this=0xae94a6c0) at /Volumes/firefoxos/z3c/B2G/gecko/xpcom/threads/nsThreadPool.cpp:228
#8  0xb3d2d898 in ProcessNextEvent (aResult=0xaf85fd1f, aMayWait=<optimized out>, this=0xae4a84d0) at /Volumes/firefoxos/z3c/B2G/gecko/xpcom/threads/nsThread.cpp:972
#9  nsThread::ProcessNextEvent (this=0xae4a84d0, aMayWait=<optimized out>, aResult=0xaf85fd1f) at /Volumes/firefoxos/z3c/B2G/gecko/xpcom/threads/nsThread.cpp:857
#10 0xb3d3ef9a in NS_ProcessNextEvent (aThread=<optimized out>, aMayWait=aMayWait@entry=false) at /Volumes/firefoxos/z3c/B2G/gecko/xpcom/glue/nsThreadUtils.cpp:297
#11 0xb3e92df4 in mozilla::ipc::MessagePumpForNonMainThreads::Run (this=0xae5424c8, aDelegate=0xaebb1ba0) at /Volumes/firefoxos/z3c/B2G/gecko/ipc/glue/MessagePump.cpp:326
#12 0xb3e809b0 in MessageLoop::RunInternal (this=this@entry=0xaebb1ba0) at /Volumes/firefoxos/z3c/B2G/gecko/ipc/chromium/src/base/message_loop.cc:234
Blocks: TV_Gecko_P2
Assignee: wsun → nobody
Status: ASSIGNED → NEW
After thinking twice, I created another audio/video bug(bug 1214502) to fix the crash problem in comment 17 and 18. 
Let this one keep as its summary suggest "Video cannot be loaded when network is connected back", which may not be a audio/video bug.
Component: Audio/Video: Playback → Gaia::Browser
Product: Core → Firefox OS
Per comment 19, I change the component back. 
Please feel free to change to a proper one.
Per comment 17, it looks like FxOS browser has a similar behavior like desktop one. 
So I think we can close this bug. 
Bobby, 
How do you think?
Flags: needinfo?(bchien)
See Also: → 1214502
Flags: needinfo?(bchien)
Keywords: regression
Priority: P1 → P2
QA Contact: sleedavid
Hi Alison, 
How did you "cache" the webpage with Youtube video entact ? 

(In reply to Alison Shiue from comment #0)
> Created attachment 8640857 [details]
> infinitely_load.log
> 
> STR:
> 1. Exist a cached youtube page
> 2. Disable network
> 3. Open the cached youtube page and tried to load the video
> 4. Enable network while loading video
> 5. Open multiple browsers to open the cached youtube page
> 6. Try to kill browsers via task manager
> 
> Expected result:
> 1. in step 4, the video can be loaded
> 
> Actual result:
> 1. In step 4, the video cannot be loaded
> 2. In step 6, device reboot 
> 
> Device info:
> I tried with the latest 2.5 aries build, and found that the video still
> unable to load even if I enable wifi during video loading.
> Build ID               20150728035120
> Gaia Revision          14e32276025b0310d3e89027320cf4b2a24cedfb
> Gaia Date              2015-07-27 16:43:18
> Gecko Revision        
> https://hg.mozilla.org/mozilla-central/rev/33dc8a83cfc0
> Gecko Version          42.0a1
> Device Name            aries
> Firmware(Release)      4.4.2
> Firmware(Incremental)  eng.worker.20150728.033538
> Firmware Date          Tue Jul 28 03:35:46 UTC 2015
> Bootloader             s1
Flags: needinfo?(jmercado)
QA Contact: sleedavid
Flags: needinfo?(jmercado)
Flags: needinfo?(ashiue)
QA Contact: sleedavid
QA Contact: sleedavid
(In reply to Sxean Lee-David [:sxean] from comment #22)
> Hi Alison, 
> How did you "cache" the webpage with Youtube video entact ? 
Please view this video multiple times (1 time seems not enough), at least make sure the site shows on start page Top Sites.

However, I tried with the latest build, this video cannot be loaded issue cannot reproduce.

[Flame]
Build ID               20151021065025
Gaia Revision          32d827a70af90a05918f234e5b16b35d5d2a07e8
Gaia Date              2015-10-20 20:57:29
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/473aefe5bd85842eeb142e0cde8e2cd21edbf40b
Gecko Version          44.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20151021.104033
Firmware Date          Wed Oct 21 10:40:46 EDT 2015
Bootloader             L1TC000118D0

[Aries]
Build ID               20151022003511
Gaia Revision          1b902ff26547e2a6c896351a6a73b673f65e19b2
Gaia Date              2015-10-21 14:56:32
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/daa7d98525e859d32a3b3e97101e129a897192a1
Gecko Version          44.0a1
Device Name            aries
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.worker.20151021.235445
Firmware Date          Wed Oct 21 23:54:53 UTC 2015
Bootloader             s1


ps, Aries still have crash issue as comment 16 mentioned.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(ashiue)
Resolution: --- → WORKSFORME
Removing window tag since this is resolved wfm.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: