lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150502231828.GA25301@wfg-t540p.sh.intel.com>
Date:	Sun, 3 May 2015 07:18:28 +0800
From:	Fengguang Wu <fengguang.wu@...el.com>
To:	Iulia Manda <iulia.manda21@...il.com>
Cc:	fengguang.wu@...el.com, Josh Triplett <josh@...htriplett.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Memory Management List <linux-mm@...ck.org>,
	LKP <lkp@...org>, linux-kernel@...r.kernel.org
Subject: [CONFIG_MULTIUSER] init: error.c:320: Assertion failed in
 nih_error_get: CURRENT_CONTEXT->error != NULL

Hi Iulia,

FYI, there are Ubuntu init error messages when CONFIG_MULTIUSER=n.
Since it's not embedded system and hence the target user of
CONFIG_MULTIUSER=n, it might be fine..

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

commit 2813893f8b197a14f1e1ddb04d99bce46817c84a
Author:     Iulia Manda <iulia.manda21@...il.com>
AuthorDate: Wed Apr 15 16:16:41 2015 -0700
Commit:     Linus Torvalds <torvalds@...ux-foundation.org>
CommitDate: Wed Apr 15 16:35:22 2015 -0700

    kernel: conditionally support non-root users, groups and capabilities
    
    There are a lot of embedded systems that run most or all of their
    functionality in init, running as root:root.  For these systems,
    supporting multiple users is not necessary.
    
    This patch adds a new symbol, CONFIG_MULTIUSER, that makes support for
    non-root users, non-root groups, and capabilities optional.  It is enabled
    under CONFIG_EXPERT menu.
    
    When this symbol is not defined, UID and GID are zero in any possible case
    and processes always have all capabilities.
    
    The following syscalls are compiled out: setuid, setregid, setgid,
    setreuid, setresuid, getresuid, setresgid, getresgid, setgroups,
    getgroups, setfsuid, setfsgid, capget, capset.
    
    Also, groups.c is compiled out completely.
    
    In kernel/capability.c, capable function was moved in order to avoid
    adding two ifdef blocks.
    
    This change saves about 25 KB on a defconfig build.  The most minimal
    kernels have total text sizes in the high hundreds of kB rather than
    low MB.  (The 25k goes down a bit with allnoconfig, but not that much.
    
    The kernel was booted in Qemu.  All the common functionalities work.
    Adding users/groups is not possible, failing with -ENOSYS.
    
    Bloat-o-meter output:
    add/remove: 7/87 grow/shrink: 19/397 up/down: 1675/-26325 (-24650)
    
    [akpm@...ux-foundation.org: coding-style fixes]
    Signed-off-by: Iulia Manda <iulia.manda21@...il.com>
    Reviewed-by: Josh Triplett <josh@...htriplett.org>
    Acked-by: Geert Uytterhoeven <geert@...ux-m68k.org>
    Tested-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
    Reviewed-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
    Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>

+----------------------------------------+------------+------------+------------+
|                                        | c79574abe2 | 2813893f8b | 64fb1d0e97 |
+----------------------------------------+------------+------------+------------+
| boot_successes                         | 114        | 0          | 1          |
| boot_failures                          | 6          | 30         | 11         |
| Unexpected_close,not_stopping_watchdog | 5          | 2          |            |
| BUG:kernel_test_crashed                | 1          |            |            |
| Assertion_failed                       | 0          | 30         | 11         |
| Out_of_memory:Kill_process             | 0          | 5          | 1          |
| backtrace:vm_mmap_pgoff                | 0          | 2          | 1          |
| backtrace:SyS_mmap_pgoff               | 0          | 2          | 1          |
| backtrace:SyS_mmap                     | 0          | 2          | 1          |
| backtrace:do_sys_open                  | 0          | 1          |            |
| backtrace:SyS_open                     | 0          | 1          |            |
+----------------------------------------+------------+------------+------------+

mountall: Event failed
[    2.283321] init: Failed to create pty - disabling logging for job
[    2.284308] init: Temporary process spawn error: No space left on device
[    2.298763] init: error.c:320: Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL
[    2.300054] init: Caught abort, core dumped
[    2.300861] init: Error while reading from descriptor: Bad file descriptor
[    2.301510] init: mounted-tmp main process (129) terminated with status 6
mountall: Event failed
[    2.309699] init: error.c:320: Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL
[    2.310985] init: Caught abort, core dumped
[    2.315140] pt_chown (137) used greatest stack depth: 13152 bytes left
[    2.315795] init: error.c:320: Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL
[    2.317078] init: Caught abort, core dumped
[    2.317839] init: Error while reading from descriptor: Bad file descriptor
[    2.318457] init: Error while reading from descriptor: Bad file descriptor
[    2.319085] init: mounted-run main process (133) terminated with status 6
[    2.319979] init: container-detect pre-start process (136) terminated with status 6
mountall: Event failed
[    2.342582] init: error.c:320: Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL
[    2.344049] init: Caught abort, core dumped
[    2.348327] init: error.c:320: Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL
[    2.349951] init: Caught abort, core dumped
[    2.351178] init: procps (virtual-filesystems) main process (141) terminated with status 6
[    2.352579] init: upstart-udev-bridge main process (144) terminated with status 6
[    2.353511] init: upstart-udev-bridge main process ended, respawning
[    2.358992] init: error.c:320: Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL
[    2.360680] init: Caught abort, core dumped
[    2.362180] init: udev main process (147) terminated with status 6
[    2.362983] init: udev main process ended, respawning
[    2.368861] init: error.c:320: Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL
[    2.370628] init: Caught abort, core dumped
[    2.373263] init: Error while reading from descriptor: Bad file descriptor
[    2.374299] init: module-init-tools main process (150) terminated with status 6
[    2.385182] init: error.c:320: Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL
[    2.386982] init: Caught abort, core dumped
[    2.394122] init: error.c:320: Assertion failed in nih_error_get: CURRENT_CONTEXT->error != NULL
[    2.395884] init: Caught abort, core dumped
[    2.397272] init: plymouth-log main process (155) terminated with status 6
[    2.398418] init: flush-early-job-log main process (158) terminated with status 6

git bisect start 8608976e2bc9c1df090e1b346c65ec1405e9d03d v4.0 --
git bisect good d613896926be608796bb80454256a07b55fe0e87  # 09:07     30+      3  Merge tag 'upstream-4.1-rc1' of git://git.infradead.org/linux-ubifs
git bisect  bad 0e212e0a720601fabda102f7998d27625f9e144a  # 09:09      0-      1  checkpatch: don't ask for asm/file.h to linux/file.h unconditionally
git bisect  bad d38df34e3f0ea1e65c7db5d33d132dc14da0009a  # 09:12      0-     16  hwmon: (ina2xx) replace ina226_avg_bits() with find_closest()
git bisect  bad 34c9a0ffc75ad25b6a60f61e27c4a4b1189b8085  # 09:14      0-      2  crypto: fix broken crypto_register_instance() module handling
git bisect good 6d50ff91d9780263160262daeb6adfdda8ddbc6c  # 09:21     30+      1  Merge tag 'locks-v4.1-1' of git://git.samba.org/jlayton/linux
git bisect good e7c82412433a8039616c7314533a0a1c025d99bf  # 09:26     30+      2  Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
git bisect  bad eea3a00264cf243a28e4331566ce67b86059339d  # 09:28      0-     10  Merge branch 'akpm' (patches from Andrew)
git bisect good 248ca1b053c82fa22427d22b33ac51a24c88a86d  # 09:31     30+      0  zsmalloc: add fullness into stat
git bisect  bad 3ea8d440a86b85c63c2bb7f73988626e682db5f0  # 09:34      0-     30  lib/vsprintf.c: eliminate duplicate hex string array
git bisect good 160a117f0864871ae1bab26554a985a1d2861afd  # 09:39     30+      3  zsmalloc: remove extra cond_resched() in __zs_compact
git bisect  bad 96831c0a6738f88f89e7012f4df0a747514af0a0  # 09:41      0-      4  kernel/resource.c: remove deprecated __check_region() and friends
git bisect good 23f40a94d860449f39f00c3350bf850d15983e63  # 09:44     30+      3  include/linux: remove empty conditionals
git bisect good c79574abe2baddf569532e7e430e4977771dd25c  # 09:47     30+      2  lib/test-hexdump.c: fix initconst confusion
git bisect  bad 2813893f8b197a14f1e1ddb04d99bce46817c84a  # 09:50      0-      4  kernel: conditionally support non-root users, groups and capabilities
# first bad commit: [2813893f8b197a14f1e1ddb04d99bce46817c84a] kernel: conditionally support non-root users, groups and capabilities
git bisect good c79574abe2baddf569532e7e430e4977771dd25c  # 09:52     90+      6  lib/test-hexdump.c: fix initconst confusion
# extra tests on HEAD of linus/master
git bisect  bad 64fb1d0e975e92e012802d371e417266d6531676  # 09:52      0-     11  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
# extra tests on tree/branch linus/master
git bisect  bad 64887b6882de36069c18ef2d9623484d6db7cd3a  # 09:54      0-      6  Merge branch 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
# extra tests on tree/branch linus/master
git bisect  bad 64887b6882de36069c18ef2d9623484d6db7cd3a  # 09:54      0-      6  Merge branch 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
# extra tests on tree/branch next/master
git bisect  bad ba5ed02bec86490224b8d162ef1911869516d51e  # 09:57      0-     16  Add linux-next specific files for 20150501


This script may reproduce the error.

----------------------------------------------------------------------------
#!/bin/bash

kernel=$1
initrd=quantal-core-x86_64.cgz

wget --no-clobber https://github.com/fengguang/reproduce-kernel-bug/raw/master/initrd/$initrd

kvm=(
	qemu-system-x86_64
	-enable-kvm
	-cpu kvm64
	-kernel $kernel
	-initrd $initrd
	-m 300
	-smp 2
	-device e1000,netdev=net0
	-netdev user,id=net0
	-boot order=nc
	-no-reboot
	-watchdog i6300esb
	-rtc base=localtime
	-serial stdio
	-display none
	-monitor null 
)

append=(
	hung_task_panic=1
	earlyprintk=ttyS0,115200
	rd.udev.log-priority=err
	systemd.log_target=journal
	systemd.log_level=warning
	debug
	apic=debug
	sysrq_always_enabled
	rcupdate.rcu_cpu_stall_timeout=100
	panic=-1
	softlockup_panic=1
	nmi_watchdog=panic
	oops=panic
	load_ramdisk=2
	prompt_ramdisk=0
	console=ttyS0,115200
	console=tty0
	vga=normal
	root=/dev/ram0
	rw
	drbd.minor_count=8
)

"${kvm[@]}" --append "${append[*]}"
----------------------------------------------------------------------------

Thanks,
Fengguang

View attachment "dmesg-quantal-ivb41-35:20150502095005:x86_64-randconfig-ib0-04200039:4.0.0-05819-g2813893:16" of type "text/plain" (79590 bytes)

View attachment "config-4.0.0-05819-g2813893" of type "text/plain" (63589 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