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

Issue 874761 link

Starred by 11 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

coreutils crashed many times during boot time

Project Member Reported by vovoy@chromium.org, Aug 16

Issue description

After system boot, there are more than 20 coreutils.*.core in /var/spool/crash.

Tested on Yorp R70-10962.0.0

Some system info:
==========================
CHROMEOS_RELEASE_DESCRIPTION=10962.0.0 (Official Build) dev-channel octopus-unibuild (yorp bip unprovisioned_phaser phaser phaser360 unprovisioned_fleex fleex grabbiter orbatrix unprovisioned_bobba bobba bobba360 sparky sparky360 unprovisioned_meep meep mimrock) test

Some gdb info of the coredump:
==========================
(gdb) info proc
exe = '/usr/bin/coreutils --coreutils-prog-shebang=head /usr/bin/head -1'
(gdb) bt full
#0  0x00007fcf94a789b7 in statfs64 () at ../sysdeps/unix/syscall-template.S:84
No locals.
#1  0x00007fcf9535c58b in verify_selinuxmnt (mnt=0x7fcf9536e10c "") at init.c:38
        sfbuf = {f_type = 140729558904110, f_bsize = 140729558904160, f_blocks = 140529528681816, f_bfree = 0, f_bavail = 4294967296, 
          f_files = 0, f_ffree = 140729559011944, f_fsid = {__val = {0, 32}}, f_namelen = 140529531815424, f_frsize = 0, f_flags = 24576, 
          f_spare = {24, 140529538452544, 140729558904224, 140529528144998}}
        rc = <optimized out>
#2  init_selinuxmnt () at init.c:94
        fp = <optimized out>
        len = <optimized out>
        buf = <optimized out>
        num = <optimized out>
        p = <optimized out>
#3  init_lib () at init.c:154
No locals.
#4  0x00007fcf9516feab in call_init (l=<optimized out>, argc=4, argv=0x7ffe275e2e48, env=0x7ffe275e2e70) at dl-init.c:72
        j = <optimized out>
        jm = <optimized out>
        addrs = <optimized out>
        init_array = <optimized out>
#5  0x00007fcf95160a08 in ?? ()
No symbol table info available.
#6  0x0000000000000001 in ?? ()
No symbol table info available.
#7  0x0000000000000004 in ?? ()
No symbol table info available.
#8  0x00007ffe275e2e48 in ?? ()
No symbol table info available.
#9  0x00007ffe275e2e70 in ?? ()
No symbol table info available.
#10 0x00007fcf95386148 in _r_debug ()
No symbol table info available.
#11 0x00007ffe275e2e30 in ?? ()
No symbol table info available.
#12 0x00007fcf9516ffcc in call_init (env=0x7ffe275e2e70, argv=0x7ffe275e2e48, argc=4, l=<optimized out>) at dl-init.c:30
No locals.
#13 _dl_init (main_map=0x7fcf95371670, argc=4, argv=0x7ffe275e2e48, env=0x7ffe275e2e70) at dl-init.c:120
        preinit_array = <optimized out>
        preinit_array_size = <optimized out>
        i = 2503415400
#14 0x0000000000000000 in ?? ()
No symbol table info available.


Part of /var/log/messages
==========================
2018-08-16T15:12:24.573621+08:00 WARNING crash_reporter[2666]: [user] Received crash notification for coreutils[2665] sig 31, user 0 (developer build - not testing - always dumping)
2018-08-16T15:12:24.574960+08:00 INFO crash_reporter[2666]: State of crashed process [2665]: S (sleeping)
2018-08-16T15:12:24.575308+08:00 INFO crash_reporter[2666]: Accessing crash dir '/var/spool/crash' via symlinked handle '/proc/self/fd/5'
2018-08-16T15:12:24.582926+08:00 INFO crash_reporter[2666]: Stored minidump to /var/spool/crash/coreutils.20180816.151224.2665.dmp
2018-08-16T15:12:24.583265+08:00 INFO crash_reporter[2666]: Leaving core file at /proc/self/fd/5/coreutils.20180816.151224.2665.core due to developer image

There are also some selinux error log
==========================
localhost /var/spool/crash # cat selinux_violation.20180816.151145.0.log
type=1400  avc:  denied  { use } for  pid=2259 comm="init" path="/dev/null" dev="devtmpfs" ino=11 scontext=u:r:init:s0 tcontext=u:r:cros_init:s0 tclass=fd permissive=0
localhost /var/spool/crash # cat selinux_violation.20180816.151145.0.meta
sig=461714ca-selinux-u:r:init:s0-u:r:cros_init:s0-use-init-
comm=init
scontext=u:r:init:s0
tcontext=u:r:cros_init:s0
exec_name=selinux-violation
ver=10962.0.0
payload=/var/spool/crash/selinux_violation.20180816.151145.0.log
payload_size=168
done=1


 
coreutils.20180816.151224.2665.core
412 KB Download
coreutils.20180816.151224.2665.dmp
21.5 KB Download
Cc: jorgelo@chromium.org
Cc: jclinton@chromium.org samanthamiller@chromium.org
the selinux violations are probably unrelated.  lets focus on the coreutils.

sig 31 is SIGSYS.  mosys has been having troubles recently.  if you add statfs64 to /usr/share/policy/mosys-seccomp.policy, do the crashes go away ?
I added "statfs: 1" and "fadvise64: 1" to /usr/share/policy/mosys-seccomp.policy and the coreutils crashes went away.
can you send a CL for that?
Owner: vovoy@chromium.org
Status: Assigned (was: Untriaged)
OK, thanks.
Cc: lhchavez@chromium.org
The issue on Yorp is fixed by adding statfs to seccomp policy
https://crrev.com/c/1178966

fadvise64 is also required to fix this issue on Soraka.
Project Member

Comment 8 by bugdroid1@chromium.org, Aug 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/mosys/+/4e4bc5bc913fc5658d17b1e4659fae0a75eec905

commit 4e4bc5bc913fc5658d17b1e4659fae0a75eec905
Author: Kuo-Hsin Yang <vovoy@chromium.org>
Date: Thu Aug 23 20:20:55 2018

mosys: fix Soraka seccomp error

Add fadvise64 to various platforms.

BUG= chromium:874761 
TEST=running mosys without crash

Change-Id: I8fb2e344fa897f133d06444325984237666cb0f7
Reviewed-on: https://chromium-review.googlesource.com/1179721
Commit-Ready: Vovo Yang <vovoy@chromium.org>
Tested-by: Vovo Yang <vovoy@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/4e4bc5bc913fc5658d17b1e4659fae0a75eec905/seccomp/mosys-seccomp-arm64.policy
[modify] https://crrev.com/4e4bc5bc913fc5658d17b1e4659fae0a75eec905/seccomp/mosys-seccomp-arm.policy
[modify] https://crrev.com/4e4bc5bc913fc5658d17b1e4659fae0a75eec905/seccomp/mosys-seccomp-amd64.policy

Fixed?
Status: Fixed (was: Assigned)
 Issue 876966  has been merged into this issue.

Sign in to add a comment