Panic during shutdown (cause identified)

pluknet pluknet at
Thu Jul 2 20:49:21 UTC 2009

2009/7/2 Kostik Belousov <kostikbel at>:
> On Thu, Jul 02, 2009 at 11:37:01AM -0500, Greg Rivers wrote:
>> Please let me know if I can help with further testing/debugging. BTW, I
>> did not customize the amd configuration; I was using the stock
>> configuration from the base system.
> The information you provided about amd(8) causing the problem was crusial.
> The issue is that amd locks its pages with mlockall(2), and the code
> neglected to account the wired mappings, but did not forgot to decrease
> their swap share on unmapping.
> Patch below fixed the issue for me.

I can confirm that simply staring amd(8) daemon and then reboot would cause
such panic in swap accounting.
I saw a dozen messages "negative vmsize for uid = 0" in time just before panic.

This patch fixes that for me.
my 2c.


More information about the freebsd-current mailing list