Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Shutdown hangs on waiting for lvm when rc_parallel="YES"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
gkmac
Guru
Guru


Joined: 19 Jan 2003
Posts: 333
Location: West Sussex, UK

PostPosted: Mon Dec 21, 2015 11:43 pm    Post subject: Shutdown hangs on waiting for lvm when rc_parallel="YES Reply with quote

Some update in the past week has caused both my Gentoo boxes to fail to shutdown.

My root partition is within LVM on both boxes and for many many years up until now that has never been a problem, apart from a slight warning that "vggazanomi/gazanomirootssd contains a filesystem in use" but the shutdown always completed nethertheless.

Now it hangs around waiting for lvmetad to shutdown. I had to video the shutdown and transcribe what the screen says...
Code:
lvm      |  Shutting Down LVs & VGs ...
lvm      |  Logical volume vggazanomi/gazanomirootssd contains a filesystem in use
lvmetad  | * lvmetad: waiting for lvm (50 seconds)
sysfs    | * sysfs: waiting for lvm (50 seconds)
lvmetad  | * lvmetad: waiting for lvm (41 seconds)
sysfs    | * sysfs: waiting for lvm (41 seconds)
lvmetad  | * lvmetad: waiting for lvm (32 seconds)
sysfs    | * sysfs: waiting for lvm (32 seconds)
lvmetad  | * lvmetad: waiting for lvm (23 seconds)
sysfs    | * sysfs: waiting for lvm (23 seconds)
lvmetad  | * lvmetad: waiting for lvm (14 seconds)
sysfs    | * sysfs: waiting for lvm (14 seconds)
lvmetad  | * lvmetad: waiting for lvm (5 seconds)
sysfs    | * sysfs: waiting for lvm (5 seconds)
lvmetad  | * lvmetad: waiting for lvm (50 seconds)
lvmetad  | * lvmetad: waiting for lvm (41 seconds)
lvmetad  | * lvmetad: waiting for lvm (32 seconds)
lvmetad  | * lvmetad: waiting for lvm (23 seconds)
lvmetad  | * lvmetad: waiting for lvm (14 seconds)
lvmetad  | * lvmetad: waiting for lvm (5 seconds)
lvmetad  | * Stopping lvmetad ...
lvmetad  | * start-stop-daemon: 1 process refused to stop
lvmetad  | * Failed to stop lvmetad
lvmetad  | * ERROR: lvmetad failed to stop                       [ !! ]

...and then it just hangs there forever.

Any ideas?
_________________
If ~amd64 ebuilds are cutting edge, then git-9999 ebuilds are chainsaws.
"Not everyone can ride a unicycle, does that mean we should put another wheel on it?" - Lokheed
Back to top
View user's profile Send private message
gkmac
Guru
Guru


Joined: 19 Jan 2003
Posts: 333
Location: West Sussex, UK

PostPosted: Fri Dec 25, 2015 12:38 pm    Post subject: Reply with quote

Judging by the deafening silence I seem to have the only two Gentoo boxes in the world that do this.

First I tried setting use_lvmetad = 0 in /etc/lvm/lvm.conf - no change. lvmetad still failed to stop.

Then I tried blocking lvmetad using this hint. This did trick things into not starting lvmetad, but sysfs still waited for lvm and caused the shutdown to hang. Again had to video the shutdown and type this all out...
Code:
lvm      | Shutting Down LVs & VGs ...
lvm      |  Logical volume vggazanomi/gazanomirootssd contains a filesystem in use.    [ ok ]
sysfs    | * sysfs: waiting for lvm (50 seconds)
sysfs    | * sysfs: waiting for lvm (41 seconds)
sysfs    | * sysfs: waiting for lvm (32 seconds)
sysfs    | * sysfs: waiting for lvm (23 seconds)
sysfs    | * sysfs: waiting for lvm (14 seconds)
sysfs    | * sysfs: waiting for lvm (5 seconds)

