Bug 1359352 - Kernel not configured for semaphores (System V IPC). Not using udev synchronisation code.
Summary: Kernel not configured for semaphores (System V IPC). Not using udev synchroni...
Keywords:
Status: CLOSED DUPLICATE of bug 1385432
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 24
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Peter Rajnoha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-23 03:15 UTC by Joseph D. Wagner
Modified: 2017-09-22 12:55 UTC (History)
42 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-25 11:05:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Joseph D. Wagner 2016-07-23 03:15:35 UTC
Error message on shutdown.  "Kernel not configured for semaphores (System V IPC). Not using udev synchronisation code."

It's causing a problem with cleanly unmounting the file systems.

Per lvm, either System V IPC should be added in the kernel or that libdevmapper should be compiled without udev_sync.

See: https://www.redhat.com/archives/lvm-devel/2010-August/msg00011.html

Comment 1 Mike 2016-09-24 16:34:42 UTC
I am seeing the same problem on my Lenovo V570 laptop.  The system will hang with the above listed error message indefinitely.  There is no response to keyboard input.  The only thing I can do from that point is to press and hold the power switch until the machine physically powers off.  Let me know what other information you need and I will be happy to get it.

Mike

Comment 2 Mike 2016-09-24 17:00:43 UTC
Here is a journalctl -r from one of the reboots:

-- Reboot --
Sep 24 12:51:29 CloudMaster systemd[1671]: Received SIGRTMIN+24 from PID 2587 (kill).
Sep 24 12:51:29 CloudMaster systemd[1671]: Starting Exit the Session...
Sep 24 12:51:29 CloudMaster systemd[1671]: Reached target Shutdown.
Sep 24 12:51:29 CloudMaster systemd[1671]: Closed D-Bus User Message Bus Socket.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped target Sockets.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped target Timers.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped target Paths.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped target Basic System.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped D-Bus User Message Bus.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped Evolution address book service.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped Evolution calendar service.
Sep 24 12:51:29 CloudMaster systemd[1679]: pam_unix(systemd-user:session): session closed for user mike
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped Accessibility services bus.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped GNOME Terminal Server.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped Virtual filesystem service.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped Virtual filesystem service - Apple File Conduit monitor.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped Evolution source registry.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped Virtual filesystem service - Media Transfer Protocol monitor.
Sep 24 12:51:29 CloudMaster org.freedesktop.Tracker1[1700]: OK
Sep 24 12:51:29 CloudMaster org.freedesktop.Tracker1[1700]: Received signal:15->'Terminated'
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped Virtual filesystem service - digital camera monitor.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped Virtual filesystem metadata service.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped Virtual filesystem service - GNOME Online Accounts monitor.
Sep 24 12:51:29 CloudMaster systemd[1671]: Stopped Virtual filesystem service - disk device monitor.

Comment 3 Alexey Vasyunin 2016-10-06 15:44:32 UTC
I have the same problem on S1200V3RPL motherboard

Comment 4 Mike 2016-10-06 20:31:36 UTC
Same issue. I'm on a Microsoft Surface 3. The problem seemed to show up after I installed VirtualBox and it's required packages, but that might just have been coincidental.

Comment 5 Dimitar Georgievski 2016-10-23 02:50:53 UTC
Same issue. OS X El Capitan ver 10.11.3 MacBook Pro.

The issue appeared after installing Guest AddOns for VirtualBox 5.0.24 r108355

uname -r
4.7.9-200.fc24.x86_64

Comment 6 Guillaume Kulakowski 2016-10-25 07:40:26 UTC
Same issue On 4.8 / Fedora 25 / Dell XPS / i915.

Comment 7 Gerardo Rosales 2016-10-29 13:25:57 UTC
Same here, Fedora 25 Beta (Plasma DE).

uname -r: 4.8.4-301.fc25.x86_64

Comment 8 Gerardo Rosales 2016-10-29 13:31:14 UTC
Sorry for double post, forgot to specify my machine which is a Lenovo Thinkpad X201.

Comment 9 lumo12@vtxmail.ch 2016-11-06 10:48:44 UTC
Same issue on Lenovo Thinkpad X201, previous kernel worked fine

Comment 10 lumo12@vtxmail.ch 2016-11-06 10:51:01 UTC
4.8.4-200.fc24.x86_64

Comment 11 MARIA 2016-11-11 10:27:59 UTC
same issue same kernel with fedora 24...also when the computer starts i see this message [failed to find cpu0 device node]...my computer seems to work fine but is it ok to ignore these messages?(In reply to lumo12 from comment #10)
> 4.8.4-200.fc24.x86_64

Comment 12 Alasdair Kergon 2016-11-19 23:55:58 UTC
Check the facts first.
Does the kernel contain system V IPC?
Is it configured and available to be used?
- If not, why not, and can it be enabled?
- If so, is the problem exclusive to something happening in the shutdown sequence?
- Is the test for its presence working correctly?

For example, run the command 'ipcs -l' and check it gives you useful limits.

Comment 13 Joseph D. Wagner 2016-11-20 00:35:58 UTC
My system:

# ipcs -l

------ Messages Limits --------
max queues system wide = 32000
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 18014398509465599
max total shared memory (kbytes) = 18014398442373116
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 32000
max semaphores per array = 32000
max semaphores system wide = 1024000000
max ops per semop call = 500
semaphore max value = 32767

Comment 14 Alasdair Kergon 2016-11-20 00:53:04 UTC
So the semaphores are there, suggesting this is something specific to the shutdown sequence.  I'm not up-to-date with exactly how systemd now does shutdown, but I'll ask Peter to look at it.  (Is it switching to a simpler environment that has these things missing but doesn't know to avoid using the features?)

By the way, the bug was missed because device-mapper (the fedora package, not the kernel functionality itself) is obsolete - orphaned.  It is now a sub-package of lvm2, and although I removed the bugzilla component when we did that, some fedora system has put it back!

Comment 15 robert.shteynfeld 2016-11-20 00:58:45 UTC
This is probably the same as bug 1379044 which is a selinux issue.

Comment 16 Alasdair Kergon 2016-11-20 01:02:00 UTC
But are there selinux error messages?

Comment 17 Joseph D. Wagner 2016-11-20 01:49:14 UTC
Yes, but the selinux error messages are too late to be written to audit.log.  Below are what I believed to be the most relevant messages in the order they appeared.

1) process xxxx (plymouthd) has been marked to be excluded from killing. it is running from the root file system, and thus likely to block re-mounting of the root file system to read-only. please consider moving it into an initrd file system instead.

2) Appears a bunch of times with different directories:
mount /oldsys/xxxxxx filesystem mounted, but mount(8) failed: permission denied.

3) avc denied umount utab tmpfs

4) avc denied ipc_info dmsetup

5) Kernel not configured for semaphores (System V IPC). Not using udev synchronisation code.

In comment 1 I has hoped to provide the exact location in code that error message 5 was occurring, in the hope that it would expedite the diagnosis and repair. Sorry if that didn't turn out.

