You are not logged in.

#1 2018-01-23 06:22:00

meecha
Member
Registered: 2016-02-12
Posts: 2

"Failed to unmount /oldroot/..." when shutting down

Edit: Turns out this problem stemmed from Nvidia Optimus. I was able to solve the problem on my laptop by following these steps.

-------------------------------------------

I get this error when shutting down my system as well as the installer ISO. The error is only visible after booting with kernel debugging enabled. It happens towards the end of the shutdown process, and hangs permanently; the only way to power off is holding the button.

A few lines of the error:

shutdown[1783]: Failed to remount '/oldroot/sys/fs/cgroup/devices' read-only: Device or resource busy
shutdown[1]: Failed to wait for process: Protocol error
shutdown[1796]: Failed to remount '/oldroot/sys/fs/cgroup/pids' read-only: Device or resource busy
shutdown[1]: Failed to wait for process: Protocol error
shutdown[1801]: Failed to remount '/oldroot/sys/fs/cgroup/systemd' read-only: Device or resource busy
shutdown[1]: Failed to wait for process: Protocol error

My Google efforts have failed me so maybe you folks can help.

Here's the full console output, sorry for using an image. If someone knows how to get the output in a log file I'd be happy to share it that way.

https://i.imgur.com/xkgqQ25.jpg

Last edited by meecha (2018-02-02 02:40:05)

Offline

#2 2018-01-23 07:48:08

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: "Failed to unmount /oldroot/..." when shutting down

Read the Code of Conduct and only post thumbnails http://wiki.archlinux.org/index.php/Cod … s_and_code


If someone knows how to get the output in a log file I'd be happy to share it that way.

https://wiki.archlinux.org/index.php/Sy … ing_output


Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-01-23 09:31:09

seth
Member
Registered: 2012-09-03
Posts: 59,138

Re: "Failed to unmount /oldroot/..." when shutting down

What is "/oldroot" and why is there a sysfs mounted?

Offline

#4 2018-02-02 02:15:36

Faalagorn
Member
Registered: 2016-11-19
Posts: 8

Re: "Failed to unmount /oldroot/..." when shutting down

I have replied OP about it on Reddit short while before, quoting my reply there:

I had the same error - i didn't had it with January installation media when I did previous install, so I guess that's something related to it unless it's a 4.15 kernel error.

After installing the system, exiting from chroot I tried rebooting, and over time system tried SIGTERM and SIGKILL the processes and informed me that it can't unmount oldroot (whatever that was). After waiting countless minutes I ejected my USB and had to reset the PC. Afterwards the PC runs fine, although after each shutdown I still get the shutdown[1]: Failed to wait for process: Protocol error for a really brief time - even weirder is the fact that this error doesn't seem to get registered by journalctl and dmesg (I have the installation media unplugged)

Do you have testing repositories enabled? If so, then it might be some issue with the newest kernel, as it was updated to 4.15 just a few days ago on testing.

In my case this message is pretty harmless, but googling it only brought me here and to the related Reddit post. The funniest part however is that in my case that doesn't seem to appear in my journal, as "journalctl | grep -i Process" or "dmesg | grep -i Process" nor "journalctl -p 5" seems to return nothing related to it - I did remove /var/log/journal so had to recreate it and I did fiddle with initramfs, but after recreating the journal and initramfs the error is still there, even on fallback initramfs while it wasn't on my previous installation.

With that in mind and seeing this is the only report, I suspect the cause might be one of the latest updates, especially as I am running testing repos. I don't know which package (kernel, systemd, something else?)  is throwing the error, as google for "Failed to wait for process" didn't point me to any git code repo, but I'll keep on looking.

Offline

#5 2018-02-02 02:37:20

meecha
Member
Registered: 2016-02-12
Posts: 2

Re: "Failed to unmount /oldroot/..." when shutting down

Faalagorn wrote:

I have replied OP about it on Reddit short while before, quoting my reply there:

I had the same error - i didn't had it with January installation media when I did previous install, so I guess that's something related to it unless it's a 4.15 kernel error.

