Tuesday, November 28, 2023

Re: OpenBSD SMP - BGPd - send_rtmsg: action 1, prefix A.B.C.D/24: No buffer space available - panic: malloc: out of space in kmem_map

Le 28/11/2023 à 12:12, Claudio Jeker a écrit :
> So the problem is that the malloc space is filled by
> a) 26540K of devbuf -- because of the multiqueue support in ixl
> b) 63493K of ACPI -- what the heck ACPI?!?
> and then there is not enough space for rtable. A full table requires
> in your example 50816K of rtable malloc space.
>
> Now on amd64 all of this needs to fit into 128MB which is impossible.
>
> You can use config(8) and bsd.re-config(5) to adjust the nkmempg variable
> to something like 131072 (which is 4 times the default size).
> This can be verified with `sysctl vm.nkmempages`
>
> Now ixl(4) and ACPI should not be such pigs but in the end 128MB of kernel
> malloc space is just stupidly small on a system with 128GB of memory.


Hi Claudio,

Thanks.

I bumped nkmempg to 131072

====

# config -e -o bsd.new /bsd

ukc> nkmempg 131072

quit

====

Then rebooted with the very same issue.

It seems the nkmempg variable is not properly takes into account since
'sysctl vm.nkmempages' still shows 32768 after reboot

====

# sysctl vm.nkmempages vm.nkmempages=32768

====

# config -e -o bsd.new /bsd OpenBSD 7.4 (GENERIC.MP) #0: Sun Oct 22
12:13:42 MDT 2023
root@syspatch-74-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Enter 'help' for information ukc> nkmempg nkmempages = 262144 ====

Modifying /etc/bsd.re-config and rebooting (twice) didn't help either.

I 'had'to recompile kernel (after modifying:
/usr/src/sys/kern/kern_malloc.c with '#define NKMEMPAGES 262144 '), the
issue is not occuring again.

Do you recomend using this approach to mitigate the issue, or is there a
more 'long term' fix ?

Thanks

Laurent

No comments:

Post a Comment