security.SELinuxProcessContext can fail if process goes away |
||
Issue descriptionThere's a race in the security.SELinuxProcessContext test. It can fail if a process disappears while it's reading its data from /proc. It generally tries to handle this but fails to do so for attr/current. See e.g. the betty-pre-cq run at http://cros-goldeneye/chromeos/healthmonitoring/buildDetails?buildbucketId=8929916930188247136 2018/11/13 21:49:55 Started test security.SELinuxProcessContext 2018/11/13 21:49:55 [21:49:51.376] Error at selinux_process_context.go:34: Failed to get processes: open /proc/5900/attr/current: no such file or directory 2018/11/13 21:49:55 [21:49:51.376] Stack trace: Failed to get processes at chromiumos/tast/local/bundles/cros/security.SELinuxProcessContext (selinux_process_context.go:34) at chromiumos/tast/testing.(*Test).Run.func4 (test.go:189) at chromiumos/tast/testing.runStages.func1.1 (stage.go:39) at chromiumos/tast/testing.runAndRecover.func1 (stage.go:69) at runtime.goexit (asm_amd64.s:2361) open /proc/5900/attr/current: no such file or directory 2018/11/13 21:49:55 Completed test security.SELinuxProcessContext in 154ms with 1 error(s)
,
Nov 14
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/309fae57eb9c455d129155c408f849efa52f223e commit 309fae57eb9c455d129155c408f849efa52f223e Author: Daniel Erat <derat@chromium.org> Date: Wed Nov 14 14:53:34 2018 tast-tests: Fix race in selinux.GetProcesses. Make GetProcesses not return an error if a process disappears just before attr/current is read from /proc. BUG= chromium:905204 TEST=ran security.SELinuxProcessContext Change-Id: I5abbe19759201601ccfe047ff59876efa087fc3b Reviewed-on: https://chromium-review.googlesource.com/c/1335176 Tested-by: Dan Erat <derat@chromium.org> Reviewed-by: Qijiang Fan <fqj@chromium.org> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org> Commit-Queue: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> [modify] https://crrev.com/309fae57eb9c455d129155c408f849efa52f223e/src/chromiumos/tast/local/bundles/cros/security/selinux/processes_helper.go
,
Nov 14
|
||
►
Sign in to add a comment |
||
Comment 1 by briannorris@google.com
, Nov 14