Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 683240 - sys-fs/lvm2-2.02.183 openrc service hangs indefinitely when udev stops before it
Summary: sys-fs/lvm2-2.02.183 openrc service hangs indefinitely when udev stops before it
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-04-13 11:55 UTC by Manuel Ullmann
Modified: 2019-04-17 07:26 UTC (History)
0 users

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 Manuel Ullmann 2019-04-13 11:55:50 UTC
At least with the root partition being on LVM, the lvm openrc service won’t complete stopping, if udev was stopped before it. This is a race condition.

Steps to reproduce:
1. Shutdown with a root partition on LVM.

Actual results:
sysfs waits indefinitely for lvm to stop. After the timeout openrc hangs forever. Magic sysrq is a workaround, but the journal of your root partition has to be restored on next reboot.

Expected results:
lvm stops always.

Reproducible: often

Portage 2.3.62 (python 3.6.5-final-0, default/linux/amd64/17.0/hardened, gcc-8.2.0, glibc-2.28-r6, 4.19.27-gentoo-r1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.27-gentoo-r1-x86_64-Intel-R-_Core-TM-_i5-4570_CPU_@_3.20GHz-with-gentoo-2.6
KiB Mem:    11274536 total,   6802928 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Tue, 09 Apr 2019 20:30:01 +0000
Head commit of repository gentoo: 94454a54314e0b471877ee2d1b44d8a6b9128cea
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.31.1 p5) 2.31.1
distcc 3.3.2 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r4::gentoo
sys-devel/gcc:            8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes

zeuch
    location: /usr/local/portage
    masters: gentoo
    priority: 0

eclipse
    location: /var/lib/layman/eclipse
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/eclipse-overlay.git
    masters: gentoo
    priority: 50

gnu-elpa
    location: /var/lib/layman/gnu-elpa
    sync-type: laymansync
    sync-uri: gs-elpa gnu-elpa
    masters: gentoo
    priority: 50

grub2-themes
    location: /var/lib/layman/grub2-themes
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/grub2-themes-overlay.git
    masters: gentoo
    priority: 50

laurentb
    location: /var/lib/layman/laurentb
    sync-type: laymansync
    sync-uri: git://github.com/laurentb/gentoo-overlay.git
    masters: gentoo
    priority: 50

melpa
    location: /var/lib/layman/melpa
    sync-type: laymansync
    sync-uri: gs-elpa melpa
    masters: gnu-elpa gentoo
    priority: 50

melpa-stable
    location: /var/lib/layman/melpa-stable
    sync-type: laymansync
    sync-uri: gs-elpa melpa-stable
    masters: gnu-elpa gentoo
    priority: 50

robert7k
    location: /var/lib/layman/robert7k
    sync-type: laymansync
    sync-uri: https://github.com/robert7k/gentoo-overlay.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

tastytea
    location: /var/lib/layman/tastytea
    sync-type: laymansync
    sync-uri: https://schlomp.space/tastytea/overlay.git
    masters: gentoo
    priority: 50

Installed sets: @steam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/mnt/platz/distfiles"
EMERGE_DEFAULT_OPTS=" --autounmask-unrestricted-atoms=y --autounmask-keep-masks=y --buildpkg-exclude='virtual/* sys-kernel/*-sources' --jobs=4 --load-average=4.0 --with-bdeps=y --usepkg=y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.fau.de/pub/mirrors/gentoo"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en_US en"
MAKEOPTS="-j4 -l4.0"
PKGDIR="/mnt/platz/pkgdir/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 audiofile avi berkdb bzip2 cairo cdda cddb cdparanoia cdr cracklib crypt css cue cups cxx dbus djvu dri dv dvd dvdr dvdread elogind emacs encode exif faac ffmpeg flac fontconfig foomaticdb ftp gd gdbm gif glamor gpm gstreamer gtk gtk3 hardened iconv id3tag imagemagick ipv6 irc jpeg jpeg2k ladspa libass libnotify libtirpc libwww lm_sensors logrotate lzo mad matroska mbox mng modules mp3 mpeg mtp multilib ncurses networkmanager nfs nls nptl nsplugin ogg oggvorbis openal openexr opengl openmp oscar pam pcre pdf pie png policykit portaudio qml qt5 quicktime raw readline samba sasl sdl seccomp session smp spell ssl ssp svg tcpd theora threads tiff truetype udev udisks unicode usb v4l v4l2 vaapi vcd vdpau vhosts vorbis wavpack wayland wimax wmf x264 x265 xattr xml xpm xtpax xv xvid zlib" ABI_X86="64" 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" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de en_US en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel i965 r600 radeon radeonsi" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-fs/lvm2-2.02.183::gentoo was built with the following:
USE="readline thin udev -device-mapper-only -lvm2create_initrd -sanlock (-selinux) -static -static-libs -systemd" ABI_X86="(64)"
Comment 1 Manuel Ullmann 2019-04-13 12:14:29 UTC
I’ve prepared a pull request adding udev as needed in depend() here:
https://github.com/gentoo/gentoo/pull/11670
Comment 2 Larry the Git Cow gentoo-dev 2019-04-17 07:26:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c3d9335bfb904d55365b5a4f6470490021e3a91

commit 2c3d9335bfb904d55365b5a4f6470490021e3a91
Author:     Manuel Ullmann <labre@posteo.de>
AuthorDate: 2019-04-13 12:06:22 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2019-04-17 07:25:37 +0000

    sys-fs/lvm2: fix race condition with udev stopping in lvm rc service
    
    Maintainer Edit: don't add lvm2-2.02.183-r1, just move straight forward to .184-r2.
    
    Fixes: https://bugs.gentoo.org/683240
    Fixes: https://github.com/gentoo/gentoo/pull/11670
    Package-Manager: Portage-2.3.62, Repoman-2.3.11
    Signed-off-by: Manuel Ullmann <labre@posteo.de>
    (cherry picked from commit 9af3439dabcf6efe6a2df4459e06366dc6a330af)
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 sys-fs/lvm2/files/lvm.rc-2.02.183   | 149 ++++++++++++++++++++
 sys-fs/lvm2/lvm2-2.02.184-r2.ebuild | 262 ++++++++++++++++++++++++++++++++++++
 2 files changed, 411 insertions(+)