Comment 18 MARIA 2016-11-20 13:21:16 UTC
(In reply to MARIA from comment #11)
> same issue same kernel with fedora 24...also when the computer starts i see
> this message [failed to find cpu0 device node]...my computer seems to work
> fine but is it ok to ignore these messages?(In reply to lumo12
> from comment #10)
> > 4.8.4-200.fc24.x86_64

i see this error when i shut down the system after the grey screen with fedora's icon 'Can't find root filesystem / error mounting /dev/root'  and also this 'Kernel not configured for semaphores (System V IPC). Not using udev synchronisation code'...i didn't find any solution yet...

Comment 19 Peter Rajnoha 2016-11-25 11:05:58 UTC
There was a change in how SELinux is set for dracut environment (including the one at shutdown). This problem is now tracked by bug #1385432 where a change in SELinux policy was identified to cause this. It's also causing denials for umount (as already pointed out in comment #17 and in bug #1385432 too) and other SELinux-related problems during dracut stage at shutdown.

*** This bug has been marked as a duplicate of bug 1385432 ***

Comment 20 Jack Howarth 2016-12-05 23:26:19 UTC
Observed the same bug with current Fedora 25 x86_64 rebooting on a MacBook Pro 2,1.

Comment 21 Gerardo Rosales 2016-12-27 13:00:55 UTC
Hi guys, happy holidays.

Still having this issue. 

- Fedora 25 (XFCE) 
- kernel 4.8.15-300.fc25.x86_64
- Thinkpad x201

Comment 22 mtk 2017-05-26 14:00:30 UTC
Can reproduce, encrypted LVM.

Linux 4.10.17-200.fc25.x86_64
Fedora 25 (XFCE)

Comment 23 cmdmss 2017-06-02 01:22:21 UTC
Same problem here... 

HP 820 Model
4.10.13-200.fc25.x86_64

Looking forward to this solution... those messages are really annoying.

Thanks.

Comment 24 Alexander Korsunsky 2017-06-14 12:01:01 UTC
This is not a duplicate of bug 1385432. 

bug 1385432 has been supposedly closed and fixed with selinux-policy-3.13.1-225.18.fc25, but even after I install it and autorelabel and regenerate my initramfs, the errors still happen. Should I open a new bug?

Comment 25 matejmartinovic 2017-08-06 18:07:23 UTC
Same issue on Fedora 26 with Ryzen CPU on a x370 board. 
LVM
4.11.11-300.fc26.x86_64

Comment 26 Levente Farkas 2017-08-23 08:07:06 UTC
same problem on rhel/centos-7 on advantech ark-1123h-u0a1e while reboot working on rhel/centos-6. but neither:
- rhel/centos-7
- fedora-25/26
- ubuntu-1704

it seems to me a regression, but why fedora not working?

Comment 27 Peter Rajnoha 2017-08-24 06:53:57 UTC
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Please, anyone who is still observing this problem, please, try disabling selinux temporarily by adding "selinux=0" to kernel command line and see if the problem still appears.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Comment 28 switcher 2017-08-26 16:59:28 UTC
Peter,
I did as you requested and added "selinux=0" to kernel command line.
After booting into the KDE Gui desktop:

I did a reboot and did NOT (NOT) get the error below that I have been getting every time I reboot or shutdown. 

error message with selinux ENABLED when rebooting or shutting down:

"command failed
Kernel not configured for semaphores (System V IPC). Not using udev synchronisation code.
device-mapper: remove ioctl on fedora_fedora--25-root failed: Device or resource busy
command failed"

[Note:  the 4 lines above repeat for more than 1 full screen.  Last line to display before reboot is below]

"Failed to read reboot parameter file: no such file or directory
Rebooting."

So, can we now conclude that selinux is behind the reboot/shutdown semaphores messages??

I am on Fedora 25 using the following kernels which all display the reboot semaphore messages:
4.12.8-200.fc25.x86_64 (server edition)
4.11.12-200.fc25.x86_64  (server edition)
4.11.11-200.fc25.x86_64  (server edition)
My hardware is an intel NUC7i5.

Comment 29 switcher 2017-08-26 17:08:08 UTC
Forgot to mention, I am using raid1, LVM, but no encryption.

I do not know if they are related, but I get 1000's of selinux error messages for the unix_chkpwd being blocked from dac_read_search.  I did the full auditing as requested in the selinux error message below, and the audit never revealed a PATH record.

selinux error:

SELinux is preventing unix_chkpwd from using the dac_read_search capability.

*****  Plugin dac_override (91.4 confidence) suggests   **********************

If you want to help identify if domain needs this access or you have a file with the wrong permissions on your system
Then turn on full auditing to get path information about the offending file and generate the error again.
Do

Turn on full auditing
# auditctl -w /etc/shadow -p w
Try to recreate AVC. Then execute
# ausearch -m avc -ts recent
If you see PATH record check ownership/permissions on file, and fix it,
otherwise report as a bugzilla.

Comment 30 Peter Rajnoha 2017-09-22 12:55:07 UTC
The message:

  "Kernel not configured for semaphores (System V IPC). Not using udev synchronisation code" 

comes from libdm that is used by dmsetup and which in turn is used by dracut's device-mapper module (/usr/lib/dracut/modules.d/90dm/dm-shutdown.sh) where dracut calls "dmsetup remove" to remove all remaining device-mapper-based devices.

I've managed to reproduce and also, I've added more debug messages (the errno) that the libdm code receives when it tries to check whether semaphores are supported, it uses this call:

  semctl(0, 0, SEM_INFO, arg)

The semctl fails, the errno message says:

  Permission denied


WHEN I DISABLE SELINUX, I DON'T HIT THIS PROBLEM. So this is actually a problem with default selinux configuration.


The part of the shutdown log exactly:
...
[   28.311311] dracut Warning: Unmounted /oldroot.
[   28.343303] dracut: Disassembling device-mapper devices
_check_semaphore_is_supported: SEM_INFO failed: Permission denied
Kernel not configured for semaphores (System V IPC). Not using udev synchronisation code.
Powering off.
...


The patch I used to get the errno:

      1 diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
      2 index e983b0392..e11d8f864 100644
      3 --- a/libdm/libdm-common.c
      4 +++ b/libdm/libdm-common.c
      5 @@ -2150,6 +2150,7 @@ static int _check_semaphore_is_supported(void)
      6         maxid = semctl(0, 0, SEM_INFO, arg);
      7  
      8         if (maxid < 0) {
      9 +               log_sys_error("SEM_INFO", "_check_semaphore_is_supported");
     10                 log_warn("Kernel not configured for semaphores (System V IPC). "
     11                          "Not using udev synchronisation code.");
     12                 return 0;


Note You need to log in before you can comment on or make changes to this bug.