cgroup : option or name mismatch, new: 0x0 “”, old: 0x4 “systemd”

    Read

遇到一个奇怪的问题,Arch可以重新启动,但是执行halt的时候报错“cgroup : option or name mismatch, new: 0x0 "", old: 0x4 "systemd"”,貌似官方暂时没有好的解决方法:

Okay, here's a rather long explanation of some of the things that happen during shutdown (simplified at some places, because some details don't help the understanding at all).SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

systemd activates shutdown.target, which conflicts with all services and mount points, essentially stopping everything that was started.SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

Activating shutdown.target starts a service that creates the executable /run/initramfs/shutdown, if it doesn't exist yet (more on that further down).SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

Upon reaching shutdown.target, systemd replaces itself with /usr/lib/systemd/systemd-shutdown.SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

systemd-shutdown tries kill all remaining processes, unmount all remaining file systems, detach all loop and device-mapper devices. It gives up at some point, since most of the time it will fail for a few mount points.SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

If /run/systemd/shutdown does not exist, systemd-shutdown proceeds to power off or reboot the machine.SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

systemd-shutdown changes the root to /run/initramfs, puts the old root to /oldroot and replaces itself with /shutdown.SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

In our case, /shutdown is a copy of /usr/lib/systemd/systemd-shutdown, which again tries to unmount everything and so on. Most of the time, it succeeds now (this means that the root file system is not only remounted read-only as it was classically done, but unmounted entirely. Any encryption mapping is also closed, which causes the kernel to wipe the encryption key from memory, to prevent a cold boot attack).SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

/shutdown then proceeds to power off or reboot.SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

So, how does the hardware watchdog come into play here? By default, systemd sets the watchdog timer to 10 minutes before it replaces itself with systemd-shutdown. Then it closes it, but does not stop it. When systemd-shutdown takes over, it opens the watchdog again. The same happens again when systemd-shutdown switches to /run/initramfs. This has a very useful result: If somehow the execution of the new binary fails, the hardware watchdog will time out after 10 minutes and reboot the computer - so your machine reboots instead of hanging indefinitely. The downside: You get a "watchdog did not stop" warning twice during shutdown.SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

As for the other error:SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

cgroup : option or name mismatch, new: 0x0 "", old: 0x4 "systemd"SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

This is a message from the kernel that is generated when a cgroup file system is remounted and options are changed that should not be changed. I cannot explain this entirely, but somehow this seems to happen while /oldroot/sys/fs/cgroup/systemd is being unmounted. In any case, it is of no special interest. SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

官方论坛地址:https://bbs.archlinux.org/viewtopic.php?pid=1372562#p1372562SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/ SourceByrd's Weblog-https://note.t4x.org/error/cgroup-option-or-name-mismatch/

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!
Byrd
  • by Published on June 26, 2015
  • 原文链接:https://note.t4x.org/error/cgroup-option-or-name-mismatch/
匿名

Comment

Anonymous

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: