Closed
Bug 1071205
Opened 10 years ago
Closed 10 years ago
android::SoftAVCEncoder crashes while recording video in Firefox OS v2.1 Camera app
Categories
(Firefox OS Graveyard :: GonkIntegration, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.1 S9 (21Nov)
People
(Reporter: diego, Assigned: sotaro)
References
Details
(Keywords: crash, Whiteboard: [b2g-crash][caf-crash 363][caf priority: p3][CR 727232][POVB])
Attachments
(3 files)
No description provided.
Reporter | ||
Updated•10 years ago
|
Summary: android::SoftAVCEncoder crashes while recording video in Firefox OS v2.1 Camera pp → android::SoftAVCEncoder crashes while recording video in Firefox OS v2.1 Camera app
Comment 1•10 years ago
|
||
move to FireFox OS :General because cmaera app still use the mozCamera API, not MediaRecorder.
Component: Video/Audio: Recording → GonkIntegration
Product: Core → Firefox OS
Reporter | ||
Updated•10 years ago
|
Whiteboard: [CR 727232]
Updated•10 years ago
|
Blocks: CAF-v2.1-FC-metabug
Updated•10 years ago
|
Whiteboard: [CR 727232] → [caf priority: p1][CR 727232]
Updated•10 years ago
|
Whiteboard: [caf priority: p1][CR 727232] → [b2g-crash][caf-crash 363][caf priority: p1][CR 727232]
Comment 2•10 years ago
|
||
Observed on:
Device: msm8226
Gonk Version: AU_LINUX_GECKO_B2G_KK_2.0.01.04.00.114.085
Moz BuildID: 20140916000206
B2G Version: ---
Gecko Version: 34.0a2
Gaia: http://git.mozilla.org/?p=releases/gaia.git;a=commit;h=713448b8963cd53c561f4b38640f8c63b655ce33
Gecko: http://git.mozilla.org/?p=releases/gecko.git;a=commit;h=395370094caa386ebf8fe8831d030bc5484fa599
Patches: bug 1055299, bug 1044125, bug 1051633, bug 1067205, bug 1070431, bug 1063877, bug 1070195, bug 1064376, bug 1057220
Reporter | ||
Comment 3•10 years ago
|
||
Marking [POVB] as it looks like a vendor issue for now.
Whiteboard: [b2g-crash][caf-crash 363][caf priority: p1][CR 727232] → [b2g-crash][caf-crash 363][caf priority: p1][CR 727232][POVB]
Updated•10 years ago
|
Whiteboard: [b2g-crash][caf-crash 363][caf priority: p1][CR 727232][POVB] → [b2g-crash][caf-crash 363][caf priority: p3][CR 727232][POVB]
Comment 4•10 years ago
|
||
Observed on:
Device: msm8226
Gonk Version: AU_LINUX_GECKO_B2G_KK_2.0.01.04.00.114.127
Moz BuildID: 20141029001202
B2G Version: ---
Gecko Version: 34.0
Gaia: http://git.mozilla.org/?p=releases/gaia.git;a=commit;h=eb0aab0f13c78c7ac378ad860e865c4b6eaf669f
Gecko: http://git.mozilla.org/?p=releases/gecko.git;a=commit;h=e16ae12c5ab365be13fb2c98d3811b93b25ded6d
Patches: bug 1070431, bug 1083449
Reporter | ||
Comment 5•10 years ago
|
||
As comment 4 notes this crash happened again in a recent v2.1 build. I'm reopening and will add crash details shortly.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 6•10 years ago
|
||
Add crash stack
Reporter | ||
Comment 7•10 years ago
|
||
The crash was due to a null check on the init params during in software encoder initialization [1].
Looks like the init params are only set to null on destruction [2], so most likely the problem is that the software encoder received buffers after it was destroyed.
[1] https://www.codeaurora.org/cgit/quic/la/platform/frameworks/av/tree/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp?id=AU_LINUX_GECKO_B2G_KK_2.0.01.04.00.114.121#n219
[2] https://www.codeaurora.org/cgit/quic/la/platform/frameworks/av/tree/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp?id=AU_LINUX_GECKO_B2G_KK_2.0.01.04.00.114.121#n352
Reporter | ||
Comment 8•10 years ago
|
||
Hi Sotaro,
There may be some stale buffers reaching the software encoder after destruction. Any idea who can help us here?
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 9•10 years ago
|
||
SoftAVCEncoder seems a big problem here. During camera recording hw decoder should be used.
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 10•10 years ago
|
||
diego, can you provide the STR of the crash?
Flags: needinfo?(dwilson)
Assignee | ||
Comment 11•10 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #10)
> diego, can you provide the STR of the crash?
And can you also provide the logcat log? Thanks.
Assignee | ||
Comment 12•10 years ago
|
||
In current gecko, OMX hw encoder resource is not managed/controlled on gonk. Therefore, if hw encoder resource allocation contention happens, the phone could just failed to allocate hw encoder and might fallback to sw encoder.
Reporter | ||
Comment 13•10 years ago
|
||
Here is the extra file with log included.
Unfortunately I don't have STR. This happened during automated stability camera testing.
Flags: needinfo?(dwilson)
Assignee | ||
Comment 14•10 years ago
|
||
Hmm, attachment 8518297 [details] seems not include necessary information.
Reporter | ||
Comment 15•10 years ago
|
||
Sorry, the full logs are too large to add as an attachment. You can download the zip from here:
https://www.dropbox.com/s/d8xbiymb5jofrsy/bug-1071205-logs.zip?dl=0
Reporter | ||
Updated•10 years ago
|
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 16•10 years ago
|
||
Thanks for the log. From the log, hw encoder seems to emitting error. The following is related part.
> 11-04 16:13:06.594 300 7543 E mm-camera: stats_port_event: Failure posting to the bus!
> 11-04 16:13:06.594 202 7554 D QCamera2HWI: static void qcamera::QCamera2HardwareInterface::metadata_stream_cb_routine(mm_camera_super_buf_t*, qcamera::QCameraStream*, void*): hdr_scene_data: 1 0 0.000000
> 11-04 16:13:06.594 202 7554 E QCamera2HWI: int32_t qcamera::QCamera2HardwareInterface::processHDRData(cam_asd_hdr_scene_data_t) : hdr_scene_data: processHDRData: 0 0.000000
> 11-04 16:13:06.594 2968 3270 D GonkNativeWindow: GonkNativeWindow::returnBuffer
> 11-04 16:13:06.604 202 7555 D QCamera2HWI: [KPI Perf] static void qcamera::QCamera2HardwareInterface::preview_stream_cb_routine(mm_camera_super_buf_t*, qcamera::QCameraStream*, void*) : END
> 11-04 16:13:06.604 202 7583 E OMX-VENC-720p: HW Error recieved
> 11-04 16:13:06.604 202 7583 E OMX-VENC-720p: ERROR: async_msg_process() - Error statuscode = 1
> 11-04 16:13:06.614 300 7475 E mm-camera: cpp_hardware_process_frame:855] stream_status:0xb88e82f4, iden:0x10008, cur_frame_id:50
> 11-04 16:13:06.614 300 7543 E mm-camera: msg_bus_post_msg: bus_msg type is not valid
> 11-04 16:13:06.614 300 7543 E mm-camera: stats_port_event: Failure posting to the bus!
> 11-04 16:13:06.614 300 7543 E mm-camera: msg_bus_post_msg: bus_msg type is not valid
> 11-04 16:13:06.614 300 7543 E mm-camera: stats_port_event: Failure posting to the bus!
> 11-04 16:13:06.614 300 7543 E mm-camera: msg_bus_post_msg: bus_msg type is not valid
> 11-04 16:13:06.614 300 7543 E mm-camera: stats_port_event: Failure posting to the bus!
> 11-04 16:13:06.614 2968 2974 E OMXCodec: [OMX.qcom.video.encoder.avc] ERROR(0x80001009, 0)
Flags: needinfo?(sotaro.ikeda.g)
Assignee | ||
Comment 17•10 years ago
|
||
Assignee | ||
Comment 18•10 years ago
|
||
attachment 8518535 [details] [diff] [review] restricts to use only hw encoder for video encoding. It seems to prevent fallback to software video encoder. But it does not address hw video encoder's error.
Assignee | ||
Comment 19•10 years ago
|
||
software video encoder can not be used for the product. Therefore this restriction seems ok. And it could prevent SoftAVCEncoder crashes.
Assignee | ||
Updated•10 years ago
|
Attachment #8518535 -
Flags: feedback?(dwilson)
Assignee | ||
Comment 20•10 years ago
|
||
diego, how do you think about attachment 8518535 [details] [diff] [review]?
Reporter | ||
Comment 21•10 years ago
|
||
Comment on attachment 8518535 [details] [diff] [review]
patch - Change Video encode to HardwareCodecsOnly
Review of attachment 8518535 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM. I don't know what's the general opinion in the media team here, though.
Attachment #8518535 -
Flags: feedback?(dwilson) → feedback+
Assignee | ||
Comment 22•10 years ago
|
||
ICS already limit video encoder only to Hw video encoder. Therefore the change seems OK.
Assignee | ||
Comment 23•10 years ago
|
||
Comment on attachment 8518535 [details] [diff] [review]
patch - Change Video encode to HardwareCodecsOnly
mikeh, can you review the patch?
Attachment #8518535 -
Flags: review?(mhabicher)
Assignee | ||
Comment 24•10 years ago
|
||
Comment 25•10 years ago
|
||
Comment on attachment 8518535 [details] [diff] [review]
patch - Change Video encode to HardwareCodecsOnly
Review of attachment 8518535 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me.
One suggestion, but I don't feel particularly strongly about it.
::: dom/camera/GonkRecorder.cpp
@@ +1268,5 @@
> // CHECK_EQ causes an abort if the given condition fails.
> CHECK_EQ(client.connect(), (status_t)OK);
>
> uint32_t encoder_flags = 0;
> + encoder_flags |= OMXCodec::kHardwareCodecsOnly;
uint32_t encoder = OMXCodec::kHardwareCodecsOnly; ?
Attachment #8518535 -
Flags: review?(mhabicher) → review+
Assignee | ||
Comment 26•10 years ago
|
||
(In reply to Mike Habicher [:mikeh] from comment #25)
>
> ::: dom/camera/GonkRecorder.cpp
> @@ +1268,5 @@
> > // CHECK_EQ causes an abort if the given condition fails.
> > CHECK_EQ(client.connect(), (status_t)OK);
> >
> > uint32_t encoder_flags = 0;
> > + encoder_flags |= OMXCodec::kHardwareCodecsOnly;
>
> uint32_t encoder = OMXCodec::kHardwareCodecsOnly; ?
Yhea, it is simpler.
Assignee | ||
Comment 27•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → sotaro.ikeda.g
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S9 (21Nov)
You need to log in
before you can comment on or make changes to this bug.
Description
•