https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209475

--- Comment #11 from Kristof Provost <k...@freebsd.org> ---
(In reply to fehmi noyan isi from comment #10)
Yes, but I wouldn't check the free memory.

I've not yet looked at the code, but the original report suggests there are a
couple of related issues:

> kldload stuck and never give the console back on my 8GB RAM server
This suggests that pf is doing an allocation with M_WAITOK. This means the
malloc() call will keep waiting until enough memory is found to satisfy the
request. If that's for more memory than is available it'll never return

> During this status, issuing command "pfctl" will crash the system:
This suggests that there's a race in pf initialisation where the ioctl()
handler is already registered before all initialisation is done (i.e. the large
allocation is still blocked). That's a bug too, and one that could potentially
occur even if the large allocation succeeds (though in a very small time
window).

My initial approach would be to find the allocation that blocks startup,
presumably where the state hash table is allocated, and remove the M_WAITOK
flag. Then the code needs to be changed to ensure that it can handle an
allocation failure.
The second step is to audit the initialisation code to find out why ioctls()
can be done before the state hash table is allocated.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-pf@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-pf
To unsubscribe, send any mail to "freebsd-pf-unsubscr...@freebsd.org"

Reply via email to