Bug 172086

Summary: reboot hang with 'All buffers synced' with FreeBSD13 on ZFS root
Product: Base System Reporter: Marek <marek>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Many People CC: grahamperrin, nick, sobomax, tschweikle
Priority: Normal    
Version: 13.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Screenshot of the problem as it happens with FreeBSD 13.1 kernel. none

Description Marek 2012-09-26 09:50:06 UTC
I have a problem with FreeBSD 9-RELEASE installed on ZFS mirror file system using tips from here:
http://wiki.freebsd.org/RootOnZFS/GP...ot/9.0-RELEASE


Immediately after installation I'm inovking:
# freebsd-update fetch
# freebsd-update install

Update is always successfull, but when I invoke:
# reboot / # shutdown -r / # halt / # poweroff / etc.

system will try to reboot, but will stop on the

All buffers synced

message.


The funny thing is that the server is responding to ping's, prints messages if I attach USB stick etc.


This problem doesn't take place if FreeBSD is installed "normally", on UFS.

Also it doesn't occurs when I remove 'world' from Components in /etc/freebsd-update.conf

(so the line looks like this):
Components src kernel

The problem also occurs when I invoke
# freebsd-update rollback


The interesting fact is that after invoking the 'freebsd-update fetch' we get list of files to be updated with information:

The following files will be updated as part of updating to 9.0-RELEASE-p4

but after reboot we've go the -p3 version.




---

I searched a lot, but found nothing related to freebsd-update.


Thank you for your time,
Marek

How-To-Repeat: The problem is very easy to reproduce:
Just create Virtual Machine in VirtualBox with two disks, install using instructions I have used (http://wiki.freebsd.org/RootOnZFS/GP...ot/9.0-RELEASE), after installation reboot, login as root, invoke:

# freebsd-update fetch
# freebsd-update install
# reboot
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:32 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 tschweikle 2022-04-13 20:50:42 UTC
FreeBSD 13-Stable does not poweroff after giving "halt -p" or "shutdown -p now". It just hangs after telling uptime. This is for KVM, VMware (Workstation, Player, ESX), VirtualBox, and real Hardware: tested Lenovo T460s. With real hardware you've to press the power button for at least three seconds to power off.
Comment 3 tschweikle 2022-04-13 21:15:46 UTC
Rebooting will take time. After printing uptime you've to wait for up to an hour to see the system reboot. And sometimes it just does not reboot after all.
Comment 4 Maxim Sobolev freebsd_committer freebsd_triage 2023-07-27 19:23:23 UTC
Created attachment 243654 [details]
Screenshot of the problem as it happens with FreeBSD 13.1 kernel.
Comment 5 Maxim Sobolev freebsd_committer freebsd_triage 2023-07-27 19:25:02 UTC
We are seeing similar issue on our ZFS-enabled AWS instances. Occasionally it stucks on reboot with the "spaw_pager_getswapspace(32): failed" right after "All buffers synced." message (see attached screenshot).
Comment 6 Maxim Sobolev freebsd_committer freebsd_triage 2023-07-27 19:30:41 UTC
In the absence of the real fix, I suggest we maybe add a flag that would panic() the system if swp_pager_getswapspace() fails after "All buffers synced" point. If nothing else, that would give us traceback of where the memory allocation is requested and then actually reboot the machine instead of having it to stuck forever?