On Sat, Feb 07, 2026 at 09:09:13AM -0800, Mike Larkin wrote:
> On Sat, Jan 17, 2026 at 07:53:14PM -0800, Mike Larkin wrote:
> > On Sat, Jan 17, 2026 at 12:18:28PM +0100, Walter Alejandro Iglesias wrote:
> > > This machine, apparently, hibernates correctly.  Then, booting after the
> > > hibernation is complete, also apparently, unhibernates correctly.  But,
> > > sometimes right after the image is uncompressed, sometimes after some
> > > command is executed in the console, sometimes later, you always end up
> > > with this same kernel panic (photos included in tarball):
> > >
> > >    https://en.roquesor.com/Downloads/panic.tar.gz
> > >
> > > As I mentioned to mlarkin@ and krw@ in private, I knew for certain that
> > > this didn't happen with this machine.  I used to test how it hibernated
> > > because I had it connected to a UPS when I used it (for many years) as a
> > > home mail-web server.  And even though it's an old machine, I still use
> > > it occasionally, which is why I took the time to do the trace back.
> > >
> > > After three days installing snapshots I could find out in which one the
> > > panic starts happening and which modification causes it.
> > >
> > > This is the last snapshot working fine (the number of the beast :-):
> > >
> > >   https://openbsd.cs.toronto.edu/archive/2025-05-22/amd64
> > >
> > >   kern.version=OpenBSD 7.7-current (GENERIC.MP) #666: Wed May 21 00:12:25 
> > > MDT 2025
> > >     [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > >
> > > And this is the first when the issue appears:
> > >
> > >   https://openbsd.cs.toronto.edu/archive/2025-05-23/amd64
> > >
> > >   kern.version=OpenBSD 7.7-current (GENERIC.MP) #667: Thu May 22 22:13:35 
> > > MDT 2025
> > >     [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > >
> > > The modification that causes the issue is this:
> > >
> > >   https://marc.info/?l=openbsd-cvs&m=174779996216651&w=2
> > >
> > > After reverting those Mike's diffs in current, the panic disappears.
> > >
> >
> > I'll take a look at those diff again but I don't see how this could be the
> > problem. That diff just moved the allocation earlier. Maybe there's a double
> > free. I'll look.
> >
> > -ml
> >
>
> Hi Walter
>
> Can you try this diff on -current and let me know if this fixes it?
>
> diff /export/bin/src/OpenBSD/hib
> path + /export/bin/src/OpenBSD/hib
> commit - 12762e4337611beea64f8029adc3932766410745
> blob - 2b7924651df0c61efc89543ceacf5e7e5881e4ca
> file + sys/kern/subr_hibernate.c
> --- sys/kern/subr_hibernate.c
> +++ sys/kern/subr_hibernate.c
> @@ -2012,7 +2012,7 @@ hibernate_free(void)
>       pmap_activate(curproc);
>
>       if (hibernate_temp_page) {
> -             pmap_kremove(hibernate_temp_page, PAGE_SIZE);
> +//           pmap_kremove(hibernate_temp_page, PAGE_SIZE);
>               km_free((void *)hibernate_temp_page, PAGE_SIZE,
>                   &kv_any, &kp_none);
>       }
>

actually disregard, this isn't quit right either. I'll let you know when I have
something fully baked. stay tuned.

Reply via email to