Videos fail to play from gallery app

Bug #1365509 reported by Jean-Baptiste Lallement
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Media Hub
Fix Released
Critical
Jani Monoses
gallery-app
Invalid
Undecided
Unassigned
apparmor-easyprof-ubuntu (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

com.ubuntu.gallery 2.9.1.1049

Videos launched from the gallery app do not play in mediaplayer even if the video plays perfectly when launched from other apps (scope, filemanager or directly)

TEST CASE:
1. Download http://samplemedia.linaro.org/H264/tears_of_steel_1080p_H264_24fps.mov
2. Copy it to /home/phablet/Videos with MTP (nautilus or gvfs-copy)
3. Open the gallery-app
4. Locate the video in the gallery
5. Tap the video thumbnail to play it in the media player

ACTUAL RESULT
The video plays but is black or green and with audio only, or doesn't play at all. Often there is a media-hub-server crash and sometimes a mediaplayer crash (bug 1364476)

Revision history for this message
Bill Filler (bfiller) wrote :

Note, this only happens on krillin. It works fine on mako.
I'm testing with build 16 on krillin. Looks like some policy things may have to be added. There are a ton of apparmor denials in /var/log/syslog when trying to play a video in gallery:

Sep 4 23:03:06 ubuntu-phablet kernel: [ 7089.770923] (0)[24512:CodecLooper]type=1400 audit(1409886186.514:88): apparmor="DENIED" operation="open" profile="com.ubuntu.gallery_gallery_2.9.1.1049" name="/android/system/etc/mtk_omx_core.cfg" pid=24512 comm="CodecLooper" requested_mask="r" denied_mask="r" fsuid=32011 ouid=0
Sep 4 23:03:07 ubuntu-phablet kernel: [ 7090.821936] (0)[24524:MtkOmxVdecDecod]type=1400 audit(1409886187.564:89): apparmor="DENIED" operation="open" profile="/usr/bin/media-hub-server" name="/dev/MTK_SMI" pid=24524 comm="MtkOmxVdecDecod" requested_mask="r" denied_mask="r" fsuid=32011 ouid=0
Sep 4 23:03:08 ubuntu-phablet kernel: [ 7091.662986] (0)[24561:CodecLooper]type=1400 audit(1409886188.404:90): apparmor="DENIED" operation="open" profile="com.ubuntu.gallery_gallery_2.9.1.1049" name="/android/system/etc/mtk_omx_core.cfg" pid=24561 comm="CodecLooper" requested_mask="r" denied_mask="r" fsuid=32011 ouid=0
Sep 4 23:03:10 ubuntu-phablet kernel: [ 7093.517505] (1)[24589:CodecLooper]type=1400 audit(1409886190.254:91): apparmor="DENIED" operation="open" profile="com.ubuntu.gallery_gallery_2.9.1.1049" name="/android/system/etc/mtk_omx_core.cfg" pid=24589 comm="CodecLooper" requested_mask="r" denied_mask="r" fsuid=32011 ouid=0
Sep 4 23:03:19 ubuntu-phablet kernel: [ 7102.409151] (1)[24191:QSGRenderThread]type=1400 audit(1409886199.144:92): apparmor="DENIED" operation="open" profile="com.ubuntu.gallery_gallery_2.9.1.1049" name="/proc/M4U_device" pid=24191 comm="QSGRenderThread" requested_mask="r" denied_mask="r" fsuid=32011 ouid=0
Sep 4 23:03:19 ubuntu-phablet kernel: [ 7102.409411] (1)[24191:QSGRenderThread]type=1400 audit(1409886199.144:93): apparmor="DENIED" operation="open" profile="com.ubuntu.gallery_gallery_2.9.1.1049" name="/proc/M4U_device" pid=24191 comm="QSGRenderThread" requested_mask="r" denied_mask="r" fsuid=32011 ouid=0
Sep 4 23:03:20 ubuntu-phablet kernel: [ 7103.643101] (2)[24191:QSGRenderThread]type=1400 audit(1409886200.384:94): apparmor="DENIED" operation="open" profile="com.ubuntu.gallery_gallery_2.9.1.1049" name="/proc/M4U_device" pid=24191 comm="QSGRenderThread" requested_mask="r" denied_mask="r" fsuid=32011 ouid=0

Changed in media-hub:
importance: Undecided → Critical
Changed in apparmor-easyprof-ubuntu (Ubuntu):
importance: Undecided → Critical
Changed in gallery-app:
status: New → Invalid
Changed in media-hub:
assignee: nobody → Jim Hodapp (jhodapp)
Changed in apparmor-easyprof-ubuntu (Ubuntu):
assignee: nobody → Jamie Strandboge (jdstrand)
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

These need to be added to the hardware/video.d file for krillin (this is part of the device tarball and not part of apparmor-easyprof-ubuntu and are thus handled separately):
  @{PROC}/M4U_device r,
  /{,android/}system/etc/mtk_omx_core.cfg r,
  /dev/MTK_SMI r,

That said, I wonder why the gallery app itself is accessing these files and not just letting media-hub do it? Note, media-hub already has the first two of these rules in its policy.

Changed in apparmor-easyprof-ubuntu (Ubuntu):
assignee: Jamie Strandboge (jdstrand) → nobody
importance: Critical → Undecided
status: New → Invalid
tags: added: application-confinement
Revision history for this message
Jani Monoses (jani) wrote :

This are fixed in krillin git but not yet in a published device tarball.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

Not sure what project the device tarball is a part of, so leaving it as media-hub for the project that it affects and assigned Jani to it just to keep track of the bug.

Changed in media-hub:
assignee: Jim Hodapp (jhodapp) → Jani Monoses (jani)
Revision history for this message
Jani Monoses (jani) wrote :

Does this happen with image 22?
That has device-20140904-741ef02.tar.xz which includes most of the apparmor fixes.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I tried with a video recorded with the camera and the video in the description with build:
version version: 23
version ubuntu: 20140908
version device: 20140904-741ef02
version custom: krillin-0.3a

And confirm that it is fixed.

Changed in media-hub:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.