reboot should check for (and remove) extra -B zfs-bootfs options.
background: if /lib/svc/method/fs-usr fails to run bootadm update-archive for any reason, it will use eeprom bootcmd to get arguments for reboot -f, and reboots the system.
the problem is that reboot command will verify the provided arguments in parse_fastboot_args(), in process it will construct new -B zfs-bootfs=... and it will inject this in between kernel and remaining options. the resulting string is passed then to uadmin(). in case of repeated boots the argument list will grow too long for uadmin (and there will be memory corruption in reboot command):
mdep = /platform/i86pc/kernel/amd64/unix -B zfs-bootfs=rpool/ROOT/hipster-4,bootpath="/pci@0,0/pci15ad,1976@10/sd@0,0:b" -B zfs-bootfs=rpool/ROOT/hipster-4,bootpath="/pci@0,0/pci15ad,1976@10/sd@0,0:b" -B zfs-bootfs=rpool/287,bootpath="/pci@0,0/pci15ad,1976@10/sd@0,0:b",diskdevid="id1,sd@n6000c296ec96a302dff57c7f7d6ce73a/b"]^E^H
reboot: uadmin failed: File name too long
(the looping reboot is another issue, perhaps the more appropriate action in this case would be boot to single user mode so admin will have chance to fix the issue).
to reproduce, grab an eeprom bootcmd output and use the value with reboot -f
Updated by Electric Monk over 7 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 9e573dcc6440324d76c37be570afdef86f045685 Author: Toomas Soome <email@example.com> Date: 2014-11-25T15:15:39.000Z 5104 reboot should check for (and remove) extra -B zfs-bootfs options. Reviewed by: Garrett D'Amore <firstname.lastname@example.org> Reviewed by: Josef 'Jeff' Sipek <email@example.com> Reviewed by: Igor Kozhukhov <firstname.lastname@example.org> Reviewed by: Hans Rosenfeld <email@example.com> Approved by: Gordon Ross <firstname.lastname@example.org>