Closed
Bug 871753
Opened 12 years ago
Closed 12 years ago
Deadlock during YouTube video playback when data connection is relatively slow compared to Wi-Fi
Categories
(Firefox OS Graveyard :: General, defect, P2)
Tracking
(blocking-b2g:tef+, firefox22 wontfix, firefox23 wontfix, firefox24 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 verified)
RESOLVED
FIXED
blocking-b2g | tef+ |
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
(Whiteboard: [apps watch list][target:05/17])
Attachments
(6 files, 4 obsolete files)
(deleted),
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #863441 +++
This bug is created as to investigate the youtube video freeze when data connection is relatively slow as in Bug 863441 comment #105.
Assignee | ||
Updated•12 years ago
|
blocking-b2g: --- → tef?
Updated•12 years ago
|
blocking-b2g: tef? → tef+
Updated•12 years ago
|
Whiteboard: [apps watch list1]
Comment 1•12 years ago
|
||
This is a platform issue, not a 3rd party app issue.
Whiteboard: [apps watch list1] → [apps watch list]
Updated•12 years ago
|
Whiteboard: [apps watch list] → [apps watch list][target:05.17]
Assignee | ||
Updated•12 years ago
|
Summary: Youtube video freezes after a couple of minutes when data connection is relatively slow compared to Wifi → Dead lock during Youtube video playback when data connection is relatively slow compared to Wifi
Whiteboard: [apps watch list][target:05.17] → [apps watch list]
Assignee | ||
Comment 2•12 years ago
|
||
Deadlock happened during youtube video playback like following STR.
- [1] OMXCodec thread is stopped on data read from ChannelMediaResource.
The thread continues to hold OMXCodec's mutex.
- [2] nsBuiltinDecoderStateMachine's StateMachineThread is stoped to wait OMXCodec's mutex.
It happens when the thread try to return video buffer to OMXCodec.
The thread continues to hold nsBuiltinDecoder's ReentrantMonitor.
- [3] The main thread is stopped to wait nsBuiltinDecoder's ReentrantMonitor.
- [4] OMXCodec thread do not receive data forever from hannelMediaResource.
Data is delivered via main thread.
Assignee | ||
Comment 3•12 years ago
|
||
Assignee | ||
Comment 4•12 years ago
|
||
Assignee | ||
Comment 5•12 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #4)
> Created attachment 749474 [details] [diff] [review]
> patch - fix deadlock during youtube video playback
android::ALooper creates a thread for messaging. By using the ALooper, VideoGraphicBuffer::Unlock() prevents to wait OMXCodex's mutex.
Assignee | ||
Comment 6•12 years ago
|
||
Comment on attachment 749474 [details] [diff] [review]
patch - fix deadlock during youtube video playback
doublec, can you review the patch soon? It is tef+ bug. Thanks.
Attachment #749474 -
Flags: review?(chris.double)
Comment 7•12 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #6)
> Comment on attachment 749474 [details] [diff] [review]
> patch - fix deadlock during youtube video playback
>
> doublec, can you review the patch soon? It is tef+ bug. Thanks.
Is there any documentation on the API's you're using? I'm not familiar with them and it's hard to review. Can you provide comments/description in the code explaining what they do if not?
Updated•12 years ago
|
Summary: Dead lock during Youtube video playback when data connection is relatively slow compared to Wifi → Deadlock during YouTube video playback when data connection is relatively slow compared to Wi-Fi
Assignee | ||
Comment 8•12 years ago
|
||
I do not know if there is a documentation about it. It mimics android Java's Looper. The way to use is similar to it.
http://developer.android.com/reference/android/os/Looper.html
http://developer.android.com/reference/android/os/Handler.html
Assignee | ||
Comment 9•12 years ago
|
||
I am going to add comments tomorrow.
Updated•12 years ago
|
Whiteboard: [apps watch list] → [apps watch list][target:05/17]
Assignee | ||
Updated•12 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 10•12 years ago
|
||
Attachment #749474 -
Attachment is obsolete: true
Attachment #749474 -
Flags: review?(chris.double)
Assignee | ||
Comment 11•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Attachment #750088 -
Flags: review?(chris.double)
Assignee | ||
Updated•12 years ago
|
Attachment #750090 -
Flags: review?(chris.double)
Assignee | ||
Comment 12•12 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #10)
> Created attachment 750088 [details] [diff] [review]
> Part1 v2 - fix deadlock during youtube video playback
Added some comments.
Comment 13•12 years ago
|
||
Comment on attachment 750090 [details] [diff] [review]
Part2 v2 - add libstagefright_foundation
You'll need to get a reviewer who is a peer for this component to review this, sorry.
Attachment #750090 -
Flags: review?(chris.double)
Comment 14•12 years ago
|
||
Comment on attachment 750088 [details] [diff] [review]
Part1 v2 - fix deadlock during youtube video playback
Review of attachment 750088 [details] [diff] [review]:
-----------------------------------------------------------------
Do you know if the same issue is in Android and would need to be made to media/omx-plugin/OmxDecoder.cpp?
::: content/media/omx/OmxDecoder.h
@@ +114,5 @@
> // OMXCodec does not accept MediaBuffer during seeking. If MediaBuffer is
> // returned to OMXCodec during seeking, OMXCodec calls assert.
> Vector<MediaBuffer *> mPendingVideoBuffers;
> + // The lock protects mPendingVideoBuffers.
> + // Do not hold Mutex mPendingVideoBuffersLock -> mSeekLock order.
I don't understand what this comment is saying. Is it saying that you shouldn't hold both locks?
@@ +126,5 @@
> // Holding time should be minimum.
> Mutex mSeekLock;
>
> + // ALooper is a message loop used in stagefright.
> + // It creates a thread for messges and handles messages in the thread.
Spelling of 'messges'.
Attachment #750088 -
Flags: review?(chris.double) → review+
Updated•12 years ago
|
Whiteboard: [apps watch list][target:05/17] → [status: needs landing][apps watch list][target:05/17]
Assignee | ||
Comment 15•12 years ago
|
||
(In reply to Chris Double (:doublec) from comment #14)
> Comment on attachment 750088 [details] [diff] [review]
> Part1 v2 - fix deadlock during youtube video playback
>
> Review of attachment 750088 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Do you know if the same issue is in Android and would need to be made to
> media/omx-plugin/OmxDecoder.cpp?
omx-plugin does not have this problem. It always copy video data within decode thread and return MediaBuffer to OXMCodec in the thread. So it does not lock StateMachineThread and ImageBridge thread.
>
> ::: content/media/omx/OmxDecoder.h
> @@ +114,5 @@
> > // OMXCodec does not accept MediaBuffer during seeking. If MediaBuffer is
> > // returned to OMXCodec during seeking, OMXCodec calls assert.
> > Vector<MediaBuffer *> mPendingVideoBuffers;
> > + // The lock protects mPendingVideoBuffers.
> > + // Do not hold Mutex mPendingVideoBuffersLock -> mSeekLock order.
>
> I don't understand what this comment is saying. Is it saying that you
> shouldn't hold both locks?
I just say, mSeekLock need to be hold first when the code want to hold both locks. I think, the comment is not necessary. I am going to remove it.
>
> @@ +126,5 @@
> > // Holding time should be minimum.
> > Mutex mSeekLock;
> >
> > + // ALooper is a message loop used in stagefright.
> > + // It creates a thread for messges and handles messages in the thread.
>
> Spelling of 'messges'.
I'll fix it in the next patch.
Assignee | ||
Comment 16•12 years ago
|
||
Comment on attachment 750090 [details] [diff] [review]
Part2 v2 - add libstagefright_foundation
mwu, can you review the patch?
Attachment #750090 -
Flags: review?(mwu)
Updated•12 years ago
|
Whiteboard: [status: needs landing][apps watch list][target:05/17] → [status: needs review][apps watch list][target:05/17]
Comment 17•12 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #15)
> omx-plugin does not have this problem. It always copy video data within
> decode thread and return MediaBuffer to OXMCodec in the thread. So it does
> not lock StateMachineThread and ImageBridge thread.
I think omx-plugin has been completely replaced by content/media/omx. What do you guys think of just getting rid of it? It just creates confusion.
Assignee | ||
Comment 18•12 years ago
|
||
It is about Firefox browser in android.
Comment 19•12 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #18)
> It is about Firefox browser in android.
Oh, I see. I think it would be nice if Android and B2G used the same thing to avoid duplicating effort, but I guess that's up to you guys.
Updated•12 years ago
|
Attachment #750090 -
Flags: review?(mwu) → review+
Updated•12 years ago
|
Whiteboard: [status: needs review][apps watch list][target:05/17] → [status: needs landing][apps watch list][target:05/17]
Assignee | ||
Comment 20•12 years ago
|
||
Committable patch. Carry "chris.double: review+".
Attachment #750088 -
Attachment is obsolete: true
Attachment #750695 -
Flags: review+
Assignee | ||
Comment 21•12 years ago
|
||
Committable patch. Carry "mwu: review+ ".
Attachment #750697 -
Flags: review+
Assignee | ||
Updated•12 years ago
|
Attachment #750090 -
Attachment is obsolete: true
Assignee | ||
Comment 22•12 years ago
|
||
Committable patch. Carry "chris.double: review+".
Assignee | ||
Comment 23•12 years ago
|
||
Comment on attachment 750698 [details] [diff] [review]
Part1 v3 b2g18 - fix deadlock during youtube video playback
Committable patch. Carry "chris.double: review+".
Attachment #750698 -
Flags: review+
Assignee | ||
Comment 24•12 years ago
|
||
Committable patch. Carry "mwu: review+ ".
Assignee | ||
Comment 25•12 years ago
|
||
Committable patch. Carry "chris.double: review+".
Attachment #750702 -
Flags: review+
Assignee | ||
Comment 26•12 years ago
|
||
Committable patch. Carry "mwu: review+ ".
Attachment #750705 -
Flags: review+
Assignee | ||
Updated•12 years ago
|
Attachment #749473 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Attachment #750699 -
Flags: review+
Comment 27•12 years ago
|
||
https://hg.mozilla.org/projects/birch/rev/b5a42a30e193
https://hg.mozilla.org/projects/birch/rev/2cad9e70289a
Whiteboard: [status: needs landing][apps watch list][target:05/17] → [status: needs uplift][apps watch list][target:05/17]
Assignee | ||
Comment 28•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Updated•12 years ago
|
status-b2g18:
--- → affected
status-b2g18-v1.0.1:
--- → affected
Comment 29•12 years ago
|
||
Comment 30•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/af11c849013a
https://hg.mozilla.org/releases/mozilla-b2g18/rev/88d32aa777f5
https://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/41ffa95cf01e
https://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/5927e20d17d6
status-b2g18-v1.0.0:
--- → wontfix
status-firefox22:
--- → wontfix
status-firefox23:
--- → wontfix
status-firefox24:
--- → fixed
Whiteboard: [status: needs uplift][apps watch list][target:05/17] → [apps watch list][target:05/17]
Comment 31•11 years ago
|
||
This issue still reproduces on the Inari Device Build ID: 20130529070211
Environmental Variables:
Kernel Date: Apr 25
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/6ca32ed2bbc6
Gaia: 8f5ab7bfd4a2921aab4e2de11e0d79a29c1bb062
Video freezes after a few minutes of watching a youtube video with slow data. I was also able to reproduce bug#863441 where the video will freeze on a green screen. This issue was verified fixed so I can create a new bug or reopen the closed one.
Comment 32•11 years ago
|
||
There's already a bug on this - bug 876843.
Assignee | ||
Comment 33•11 years ago
|
||
(In reply to Sarah Parsons from comment #31)
> Video freezes after a few minutes of watching a youtube video with slow
> data. I was also able to reproduce bug#863441 where the video will freeze on
> a green screen. This issue was verified fixed so I can create a new bug or
> reopen the closed one.
Green screen might be fixed by Bug 877400. In this case, video playback ended by error in decoding or networking. So it should not be dead lock. Just ended video playback because of error.
Comment 34•11 years ago
|
||
Video does not freeze after a few minutes (was able to play a 3 minute video with no interruption) of watching a Youtube video with slow data on Inari (H connectivity). This issue does not reproduces on the Inari v1.0.1 (tested on 2 different builds)
Inari Build ID:
Build ID: 20130529070211
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/f379dc8c9181
Gaia: ac293ce59acc3bede083fad1b973794fa8bf0253
Inari Build ID: 20130606070202
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/e329fbd2d2ed
Gaia: 37b6527c3f73a497f75d057e90386f77ff5a552b
Due to connectivity issue unable to verify for v1.1 on Unagi (only Edge was available. Unable to verify on Leo as Blocked by this bug https://bugzilla.mozilla.org/show_bug.cgi?id=859260.
You need to log in
before you can comment on or make changes to this bug.
Description
•