New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 612507 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 0
Type: Bug

Blocking:
issue 612473



Sign in to add a comment

sandbox_linux_unittests are broken in the official build

Project Member Reported by krasin@chromium.org, May 17 2016

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.
 

Comment 1 by krasin@chromium.org, May 17 2016

Blocking: 612473
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Comment 3 by tfiga@chromium.org, May 19 2016

Issue 613070 has been merged into this issue.

Comment 4 by tfiga@chromium.org, 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.

Comment 5 by tfiga@chromium.org, May 19 2016

The same seems to be happening on multiple ChromeOS builds.

Comment 6 by krasin@chromium.org, May 19 2016

Labels: -Pri-2 Pri-1
Labels: -Pri-1 Pri-0
Status: Assigned (was: Untriaged)
Able to repro.
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.

Comment 10 by ihf@chromium.org, May 19 2016

Cc: steve...@chromium.org
Steven, any chance this got cleaned up recently?
Cc: jln@chromium.org
Owner: mdempsky@chromium.org
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.
mdempsky@ can you please check in that CL on ToT asap?
Project Member

Comment 14 by bugdroid1@chromium.org, 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

Status: Fixed (was: Assigned)
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!
Probably caused by https://codereview.chromium.org/1982123002/

Thanks for fixing!

Sign in to add a comment