Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 451452 - sys-fs/lvm2-2.02.97-r1 - Errors on LV create/delete operations in systemd-196 environment.
Summary: sys-fs/lvm2-2.02.97-r1 - Errors on LV create/delete operations in systemd-196...
Status: RESOLVED DUPLICATE of bug 453594
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-11 20:16 UTC by Pavel Volkov
Modified: 2013-07-28 10:05 UTC (History)
5 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 Pavel Volkov 2013-01-11 20:16:50 UTC
Error messages pop up on lvcreate/lvremove.
I'm on ~amd64. Software versions:
sys-fs/2.02.97-r1
sys-apps/systemd-196
0.11.8

These errors only happen if I boot into systemd. No troubles with openrc.
If LVs are already created, I have no problems mounting them.

Reproducible: Always

Steps to Reproduce:
1. # pvcreate /dev/sda4
  Physical volume "/dev/sda4" successfully created

2. # vgcreate xard /dev/sda4
  Volume group "xard" successfully created

3a. # lvcreate -L5G -nmio xard
  /dev/xard/mio: not found: device not cleared
  Aborting. Failed to wipe start of new LV.
  device-mapper: remove ioctl on  failed: Device or resource busy
  semid 3866624: semop failed for cookie 0xd4d80df: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223183071 (0xd4d80df) to initialize waiting for incoming notifications.

LV is not create in the end. If I use "-Z n" switch, it's created, but errors still remain:

3b. # lvcreate -Z n -L5G -nmio xard
  WARNING: "mio" not zeroed
  Logical volume "mio" created
  semid 4161536: semop failed for cookie 0xd4d8c1f: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223185951 (0xd4d8c1f) to initialize waiting for incoming notifications.

4. Errors also appear if I do lvremove after step 3b, but the volume is still removed from /dev.
# lvremove /dev/xard/mio 
Do you really want to remove active logical volume mio? [y/n]: y
  Logical volume "mio" successfully removed
  semid 4456448: semop failed for cookie 0xd4d5ab0: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223173296 (0xd4d5ab0) to initialize waiting for incoming notifications.




# emerge --info
Portage 2.2.0_alpha151 (default/linux/amd64/10.0/desktop/kde, gcc-4.6.3, glibc-2.16.0, 3.7.0-gentoomelf x86_64)
=================================================================
System uname: Linux-3.7.0-gentoomelf-x86_64-Intel-R-_Core-TM-_i5-2400_CPU_@_3.10GHz-with-gentoo-2.2
Timestamp of tree: Fri, 11 Jan 2013 12:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p42
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo systemd custom
Installed sets: @fonts, @kde, @vim
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE NVIDIA skype-4.0.0.7-copyright MPEG-4 myspell-ru_RU-ALexanderLebedev grass-ipafonts freedist fairuse free-noncomm MSttfEULA vim.org as-is NEWLIB LIBGLOSS"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -mtune=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native -mtune=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ http://trumpetti.atm.tut.fi/gentoo/"
LANG="ru_RU.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--ipv4"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/systemd /usr/local/portage"
SYNC="rsync://mirror.yandex.ru/gentoo-portage/"
USE="X a52 aac acl acpi alsa amd64 anthy bash-completion bluetooth branding bzip2 cairo cdda cdr cjk cli consolekit cracklib crypt cups cxx dbus declarative directfb djvu dri dts dvd dvdr embedded emboss encode exif fam fbcon ffmpeg firefox flac fortran gdbm gif gpm gstreamer gtk iconv icu idn ipv6 jpeg kde kipi lame lcms libcaca libnotify lm_sensors mad matroska mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf perl phonon plasma png policykit ppds pppd python qt3support qt4 raw readline samba sdl semantic-desktop session spell sse sse2 ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vdpau vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB ru ja" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="genesys" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 Pavel Volkov 2013-01-11 20:17:42 UTC
"0.11.8" in my previous post related to openrc.
Comment 2 Alexander Tsoy 2013-01-18 09:42:32 UTC
Looks very similar to an old kernel bug. See this links:
https://bugzilla.redhat.com/show_bug.cgi?id=727925
https://code.google.com/p/chromium/issues/detail?id=92762
https://lkml.org/lkml/2011/8/18/112

Paul, can you test this with kernel 3.6.x?
Comment 3 Pavel Volkov 2013-01-18 15:12:01 UTC
I downgraded to gentoo-sources 3.6.11 and still had the same error.
I currently run kernel 3.7.3.

A little more verbose output:

# lvcreate -vv -L5G -nmio xes
      Setting activation/monitoring to 1
      Setting global/locking_type to 1
      Setting global/wait_for_locks to 1
      File-based locking selected.
      Setting global/locking_dir to /run/lock/lvm
      Setting global/prioritise_write_locks to 1
      Getting target version for linear
      Found linear target v1.1.0.
      Getting target version for striped
      Found striped target v1.5.0.
    Setting logging type to disk
      Setting activation/mirror_region_size to 512
    Finding volume group "xes"
      Locking /run/lock/lvm/V_xes WB
      /dev/sda: size is 125045424 sectors
      /dev/sda1: size is 67584 sectors
      /dev/sda1: size is 67584 sectors
      /dev/sda1: No label detected
      /dev/sda2: size is 346112 sectors
      /dev/sda2: size is 346112 sectors
      /dev/sda2: No label detected
      /dev/sda3: size is 31457280 sectors
      /dev/sda3: size is 31457280 sectors
      /dev/sda3: No label detected
      /dev/sda4: size is 93171712 sectors
      /dev/sda4: size is 93171712 sectors
      /dev/sda4: lvm2 label detected at sector 1
      /dev/sdb: size is 5860533168 sectors
      /dev/sdb1: size is 5860530176 sectors
      /dev/sdb1: size is 5860530176 sectors
      /dev/sdb1: lvm2 label detected at sector 1
    Archiving volume group "xes" metadata (seqno 1).
    Creating logical volume mio
      Extending segment type, striped
      Setting allocation/mirror_logs_require_separate_pvs to 0
      Setting allocation/maximise_cling to 1
    Creating volume group backup "/etc/lvm/backup/xes" (seqno 2).
      Locking LV OyBR38yg9Xd8yeL4S3ED2sLeTgOA7OdatjP7EbDAZC1Wk8FL2m8UCVwq1SuJNUlJ (R)
      Finding volume group for uuid OyBR38yg9Xd8yeL4S3ED2sLeTgOA7OdatjP7EbDAZC1Wk8FL2m8UCVwq1SuJNUlJ
      /dev/sda4: lvm2 label detected at sector 1
    Found volume group "xes"
    activation/volume_list configuration setting not defined: Checking only host tags for xes/mio
      /dev/sda4: read_ahead is 256 sectors
      Setting activation/use_mlockall to 0
      Locking memory
    Creating xes-mio
    Loading xes-mio table (253:5)
    Resuming xes-mio (253:5)
      Unlocking memory
    Clearing start of logical volume "mio"
      /dev/xes/mio: stat failed: No such file or directory
  /dev/xes/mio: not found: device not cleared
  Aborting. Failed to wipe start of new LV.
      Locking LV OyBR38yg9Xd8yeL4S3ED2sLeTgOA7OdatjP7EbDAZC1Wk8FL2m8UCVwq1SuJNUlJ (NL)
      Finding volume group for uuid OyBR38yg9Xd8yeL4S3ED2sLeTgOA7OdatjP7EbDAZC1Wk8FL2m8UCVwq1SuJNUlJ
    Found volume group "xes"
      Setting activation/use_mlockall to 0
      Locking memory
    Removing xes-mio (253:5)
      Setting devices/issue_discards to 0
      Unlocking memory
    Creating volume group backup "/etc/lvm/backup/xes" (seqno 3).
  semid 491521: semop failed for cookie 0xd4dd624: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223204900 (0xd4dd624) to initialize waiting for incoming notifications.
      Unlocking /run/lock/lvm/V_xes
Comment 4 Alexander Tsoy 2013-02-07 00:15:52 UTC
I have recently migrated to systemd and can confirm this issue. Same error with systemd-197-r1, udev-197-r4 and lvm2-2.02.97-r1.
Comment 5 Alexander Tsoy 2013-02-07 01:16:09 UTC
(In reply to comment #4)
> I have recently migrated to systemd and can confirm this issue. Same error
> with systemd-197-r1, udev-197-r4 and lvm2-2.02.97-r1.

and hardened-sources-3.7.4-r1
Comment 6 Stefan G. Weichinger 2013-03-09 18:26:07 UTC
Hit the same errors with 

* gentoo-sources-3.8.1
* systemd-198 (and 197.x before as well)
* lvm2-2.02.98
* udev-198

~am64

Can't create new LVs oder snapshots right now.

Example:

#  lvcreate --size 1000M --name test VG03 -v
    Setting logging type to disk
    Finding volume group "VG03"
    Archiving volume group "VG03" metadata (seqno 1104).
    Creating logical volume test
    Creating volume group backup "/etc/lvm/backup/VG03" (seqno 1105).
    Found volume group "VG03"
    activation/volume_list configuration setting not defined: Checking only host tags for VG03/test
    Creating VG03-test
    Loading VG03-test table (253:8)
    Resuming VG03-test (253:8)
    Clearing start of logical volume "test"
  /dev/VG03/test: not found: device not cleared
  Aborting. Failed to wipe start of new LV.
    Found volume group "VG03"
    Removing VG03-test (253:8)
  device-mapper: remove ioctl on  failed: Das Gerät oder die Ressource ist belegt
    Creating volume group backup "/etc/lvm/backup/VG03" (seqno 1106).
  semid 720896: semop failed for cookie 0xd4d1df0: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223157744 (0xd4d1df0) to initialize waiting for incoming notifications.
Comment 7 Fabio Erculiani (RETIRED) gentoo-dev 2013-04-26 13:16:41 UTC
This is related to bug #453594 comment #19
Comment 8 Alexander Tsoy 2013-04-26 13:52:07 UTC
(In reply to comment #7)
> This is related to bug #453594 comment #19

I have this issue with dracut, so this is not related.
Comment 9 Alexander Tsoy 2013-05-28 16:37:11 UTC
OK. This setting in kernel config helped me:

CONFIG_UEVENT_HELPER_PATH=""

https://www.redhat.com/archives/linux-lvm/2012-August/msg00025.html


PS. Creating snapshots still fails with lvmetad, but this is another story.
Comment 10 Pavel Volkov 2013-05-28 17:31:59 UTC
I confirm CONFIG_UEVENT_HELPER_PATH method works.
Maybe kernel options test should be added into the ebuild?
Comment 11 Alexander Tsoy 2013-06-04 20:04:24 UTC
I proposed a patch here:
https://bugs.gentoo.org/show_bug.cgi?id=453594#c26
Comment 12 Samuli Suominen gentoo-dev 2013-07-28 10:05:38 UTC

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