Hi OS experts,
One of our Tast tests (
lacros.Basic) is flaky, and the way it works (
code search link) is that it invokes a Python script, which then launches a binary, but for some reason, launching the binary flakily fails due to "[Errno 13] Permission denied" error.
This
file contains an example of the detailed error log:
Traceback (most recent call last):
File "/usr/local/bin/mojo_connection_lacros_launcher.py", line 149, in <module>
sys.exit(Main())
File "/usr/local/bin/mojo_connection_lacros_launcher.py", line 143, in Main
proc = subprocess.Popen(cmd, pass_fds=pass_fds)
File "/usr/local/lib64/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/usr/local/lib64/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/mnt/stateful_partition/lacros_test_artifacts/lacros_binary/chrome'At first, we thought it might be due to that the permission on the file is not set correctly, so we also
dumped the results of a `ls -l` command to double check:
total 212240
drwx------. 2 root root 4096 May 20 11:19 792198682
drwx------. 25 root root 4096 May 20 11:19 979199975
drwxr-xr-x. 3 311298 89939 4096 Apr 28 20:27 WidevineCdm
-rwxr-xr-x. 1 311298 89939 172938568 Apr 28 21:22 chrome
-rw-r--r--. 1 311298 89939 849663 Apr 28 21:22 chrome_100_percent.pak
-rw-r--r--. 1 311298 89939 1487299 Apr 28 21:22 chrome_200_percent.pak
-rwxr-xr-x. 1 311298 89939 4649688 Apr 28 21:22 crashpad_handler
-rw-r--r--. 1 311298 89939 4825605 Apr 28 21:22 headless_lib.pak
-rw-r--r--. 1 311298 89939 10474512 Apr 28 21:22 icudtl.dat
drwxr-xr-x. 2 311298 89939 4096 Apr 28 20:37 locales
-rw-r--r--. 1 311298 89939 77 Apr 28 21:22 metadata.json
-rwxr-xr-x. 1 311298 89939 11103040 Apr 28 21:22 nacl_helper
-rwxr-xr-x. 1 311298 89939 3868208 Apr 28 21:22 nacl_irt_x86_64.nexe
-rw-r--r--. 1 311298 89939 7034097 Apr 28 21:22 resources.pak
-rw-r--r--. 1 311298 89939 48908 Apr 28 21:22 snapshot_blob.bin
drwxr-xr-x. 2 311298 89939 4096 Apr 28 20:27 swiftshader
Which shows that the binary can be executed by anyone.
At this point, we don't know how to move forward, does anyone have any suggestions on how to debug this type of issue?
Thanks,
Yuke