After installing the system, exiting from chroot I tried rebooting, and over time system tried SIGTERM and SIGKILL the processes and informed me that it can't unmount oldroot (whatever that was). After waiting countless minutes I ejected my USB and had to reset the PC. Afterwards the PC runs fine, although after each shutdown I still get the shutdown[1]: Failed to wait for process: Protocol error for a really brief time - even weirder is the fact that this error doesn't seem to get registered by journalctl and dmesg (I have the installation media unplugged)

Do you have testing repositories enabled? If so, then it might be some issue with the newest kernel, as it was updated to 4.15 just a few days ago on testing.

In my case this message is pretty harmless, but googling it only brought me here and to the related Reddit post. The funniest part however is that in my case that doesn't seem to appear in my journal, as "journalctl | grep -i Process" or "dmesg | grep -i Process" nor "journalctl -p 5" seems to return nothing related to it - I did remove /var/log/journal so had to recreate it and I did fiddle with initramfs, but after recreating the journal and initramfs the error is still there, even on fallback initramfs while it wasn't on my previous installation.

With that in mind and seeing this is the only report, I suspect the cause might be one of the latest updates, especially as I am running testing repos. I don't know which package (kernel, systemd, something else?)  is throwing the error, as google for "Failed to wait for process" didn't point me to any git code repo, but I'll keep on looking.

Hey, I've actually just recently solved the problem, for me anyway. Do you have a laptop with an Nvidia GPU and integrated graphics? If so, Bumblebee is the fix. Here are the steps I took and after doing that, my system shuts down perfectly fine. Hope it helps.

What's weird (and a little frustrating) is this issue happens with every distro I've tried, installed or running of a live USB (which I use a lot). Hopefully this will be permanently fixed kernel-side down the road.

Offline

#6 2018-02-03 22:38:33

Faalagorn
Member
Registered: 2016-11-19
Posts: 8

Re: "Failed to unmount /oldroot/..." when shutting down

meecha wrote:

