Re: Issue 532180 in chromium: nacl_loader_unittests is broken

1 view
Skip to first unread message

chro...@googlecode.com

unread,
Sep 15, 2015, 6:11:00 PM9/15/15
to chromi...@chromium.org
Updates:
Status: Started
Owner: mdemp...@chromium.org
Cc: ric...@chromium.org

Comment #1 on issue 532180 by mdemp...@chromium.org: nacl_loader_unittests
is broken
https://code.google.com/p/chromium/issues/detail?id=532180

Hm, it passes on my Linux x86-64 machine at bdf9eb3c:

mdempsky@mdempsky-z620:~/crwd/src$ ./out/Release/nacl_loader_unittests
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 32 parallel jobs.
[1/344] NaClValidationQueryTest.InconsistentShortBug1 (0 ms)
[...]
[344/344] NaClValidationQueryTest.ConsistentShortBug (0 ms)
SUCCESS: all tests passed.
Tests took 1 seconds.

(Notably, you need to use the GYP build still, because the GN build of
nacl_loader_unittests is missing the NonSfi tests.)

Are you using any special GYP_DEFINES? Above was with
just "component=shared_library use_goma=1".

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Sep 15, 2015, 9:09:03 PM9/15/15
to chromi...@chromium.org

Comment #5 on issue 532180 by kra...@chromium.org: nacl_loader_unittests is
broken
https://code.google.com/p/chromium/issues/detail?id=532180

And the test passes with GYP_DEFINES='component=shared_library'.
This actually explains why it's CFI buildbot which complained: it builds a
mostly-static build of Chrome.

chro...@googlecode.com

unread,
Sep 15, 2015, 11:07:10 PM9/15/15
to chromi...@chromium.org

Comment #6 on issue 532180 by ric...@chromium.org: nacl_loader_unittests is
broken
https://code.google.com/p/chromium/issues/detail?id=532180

This seems to also require a release build. It looks like the new sigreturn
function breaks libgcc's stack unwinding :-(

(gdb) set follow-fork-mode child
(gdb) r
Starting program:
/usr/local/google/home/rickyz/chromium2/src/out/Release/nacl_loader_unittests
--gtest_filter=NaClNonSfiSandboxSIGSYSTest._sysctl
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/grte/v4/lib64/libthread_db.so.1".
Unable to determine compiler version.
Defaulting to gdb's copy of None libstdc++ pretty-printers.
Debugger detected, switching to single process mode.
Pass --test-launcher-debug-launcher to debug the launcher itself.
Detected presence of a debugger, running without test timeouts.
Note: Google Test filter = NaClNonSfiSandboxSIGSYSTest._sysctl
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from NaClNonSfiSandboxSIGSYSTest
[ RUN ] NaClNonSfiSandboxSIGSYSTest._sysctl
[New process 10877]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/grte/v4/lib64/libthread_db.so.1".

Program received signal SIGSYS, Bad system call.
[Switching to Thread 0x7ffff7fcd780 (LWP 10877)]
syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
38 ../sysdeps/unix/sysv/linux/x86_64/syscall.S: No such file or
directory.
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000563f03 in
sandbox::CrashSIGSYS_Handler(sandbox::arch_seccomp_data const&, void*) ()
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
uw_frame_state_for (context=context@entry=0x7fffffffbb50,
fs=fs@entry=0x7fffffffbc40) at ../../../src/libgcc/unwind-dw2.c:1253
1253 ../../../src/libgcc/unwind-dw2.c: No such file or directory.
(gdb)

On solution might be to obtain glibc's signal restorer function using
something like:

struct sigaction act = {};
struct sigaction old_act;
act.sa_handler = SIG_DFL;
sigaction(SIGUSR1, &act, &old_act);
sigaction(SIGUSR1, &old_act, &act);
printf("restorer = %p\n", act.sa_restorer);

But still need to double check whether this is allowed use of libc our case.

This seems like it could affect crash reporting on seccomp failures on
release builds, btw.

chro...@googlecode.com

unread,
Sep 16, 2015, 3:09:01 PM9/16/15
to chromi...@chromium.org

Comment #8 on issue 532180 by mdemp...@chromium.org: nacl_loader_unittests
is broken
https://code.google.com/p/chromium/issues/detail?id=532180

I can repro now.

chro...@googlecode.com

unread,
Sep 22, 2015, 2:42:25 AM9/22/15
to chromi...@chromium.org
Updates:
Owner: ric...@chromium.org

Comment #14 on issue 532180 by mdemp...@chromium.org: nacl_loader_unittests
is broken
https://code.google.com/p/chromium/issues/detail?id=532180

krasin: I don't think we need any more information. We understand the
failure (our custom restorer functions are missing the DWARF unwinding
information expected by glibc), just the best way to fix that wasn't clear.

Reassigning to rickyz@ for now since I think he has a plan for how to
proceed.
Reply all
Reply to author
Forward
0 new messages