Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 330375 - sys-fs/lvm2-2.02.67-r2 breaks under kernel 2.6.32-hardened-r9
Summary: sys-fs/lvm2-2.02.67-r2 breaks under kernel 2.6.32-hardened-r9
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-29 15:30 UTC by Paul Dodd
Modified: 2010-08-03 18:01 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Dodd 2010-07-29 15:30:19 UTC
After updating sw & config files
   dev-python:setuptools-0.6.13
   sys-fs:cryptsetup-1.1.2
   sys-fs:lvm2-2.02.67-r2
   sys-fs:udev-151-r4
   sys-libs:cracklib-2.8.16
   sys-libs:timezone-data-2010j
the /etc/init.d/lvm script failed
with
   Setting up the Logical Volume Manager ...
   Failed to create notification semaphore: Function not implemented
   Unable to resume vg2-jail (254:0)
   :
   Failed to setup the LVM
   ERROR: LVM failed to start

As a workaround I masked sys-fs/lvm2-2.02.67-r2 in /etc/portage/package.mask/lvm2 and downgraded to sys-fs/lvm2-2.02.56-r2 .

sys-fs/lvm2-2.02.56-r2 works fine with kernel 2.6.28-hardened-r9.
Comment 1 Paul Dodd 2010-07-30 08:55:13 UTC
The problem was resolved by setting CONFIG_SYSVIPC=y in the kernel configuration with the menuconfig for kernel 2.6.32-hardened-r9 (in kernel 2.6.28-hardened-r9 CONFIG_SYSVIPC was not set.).

Changing /etc/lvm/lvm.conf to get more info:
<     verbose = 3
<     syslog = 0
<     file = "/lvm2.log"
<     level = 7
<     command_names = 1
<     activation = 1
produced
:
ioctl/libdm-iface.c:1888 lvchange  dm info  S7RSdRl0pzR3xkJF3i4hvvJQ65U0IioefEVf
MVCZBGABHPhoJm4o6JVgwkX4AUK2-cow OF   [16384]
ioctl/libdm-iface.c:1888 lvchange  dm info   (254:6) OF   [16384]
libdm-deptree.c:949 lvchange  Removing vg-opt (254:6)
libdm-common.c:1130 lvchange  Failed to create notification semaphore: Function
not implemented
libdm-common.c:1197 lvchange  <backtrace>
libdm-deptree.c:1165 lvchange  Unable to deactivate vg-opt (254:6)
:

libdm-common.c @ line 1110:
		if (base_cookie && (gen_semid = semget((key_t) gen_cookie,
				    1, 0600 | IPC_CREAT | IPC_EXCL)) < 0) {
seems to depend on SYSVIPC?

The documentation and ELOG make no mention of this.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-07-31 19:16:33 UTC
agk:
Is CONFIG_SYSVIPC required now? If so, I'll add in a check to the ebuild.
Can you add in a check/warning for it at runtime as well?
Comment 3 Alasdair Kergon 2010-07-31 19:24:38 UTC
The udev code requires semaphores...
Comment 4 Alasdair Kergon 2010-07-31 19:25:34 UTC
Peter - see comment #2
Comment 5 Peter Rajnoha 2010-08-03 08:22:36 UTC
(In reply to comment #2)
> Can you add in a check/warning for it at runtime as well?

OK, I've added the check. If there's no SYSVIPC/semaphore support and libdevmapper is configured with "--enable-udev_sync", a warning message is issued and the udev synchronisation code is automatically disabled in runtime.

http://sourceware.org/git/?p=lvm2.git;a=commit;h=d33d0b01bf102630b7e25fb4cab9ac3d9f3152fe
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-08-03 18:01:17 UTC
Warning added to all ebuilds >= 2.02.67. Thanks for the warning in LVM2 as well.