[Hey, I've actually just recently solved the problem, for me anyway. Do you have a laptop with an Nvidia GPU and integrated graphics? If so, Bumblebee is the fix. Here are the steps I took and after doing that, my system shuts down perfectly fine. Hope it helps.

Actually I'm on a desktop PC, but I'm also on integrated intel graphics for the time being, so that may be a common denominator? No Nvidia GPU at all though. I "solved" my issue by adding loglevel=0 for quiet shutdowns (I think loglevel=2 or even loglevel=3 would be sufficient), but like I mentioned, it didn't seem to prevent or even slow down my shutdown/startup, it's just weird it appeared without that parameter. I didn't try reinstalling the whole system, as that's too much hassle to just check this thing, I was just curious about it's origins smile.

Glad you got your error solved though! Guess the thread can be marked as solved, as both of us circumvented that issue in one way or another smile.

Offline

#7 2018-02-04 09:33:52

seth
Member
Registered: 2012-09-03
Posts: 59,138

Re: "Failed to unmount /oldroot/..." when shutting down

seth wrote:

What is "/oldroot" and why is there a sysfs mounted?

Offline

#8 2018-02-04 17:39:52

Faalagorn
Member
Registered: 2016-11-19
Posts: 8

Re: "Failed to unmount /oldroot/..." when shutting down

seth wrote:
seth wrote:

What is "/oldroot" and why is there a sysfs mounted?

I don't have it mounted, and I don't even get this message unlike OP, I only got the "shutdown[1]: Failed to wait for process: Protocol error" that don't appear in journal and only appears briefly when shutting PC down for a split second, before I supassed it with loglevel kernel parameter.

I only saw the oldroot message (might be different than OP's) when installation media failed to shut down (and reboot) cleanly.

Offline

#9 2018-02-08 23:16:43

Vizitor
Member
Registered: 2015-01-05
Posts: 83

Re: "Failed to unmount /oldroot/..." when shutting down

"shutdown[1]: Failed to wait for process: Protocol error"
That is message that is starting to appear on my PC on shutdown/rebootafter upgrade to kernel 4.15.1;
I don't have that "/oldroot" part of the message, and I have nvidia gtx 970, if that matter.

I was not shure if I have to open a new thread, so I posted it here.
Feel free to delete if unapropriate.

[Edit]
Few hours later, new thread about this was created.

Last edited by Vizitor (2018-02-19 13:52:49)

Offline

#10 2018-03-13 07:26:31

goumba
Member
From: New Jersey, USA
Registered: 2017-03-31
Posts: 21
Website

Re: "Failed to unmount /oldroot/..." when shutting down

I started getting the same message last night after updating via pacman -Syu. It wasn't happening before then, and I as well could not find any other info out there.

Trying to troubleshoot this, it *seems* it comes from the initrd, but nothing related was upgraded.

[anthony@regina ~]# sudo find / -print0 | xargs -0 grep -d skip oldroot
...
/usr/lib/initcpio/shutdown:        if [ -e "/oldroot/$p/$bin" ]; then
/usr/lib/initcpio/shutdown:            cp "/oldroot/$p/$bin" "/usr/bin/$1"
/usr/lib/initcpio/shutdown:umount --recursive /oldroot
Binary file /usr/lib/systemd/systemd-shutdown matches
...
[anthony:~]$ pacman -Ql | grep 'initcpio/shutdown'  
mkinitcpio /usr/lib/initcpio/shutdown

However, mkinitcpio was not touched in the upgrade, so...

[anthony:~]$ sudo grep -E 'installed.*init*' /var/log/pacman.log
[2018-03-07 11:41] [ALPM] installed mkinitcpio-busybox (1.28.1-1)
[2018-03-07 11:41] [ALPM] installed mkinitcpio (24-2)

I've rebooted into a failsafe initrd and tried rebuilding, thinking it was a failure at the original build, but the messages remain.

If that helps anyone here with any suggestions, go for it. It seems a harmless error, annoying at worst. I doubt I'm the only one however who would like a clean shutdown. smile

Last edited by goumba (2018-03-13 07:31:20)


FSF Associate Member #12876
"Yeah, well, you know, that's just, like, your opinion, man." - The Dude

Offline

#11 2018-03-13 08:38:28

kts
Member
From: Burma
Registered: 2016-12-20
Posts: 23

Re: "Failed to unmount /oldroot/..." when shutting down

Today, I updated systemd and it affected me since.
Before that, I only get
shutdown[1]: Failed to wait for process: Protocol error".


What you know about computing other people will learn.  Don't feel as if the key to successful
computing is only in your hands. What's in your hands, I think and hope, is intelligence:
the ability to see the machine as more than when you were first led up to it, that you can make it more.
—Alan J. Perlis (April 1, 1922 – February 7, 1990)

Offline

#12 2018-03-13 12:48:35

ricrogz
Member
From: Murcia
Registered: 2011-11-23
Posts: 21
Website

Re: "Failed to unmount /oldroot/..." when shutting down

kts wrote:

Today, I updated systemd and it affected me since.
Before that, I only get
shutdown[1]: Failed to wait for process: Protocol error".

The same for me, but the message repeated several times on each shutdown.

Offline

#13 2018-03-14 01:57:00

Mollom
Member
From: Ffm - Germany
Registered: 2008-07-01
Posts: 21

Re: "Failed to unmount /oldroot/..." when shutting down

Offline

#14 2018-03-15 08:39:59

Pryka
Member
Registered: 2018-02-07
Posts: 85

Re: "Failed to unmount /oldroot/..." when shutting down

Just started to getting the same error with oldroot.

Probably after upgrade to systemd-238.0-3.

PS. Also this is present:

Also shutdown[1]: Failed to wait for process: Protocol error

Offline

#15 2018-03-19 18:08:09

khartahk
Member
Registered: 2018-03-19
Posts: 2

Re: "Failed to unmount /oldroot/..." when shutting down

I've got the same issue. After updating I started getting

Failed to remount '/oldroot/sys/fs/cgroup/devices' read-only: Device or resource busy

Last edited by khartahk (2018-03-19 18:09:12)

Offline

#16 2018-03-20 07:13:51

lesebas
Member
Registered: 2013-07-10
Posts: 31

Re: "Failed to unmount /oldroot/..." when shutting down

Same problem for me. Hopping that will be solved in the next version (239?)

Offline

#17 2018-03-20 08:07:42

ricrogz
Member
From: Murcia
Registered: 2011-11-23
Posts: 21
Website

Re: "Failed to unmount /oldroot/..." when shutting down

Mollom wrote:

As Mollom mentioned (Danke, Mollom), the issue has already been discussed, and a solution to the problem is proposed in the thread.

Hint for the lazies:

Just add the "shutdown" hook to your /etc/mkinitcpio.conf, and rebuild initramfs ("mkinitcpio -p linux").

Offline

#18 2018-03-20 09:02:13

justasug
Member
Registered: 2014-08-03
Posts: 172

Re: "Failed to unmount /oldroot/..." when shutting down

ricrogz wrote:

As Mollom mentioned (Danke, Mollom), the issue has already been discussed, and a solution to the problem is proposed in the thread.

Hint for the lazies:

Just add the "shutdown" hook to your /etc/mkinitcpio.conf, and rebuild initramfs ("mkinitcpio -p linux").

Can someone just clarify if this is just a temporary "hacky" solution? Or will the "shutdown" hook be added by default in a future release? I don't understand if this is fixed now upstream or elsewhere.

Offline

#19 2018-03-20 09:06:08

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,313

Re: "Failed to unmount /oldroot/..." when shutting down

It is a temporary hack, it is fixed upstream and should be pushed in the next release.

Last edited by V1del (2018-03-20 09:24:29)

Offline

#20 2018-03-20 11:21:36

justasug
Member
Registered: 2014-08-03
Posts: 172

Re: "Failed to unmount /oldroot/..." when shutting down

Thanks for the information.
Just to verify again, sorry if it's a stupid question: once the new systemd version is released it will work and adding the "shutdown" hook for mkinitcpio won't be necessary anymore?

Offline

#21 2018-03-20 11:23:39

Pryka
Member
Registered: 2018-02-07
Posts: 85

Re: "Failed to unmount /oldroot/..." when shutting down

justasug wrote:

Thanks for the information.
Just to verify again, sorry if it's a stupid question: once the new systemd version is released it will work and adding the "shutdown" hook for mkinitcpio won't be necessary anymore?

Yes, and it's not really necessary to add it now anyways.

Offline

#22 2018-03-22 10:12:03

wayneward
Member
From: Spain
Registered: 2018-01-22
Posts: 2
Website

Re: "Failed to unmount /oldroot/..." when shutting down

Yes this worked ! my first real arch build this morning and thought id screwed it!
This fixed this now just need to find out why gnome-terminal doesnt load although i managed to get xterm on after a bit of poking around!!

Offline

#23 2018-03-24 16:40:57

mxfm
Member
Registered: 2015-10-23
Posts: 163

Re: "Failed to unmount /oldroot/..." when shutting down

Well, for me the solution with 'shutdown' hook didn't worked - i still have those /oldroot error messages.

Offline

#24 2018-03-24 18:01:16

loqs
Member
Registered: 2014-03-06
Posts: 18,091

Re: "Failed to unmount /oldroot/..." when shutting down

mxfm wrote:

Well, for me the solution with 'shutdown' hook didn't worked - i still have those /oldroot error messages.

https://bbs.archlinux.org/viewtopic.php?id=57855

Offline

#25 2018-03-25 08:43:19

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: "Failed to unmount /oldroot/..." when shutting down

The 'shutdown' hook didn't work for me either.
I choose instead to mask 'mkinitcpio-generate-shutdown-ramfs.service', but I still get:

...
mars 24 23:24:54 arch64 systemd[1]: Shutting down.
mars 24 23:24:54 arch64 kernel: systemd-shutdow: 32 output lines suppressed due to ratelimiting
...

So something is still not normal here.

Offline

Board footer

Powered by FluxBB