Bug 237963

Summary: panic: free: guard2 fail @ 0xcd8de040 + 2061 from unknown:0
Product: Base System Reporter: crahman
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Many People CC: crahman, kevans
Priority: --- Keywords: crash, needs-qa
Version: 11.2-STABLE   
Hardware: amd64   
OS: Any   

Description crahman 2019-05-18 12:48:45 UTC
After upgrading from r344695 to r347946 (March 1, 2019 -> May 17, 2019) the loader panics with the summary message during startup.  The problem occurs with both loader_lua and loader_4th.  Both loaders worked correctly prior to the upgrade.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-18 13:26:54 UTC
Is it possible to attach a screenshot of the panic?

I'm hoping it contains a panic backtrace which may provide more info. 

If you can alternatively generate a backtrace at that point and include that as an attachment, that would be great
Comment 2 crahman 2019-05-18 14:00:40 UTC
Sadly, the entire content of the message produced by the loader panic is the single line I reproduced (well, there's also a '--> Press a key on the console to reboot <--).  If you tell me how, I'll be happy to try to produce a backtrace.
Comment 3 crahman 2019-05-19 17:31:55 UTC
Other reports on -stable indicate this is affecting other people.
Comment 4 crahman 2019-07-02 14:32:47 UTC
Somewhere between r348491 and r349154 this problem disappeared.

The only change I see that might have corrected it was 348867:

MFC r342747 (mmacy): zfsboot: support newer ZFS versions.

342747 is documented as:

zfsboot: support newer ZFS versions
declare v3 objset size/layout to fix userboot and possibly other loader issues

- fix for userboot assertion failure in zfs_dev_close in free due to out of bounds write
- fix for zfs_alloc / zfs_free mismatch assertion failure when booting GPT on BIOS

In any event /boot/loader compiled before this change fails and subsequent to it works.

I'm closing the report since the bug has likely been fixed.