sandbox_linux_unittests are broken in the official build |
|||||||
Issue description
Version: tip
OS: Linux
What steps will reproduce the problem?
(1) Build sandbox_linux_unittests in the official mode:
$ gn gen out/gn-off '--args=is_chrome_branded=true is_official_build=true is_debug=false' --check
$ ninja -C out/gn-off sandbox_linux_unittests
(2) Run sandbox_linux_unittests:
$ ./out/gn-off/sandbox_linux_unittests
...
4 tests failed:
BrokerFilePermission.CreateBad (../../sandbox/linux/syscall_broker/broker_file_permission_unittest.cc:52)
BrokerFilePermission.CreateBadEmpty (../../sandbox/linux/syscall_broker/broker_file_permission_unittest.cc:76)
BrokerFilePermission.CreateBadNotAbs (../../sandbox/linux/syscall_broker/broker_file_permission_unittest.cc:68)
BrokerFilePermission.CreateBadRecursive (../../sandbox/linux/syscall_broker/broker_file_permission_unittest.cc:60)
Looking closer at one of the failures:
$ ./out/gn-off/sandbox_linux_unittests --gtest_filter=BrokerFilePermission.CreateBad
IMPORTANT DEBUGGING NOTE: batches of tests are run inside their
own process. For debugging a test inside a debugger, use the
--gtest_filter=<your_test_name> flag along with
--single-process-tests.
Using sharding settings from environment. This is shard 0/1
Using 1 parallel jobs.
Note: Google Test filter = BrokerFilePermission.CreateBad
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from BrokerFilePermission
[ RUN ] BrokerFilePermission.CreateBad
../../sandbox/linux/tests/unit_tests.cc:300: Failure
Value of: subprocess_exited_without_matching_message
Actual: true
Expected: false
Actual test failure: Received signal 4 ILL_ILLOPN 0000004713e5
#0 0x0000004ea6d7 (/usr/local/google/home/krasin/chr22/src/out/gn-off/sandbox_linux_unittests+0x4ea6d6)
r8: 000002e0eac32048 r9: 0000000000000000 r10: 0000000000000008 r11: 0000000000000246
r12: 0000000000000000 r13: 00007ffc6b59f900 r14: 0000000000000000 r15: 0000000000000001
di: 000002e0eac32000 si: 00007ffc6b59f76f bp: 0000000000000000 bx: 00007ffc6b59f820
dx: 000002e0eac32030 ax: 000000000000002f cx: 0000000000000009 sp: 00007ffc6b59f7c0
ip: 00000000004713e5 efl: 0000000000010246 cgf: 0000000000000033 erf: 0000000000000000
trp: 0000000000000006 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
[ FAILED ] BrokerFilePermission.CreateBad (2 ms)
[----------] 1 test from BrokerFilePermission (2 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (2 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] BrokerFilePermission.CreateBad
1 FAILED TEST
[1/1] BrokerFilePermission.CreateBad (2 ms)
1 test failed:
BrokerFilePermission.CreateBad (../../sandbox/linux/syscall_broker/broker_file_permission_unittest.cc:52)
This failure only happens in the official mode. Please, take a look.
Note: the failure seems somewhat similar to https://crbug.com/612503 , but it seems to be a distinct issue.
,
May 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f7e3c42cc1d32437f3a9e7d0c9f5adecf92b43a5 commit f7e3c42cc1d32437f3a9e7d0c9f5adecf92b43a5 Author: krasin <krasin@google.com> Date: Tue May 17 20:06:59 2016 Disable broken tests on 'LTO Linux' buildbot. These breakages are not related to LTO, and only happen in the official mode. All of them are reported, and the tests will be reenabled after they are fixed. BUG= 612473 ,612496, 612503 , 612507 Review-Url: https://codereview.chromium.org/1985123002 Cr-Commit-Position: refs/heads/master@{#394201} [modify] https://crrev.com/f7e3c42cc1d32437f3a9e7d0c9f5adecf92b43a5/testing/buildbot/chromium.fyi.json
,
May 19 2016
Issue 613070 has been merged into this issue.
,
May 19 2016
Issue 613049 has been merged into this issue. Issue 613051 has been merged into this issue. Issue 613065 has been merged into this issue. Issue 613067 has been merged into this issue. Issue 613068 has been merged into this issue. Issue 613074 has been merged into this issue. Issue 613075 has been merged into this issue.
,
May 19 2016
The same seems to be happening on multiple ChromeOS builds.
,
May 19 2016
,
May 19 2016
,
May 19 2016
Able to repro.
,
May 19 2016
Did official builds change so that
CHECK(foo) << bar;
no longer prints bar if !foo?
The ILL_ILLOPN failure is because we're hitting a ud2 instruction in sandbox::syscall_broker::BrokerFilePermission's constructor, which appear to match up with the CHECKs in there: https://code.google.com/p/chromium/codesearch#chromium/src/sandbox/linux/syscall_broker/broker_file_permission.cc&rcl=1463656661&l=225
The tests are failing because they're intentionally creating bad BrokerFilePermission objects in a child process and expecting to see failure messages.
,
May 19 2016
Steven, any chance this got cleaned up recently?
,
May 19 2016
Oh, actually we have code to check for SIGABRT in official builds, whereas now we're seeing SIGILL. Maybe a GCC vs Clang difference? Either way, I think I have a quick fix for now.
,
May 19 2016
So this looks like the same failure that is currently affecting the Chrome OS PFQ, e.g. starting at this build: https://uberchromegw.corp.google.com/i/chromeos.chrome/builders/tricky-tot-chrome-pfq-informational/builds/781 This failure output: https://pantheon.corp.google.com/storage/browser/chromeos-image-archive/tricky-tot-chrome-pfq-informational/R52-8334.0.0-b781/vm_test_results_1/test_harness/all/SimpleTestVerify/1_autotest_tests/results-17-security_SandboxLinuxUnittests/security_SandboxLinuxUnittests/debug/?pli=1
,
May 19 2016
mdempsky@ can you please check in that CL on ToT asap?
,
May 19 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c13ff44abef008d4117b54d01ebf4912275c5fc6 commit c13ff44abef008d4117b54d01ebf4912275c5fc6 Author: mdempsky <mdempsky@chromium.org> Date: Thu May 19 21:17:43 2016 sandbox: fix DeathMessage tests in official builds It seems that official builds now use the "ud2" instruction to handle CHECK failures, which causes the process to exit due to SIGILL instead of SIGABRT. Unclear at the moment exactly why (maybe a toolchain change?), but easy to workaround for now. TBR=jln@chromium.org BUG= 612507 Review-Url: https://codereview.chromium.org/1994303002 Cr-Commit-Position: refs/heads/master@{#394867} [modify] https://crrev.com/c13ff44abef008d4117b54d01ebf4912275c5fc6/sandbox/linux/tests/unit_tests.cc
,
May 21 2016
Buildbots say it's fixed: https://build.chromium.org/p/chromium.fyi/builders/LTO%20Linux/builds/518/steps/sandbox_linux_unittests Thank you for working on this!
,
May 22 2016
Probably caused by https://codereview.chromium.org/1982123002/ Thanks for fixing! |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by krasin@chromium.org
, May 17 2016