What doesn't make sense at all is the fact that [ ok ] appears after the "filesystem in use" which apparently tells me that lvm does stop correctly, so why is sysfs still waiting for lvm?


In the end I've had to edit /etc/rc.conf and change rc_parallel="YES" to NO and now the shutdown completes. But I still cannot put a finger on as to why parallel shutdown worked for at least a year and suddenly stopped working sometime last week.
_________________
If ~amd64 ebuilds are cutting edge, then git-9999 ebuilds are chainsaws.
"Not everyone can ride a unicycle, does that mean we should put another wheel on it?" - Lokheed
Back to top
View user's profile Send private message
morbid
Tux's lil' helper
Tux's lil' helper


Joined: 05 Mar 2003
Posts: 89
Location: Phoenix, AZ

PostPosted: Wed Jan 06, 2016 1:23 am    Post subject: Reply with quote

I'm not sure why no one else has replied... but most of my systems are suddenly having this issue too. They're all doing parallel inits except my server, but I'm not rebooting that to test this. I have disabled parallel init on my laptop, and that does fix it... but I'd prefer to at least have my laptop have parallel enabled.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed Jan 06, 2016 6:20 pm    Post subject: Reply with quote

Hmm this post might be useful if you want to check out what exactly is causing the "filesystem in use" error.

Really we should be looking at changes in the initscripts, but I don't have headspace for it atm; maybe in a week or two.

ISTR something about lvmetad being pulled in, but it's not needed for most setups. Or are we talking about setups where it is, indeed, needed?
Back to top
View user's profile Send private message
fugue88
n00b
n00b


Joined: 30 Mar 2005
Posts: 11

PostPosted: Sat Jan 30, 2016 9:32 pm    Post subject: Reply with quote

I have this problem too, starting with an update I did yesterday. I had put off updating for about two months, but I can say that udev was updated and my kernel was not, at first. I don't remember if lvm was updated or rebuilt.

If I modify the lvm shutdown script to include -vvv -ddddd for verbose debugging output, the console will display that a udev lock/semaphore has a count of 2, which is where it hangs.

After getting the hang reproducibly, I updated my kernel from 4.0.5 to 4.1.15 and rebuilt udev, but that didn't help.

If I change from parallel rc to not, I don't get a hang. If I `init 1` first, then shutdown, I also won't get a hang even if rc is parallel.

My root filesystem is not on lvm, but /home is. /home unmounts successfully, and the LV and VG are disabled, before the hang happens.
Back to top
View user's profile Send private message
fugue88
n00b
n00b


Joined: 30 Mar 2005
Posts: 11

PostPosted: Sat Jan 30, 2016 11:31 pm    Post subject: Reply with quote

If I downgrade from udev-225 to udev-216, I can reliably do a parallel shutdown without hanging.
Back to top
View user's profile Send private message
wmatthews
n00b
n00b


Joined: 06 Sep 2011
Posts: 11
Location: Las vegas, Nevada

PostPosted: Thu Mar 10, 2016 11:29 pm    Post subject: Reply with quote

fugue88 wrote:
If I downgrade from udev-225 to udev-216, I can reliably do a parallel shutdown without hanging.


This fix worked out perfectly.
Back to top
View user's profile Send private message
c00l.wave
Apprentice
Apprentice


Joined: 24 Aug 2003
Posts: 245

PostPosted: Sun May 15, 2016 9:18 am    Post subject: Reply with quote

Any new insights on this issue? I did an update last week (I've put it off for much too long) and I'm now facing the same issue. I don't seem to be able to downgrade due to gudev requiring a later version. Parallel boot worked fine for me ever since it was introduced, too bad it's broken now... :(
_________________
nohup nice -n -20 cp /dev/urandom /dev/null &
Back to top
View user's profile Send private message
BeerSerc
n00b
n00b


Joined: 06 Oct 2016
Posts: 7

PostPosted: Thu Oct 06, 2016 7:42 pm    Post subject: Reply with quote

has this been solved? I have the same issue here...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum