unit test AuthPolicyTest.UserPolicyFetchSucceedsWithData failed on amd64-generic-tot-asan-informational |
||||||
Issue descriptionThe unit test AuthPolicyTest.UserPolicyFetchSucceedsWithData has been failed on amd64-generic-tot-asan-informational bot for a long time since 4/29, starting with https://build.chromium.org/p/chromiumos.chromium/builders/amd64-generic-tot-asan-informational/builds/12919
,
May 3 2017
The log shows the following error: authpolicy-0.0.1-r350: ../../../../../../../../../mnt/host/source/src/platform2/authpolicy/authpolicy_unittest.cc:216: Failure authpolicy-0.0.1-r350: Value of: actual_error authpolicy-0.0.1-r350: Actual: 12 authpolicy-0.0.1-r350: Expected: expected_error authpolicy-0.0.1-r350: Which is: 0 authpolicy-0.0.1-r350: [0503/175110:ERROR:serialization_utils.cc(187)] /var/lib/metrics/uma-events: cannot open: No such file or directory authpolicy-0.0.1-r350: [0503/175110:WARNING:authpolicy_metrics.cc(95)] Timer AuthPolicy.TimeToRefreshUserPolicy failed to report. authpolicy-0.0.1-r350: ../../../../../../../../../mnt/host/source/src/platform2/authpolicy/authpolicy_unittest.cc:466: Failure authpolicy-0.0.1-r350: Value of: store_policy_called_ authpolicy-0.0.1-r350: Actual: false authpolicy-0.0.1-r350: Expected: expected_error == ERROR_NONE authpolicy-0.0.1-r350: Which is: true authpolicy-0.0.1-r350: ../../../../../../../../../mnt/host/source/src/platform2/authpolicy/authpolicy_unittest.cc:467: Failure authpolicy-0.0.1-r350: Value of: validate_user_policy_called_ authpolicy-0.0.1-r350: Actual: false authpolicy-0.0.1-r350: Expected: expected_error == ERROR_NONE authpolicy-0.0.1-r350: Which is: true authpolicy-0.0.1-r350: [ FAILED ] AuthPolicyTest.UserPolicyFetchSucceedsWithData (1812 ms)
,
May 3 2017
ljusten@, I saw you have made some changes in authpolicy_unittest.cc recently, is it possible one of them caused this unit test failure? Can you please take a look?
,
May 4 2017
Confirmed and reproduced locally. Two issues: 1) Sandboxed processes run from unit tests can't write logs: Stderr: ERROR: Can't open file: /var/log/asan/asan.1002 This directory doesn't exist in /build/$board/var/log. I found crbug.com/244732, which fixes the issue for installed devices, but in the build directory that unit tests use. e.g. chromiumos/chroot/build/amd64-generic/var/log the folder isn't available. When I create the folder manually, I don't get proper symbolized stack traces. I'll follow up on this. 2) Sandboxed processes leak, leading to exit code 1, leading to test failures. The leak is probably the same as crbug.com/717888 . I'm working on a fix.
,
May 5 2017
Any update on the fix?
,
May 5 2017
I've landed a CL in chromium that will allow me to fix the memory leak that causes the failure: https://codereview.chromium.org/2860973002/ I'll have to get that into libchrome now, which might be tricky since the latest base code has been merged to libchrome, but it didn't get upreved yet in chrome os. I'll probably have to use an epatch. I'll do that on Monday. I've also uploaded a CL that fixes asan logging: https://chromium-review.googlesource.com/c/497389/ All my co-owners are on vacation right now, so that'll take a while to get in, but it's not urgent since it won't fix the failed test (just makes it fail more nicely).
,
May 8 2017
/sub for this week's chrome-on-chromeos gardener
,
May 9 2017
Fret not! Fix is in the CQ. CL:496128, CL:497434.
,
May 10 2017
Ping? Did the fix land? I'm still seeing failures: authpolicy-0.0.1-r359: [0;31m[ FAILED ] [mAuthPolicyTest.UserPolicyFetchSucceedsWithData authpolicy-0.0.1-r359: [0;31m[ FAILED ] [mAuthPolicyTest.UserPolicyFetchSucceedsWithPolicyLevel authpolicy-0.0.1-r359: [0;31m[ FAILED ] [mAuthPolicyTest.UserPolicyFetchMandatoryTakesPreference authpolicy-0.0.1-r359: [0;31m[ FAILED ] [mAuthPolicyTest.UserPolicyFetchIgnoreBadDataType authpolicy-0.0.1-r359: [0;31m[ FAILED ] [mAuthPolicyTest.UserPolicyFetchIgnoreZeroVersion authpolicy-0.0.1-r359: [0;31m[ FAILED ] [mAuthPolicyTest.UserPolicyFetchIgnoreFlagSet authpolicy-0.0.1-r359: [0;31m[ FAILED ] [mAuthPolicyTest.DevicePolicyFetchSucceedsWithData authpolicy-0.0.1-r359: [0;31m[ FAILED ] [mAuthPolicyTest.DevicePolicyFetchGposOverride authpolicy-0.0.1-r359: [0510/150650:INFO:process_executor.cc(35)] Stderr: ERROR: Can't open file: /var/log/asan/asan.1002 authpolicy-0.0.1-r359: [0510/150650:INFO:process_executor.cc(177)] Exit code: 1 authpolicy-0.0.1-r359: [0510/150650:ERROR:samba_interface.cc(1090)] Failed to parse preg files authpolicy-0.0.1-r359: [0510/150650:INFO:authpolicy.cc(39)] Device policy fetch and parsing failed with code 12 authpolicy-0.0.1-r359: ../../../../../../../../../mnt/host/source/src/platform2/authpolicy/authpolicy_unittest.cc:216: Failure authpolicy-0.0.1-r359: Value of: actual_error authpolicy-0.0.1-r359: Actual: 12 authpolicy-0.0.1-r359: Expected: expected_error authpolicy-0.0.1-r359: Which is: 0 authpolicy-0.0.1-r359: [0510/150650:ERROR:serialization_utils.cc(187)] /var/lib/metrics/uma-events: cannot open: No such file or directory authpolicy-0.0.1-r359: [0510/150650:WARNING:authpolicy_metrics.cc(95)] Timer AuthPolicy.TimeToRefreshDevicePolicy failed to report. authpolicy-0.0.1-r359: ../../../../../../../../../mnt/host/source/src/platform2/authpolicy/authpolicy_unittest.cc:513: Failure authpolicy-0.0.1-r359: Value of: store_policy_called_ authpolicy-0.0.1-r359: Actual: false authpolicy-0.0.1-r359: Expected: expected_error == ERROR_NONE authpolicy-0.0.1-r359: Which is: true authpolicy-0.0.1-r359: ../../../../../../../../../mnt/host/source/src/platform2/authpolicy/authpolicy_unittest.cc:514: Failure authpolicy-0.0.1-r359: Value of: validate_device_policy_called_ authpolicy-0.0.1-r359: Actual: false authpolicy-0.0.1-r359: Expected: expected_error == ERROR_NONE authpolicy-0.0.1-r359: Which is: true authpolicy-0.0.1-r359: [0;31m[ FAILED ] [mAuthPolicyTest.DevicePolicyFetchGposOverride (1134 ms) https://build.chromium.org/p/chromiumos.chromium/builders/amd64-generic-tot-asan-informational/builds/12996
,
May 10 2017
The two CLs https://chromium-review.googlesource.com/c/497434/ and https://chromium-review.googlesource.com/c/496128/ are still in the CQ.
,
May 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/779a9fb081c3807d79756ac6443da40351a9f26e commit 779a9fb081c3807d79756ac6443da40351a9f26e Author: Lutz Justen <ljusten@chromium.org> Date: Thu May 11 16:40:25 2017 authpolicy: Fix policy load status UMA memory leak Use PolicyLoadStatusSampler instead of PolicyLoadStatusUmaReporter (formerly known as PolicyLoadStatusSample without 'r') when calling preg_parser. The UMA reporter sends stats to base::Histogram, which is not hooked up in Chrome OS and causes memory leaks as well as asan test failures. Note that load status is still not sent to UMA, but instead a less fine-grained error ERROR_PARSE_PREG_FAILED is reported. Also gets rid of an unnecessary helper namespace. CQ-DEPEND=CL:497434 BUG= chromium:718182 TEST=Unit tests succeeded in asan Change-Id: Ie57b26c4db433637d2920e0419ef054dfc2a3004 Reviewed-on: https://chromium-review.googlesource.com/496128 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org> [modify] https://crrev.com/779a9fb081c3807d79756ac6443da40351a9f26e/authpolicy/policy/device_policy_encoder.cc [modify] https://crrev.com/779a9fb081c3807d79756ac6443da40351a9f26e/authpolicy/policy/preg_policy_encoder.cc [modify] https://crrev.com/779a9fb081c3807d79756ac6443da40351a9f26e/authpolicy/policy/policy_encoder_helper.h [modify] https://crrev.com/779a9fb081c3807d79756ac6443da40351a9f26e/authpolicy/policy/preg_policy_encoder_unittest.cc [modify] https://crrev.com/779a9fb081c3807d79756ac6443da40351a9f26e/authpolicy/authpolicy_unittest.cc [modify] https://crrev.com/779a9fb081c3807d79756ac6443da40351a9f26e/authpolicy/policy/user_policy_encoder.cc [modify] https://crrev.com/779a9fb081c3807d79756ac6443da40351a9f26e/authpolicy/policy/policy_encoder_helper.cc
,
May 13 2017
jamescook@, please try again. It should be fixed now.
,
May 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/1b1519df296c5a385d985a4e87c3a5e5ffa36c41 commit 1b1519df296c5a385d985a4e87c3a5e5ffa36c41 Author: Lutz Justen <ljusten@chromium.org> Date: Wed May 31 19:38:37 2017 authpolicy: Whitelist ASAN_OPTIONS and LSAN_OPTIONS Whitelists a few environment variables in process_executor that are required for testing. For instance, ASAN_OPTIONS contains a different log path. Without this, a sandboxed process tries to write to a location it does not have write permission. BUG= chromium:718182 TEST=Made sure asan logs fine now, ran tests. Change-Id: I9bbfcfef574109259262598de6af45cad3b26e8c Reviewed-on: https://chromium-review.googlesource.com/497389 Commit-Ready: Lutz Justen <ljusten@chromium.org> Tested-by: Lutz Justen <ljusten@chromium.org> Reviewed-by: Roman Sorokin <rsorokin@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/1b1519df296c5a385d985a4e87c3a5e5ffa36c41/authpolicy/process_executor.cc [modify] https://crrev.com/1b1519df296c5a385d985a4e87c3a5e5ffa36c41/authpolicy/process_executor_unittest.cc
,
Aug 1 2017
,
Aug 3 2017
Closing. Please reopen it if its not fixed. Thanks! |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by jen...@chromium.org
, May 3 2017