Closed
Bug 1107283
Opened 9 years ago
Closed 9 years ago
[gonk-l] camera HAL test failure on Nexus 5
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1112175
People
(Reporter: jhlin, Unassigned)
References
Details
When running camera tests under device/lge/hammerhead/camera/QCamera2/stack/mm-camera-test/, it prints following error log: 12-03 17:29:19.617 5410 5410 E mm-camera-test: 12-03 17:29:19.617 5410 5410 E mm-camera-test: Camera Test Application 12-03 17:29:19.625 5410 5410 E mm-camera-test: mm_app_load_hal: num_cameras = 2 12-03 17:29:19.629 5410 5410 E mm-camera-test: Running 2 test cases 12-03 17:29:19.636 5410 5410 E mm-camera-test: mm_app_open:BEGIN 12-03 17:29:19.637 5410 5410 D mm-camera-intf: mm_camera_open: dev name = /dev/video1, cam_idx = 1 12-03 17:29:19.637 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.657 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.677 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.697 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.717 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.737 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.758 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.778 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.798 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.818 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.838 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.858 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.878 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.898 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.918 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.939 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.959 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:19.979 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:20.000 5410 5410 D mm-camera-intf: mm_camera_open:failed with I/O error retrying after 20 milli-seconds 12-03 17:29:20.020 5410 5410 D mm-camera-intf: mm_camera_open: opened, break out while loop 12-03 17:29:20.020 5410 5410 E mm-camera-intf: mm_camera_open: cannot open control fd of '/dev/video1' (I/O error) 12-03 17:29:20.020 5410 5410 E mm-camera-intf: camera_open: mm_camera_open err = -1 12-03 17:29:20.020 5410 5410 E mm-camera-test: mm_app_open:dev open error 12-03 17:29:20.020 5410 5410 E mm-camera-test: mm_app_tc_open_close:mm_app_open() cam_idx=0, err=-1 12-03 17:29:20.031 5410 5410 E mm-camera-test: mm_app_tc_open_close:END, rc = -1
Updated•9 years ago
|
Depends on: gonk-L-Camera
Reporter | ||
Comment 1•9 years ago
|
||
Looks like qcamera service (mm-qcamera-daemon) is not started automatically by init in current L-porting build. The errors will be gone once I start it by hand.
Reporter | ||
Comment 2•9 years ago
|
||
BTW, qcamera stack test still fails because of some ION memory allocation error, but android HAL tests (/hardware/libhardware/tests/camera2/) seems fine.
Updated•9 years ago
|
No longer depends on: gonk-L-Camera
Updated•9 years ago
|
Blocks: gonk-L-Camera
Reporter | ||
Comment 3•9 years ago
|
||
TL;DR --- it seems qcamera daemon is not started by init because SELinux is disabled. Kai-Zhen, is there any particular reason that SELinux cannot be enabled, even in permissive mode? FWICT, the action of starting qcamera daemon (and other services belonging to 'late_start' class in init.hammerhead.rc) will be triggered [1] after file system is mounted [2] successfully. However, it seems mounting /firmware fails because of the SELinux context specified in options [3]: === KLOG BEGIN === <4>[ 2.370437] SELinux: Unable to set superblock options before the security server is initialized <6>[ 2.370667] fs_mgr: __mount(source=/dev/block/platform/msm_sdcc.1/by-name/modem,target=/firmware,type=vfat)=-1 <3>[ 2.370720] fs_mgr: Failed to mount an un-encryptable or wiped partition on/dev/block/platform/msm_sdcc.1/by-name/modem at /firmware options: shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 error: Invalid argument <3>[ 2.370856] init: fs_mgr_mount_all returned an error <3>[ 2.371065] init: fs_mgr_mount_all returned unexpected error 255 === KLOG END === SELinux looks suspicious so I dug around and found it's disabled at [4]. After changing 'androidboot.selinux' to 'permissive', it looks like qcamera daemon is started by init. [1] https://android.googlesource.com/platform/system/core/+/android-5.0.1_r1/init/builtins.c#555 [2] https://android.googlesource.com/platform/system/core/+/android-5.0.1_r1/init/builtins.c#534 [3] https://github.com/Seinlin/device-hammerhead/commit/674a5c2a3ad778eff30238a64e93bcb6f02168b7 [4] https://github.com/Seinlin/device-hammerhead/commit/e4b9af484df2d747a099bb10c3fe3ec881417a47
Flags: needinfo?(kli)
Comment 4•9 years ago
|
||
John, "androidboot.selinux=disabled" is set to boot up successfully, no other special reason. After changing 'androidboot.selinux' to 'permissive', this wip patch can also be removed. So I think we should use 'permissive' instead of disabled. https://github.com/Seinlin/gonk-patches/blob/b2g-5.0.0_r6/all-hammerhead/gonk-misc/0002-Start-b2g-related-processes.patch
Flags: needinfo?(kli)
Comment 5•9 years ago
|
||
I've filed a bug to land 'androidboot.selinux=permissive'.
Depends on: 1112175
Reporter | ||
Comment 6•9 years ago
|
||
Rephrase the summary since we're fine as long as camera HAL test works.
Summary: [gonk-l] mm-qcamera-app test failure on Nexus 5 → [gonk-l] camera HAL test failure on Nexus 5
Comment 8•9 years ago
|
||
No, I am not familiar with camera HAL, I already take and resolve it dependent bug 1112175.
Flags: needinfo?(kli)
Comment 9•9 years ago
|
||
Hi John, Is it possible the issue descirbed on bug 1112017 comment 3 causes the test fail?
Flags: needinfo?(jolin)
Reporter | ||
Comment 10•9 years ago
|
||
(In reply to Vincent Liu[:vliu] from comment #9) > Hi John, > > Is it possible the issue descirbed on bug 1112017 comment 3 causes the test > fail? I think Kai-Zhen's patch in bug 1112175 makes starting qcamerasvr manually unnecessary too? And after applying Boris' patch in bug 1098970 and wchi's in bug 1107300, I didn't observe the problem in bug 1112017. Anyway, Android camera HAL test works fine now so I'm closing this bug (by marking it as dup. of bug 1112175).
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(jolin)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•