I'm not sure why, but i386 has an issue that occurs semi-regularly where it's not able to run sysctlbyname cleanly, failing with ENOMEM. From https://ci.freebsd.org/job/FreeBSD-stable-12-i386-test/lastCompletedBuild/testReport/lib.libc.sys/sendfile_test/hdtr_negative_bad_pointers_v4/: /usr/src/lib/libc/tests/sys/sendfile_test.c:66: sysctlbyname(oidname, &int_value, &oldlen, NULL, 0) != 0: sysctlbyname(net.inet.ip.portrange.first, ...) failed: Cannot allocate memory This issue has been seen on ^/stable/11 and ^/stable/12 with i386, but not ^/head AFAICT.
A commit references this bug: Author: ngie Date: Mon Apr 22 11:09:24 UTC 2019 New revision: 346539 URL: https://svnweb.freebsd.org/changeset/base/346539 Log: Fix `get_int_via_sysctlbyname(..)` on Jenkins Initialize `oldlen` to the size of the value, instead of leaving the value unitialized. Leaving it unitialized seems to work by accident on amd64 when running 64-bit programs, but not on i386. This matches patterns in use in other programs. PR: 237458 Approved by: emaste (mentor; implicit) MFC after: 1 week Tested on: ^/head (amd64), ^/stable/11 (i386) Changes: head/lib/libc/tests/sys/sendfile_test.c
A commit references this bug: Author: ngie Date: Mon Apr 29 19:11:56 UTC 2019 New revision: 346911 URL: https://svnweb.freebsd.org/changeset/base/346911 Log: MFC r346539: Fix `get_int_via_sysctlbyname(..)` on Jenkins Initialize `oldlen` to the size of the value, instead of leaving the value unitialized. Leaving it unitialized seems to work by accident on amd64 when running 64-bit programs, but not on i386. This matches patterns in use in other programs. PR: 237458 Tested on: ^/head (amd64), ^/stable/11 (i386) Changes: _U stable/11/ stable/11/lib/libc/tests/sys/sendfile_test.c
A commit references this bug: Author: ngie Date: Mon Apr 29 19:12:48 UTC 2019 New revision: 346912 URL: https://svnweb.freebsd.org/changeset/base/346912 Log: MFC r346539: Fix `get_int_via_sysctlbyname(..)` on Jenkins Initialize `oldlen` to the size of the value, instead of leaving the value unitialized. Leaving it unitialized seems to work by accident on amd64 when running 64-bit programs, but not on i386. This matches patterns in use in other programs. PR: 237458 Tested on: ^/head (amd64), ^/stable/11 (i386) Changes: _U stable/12/ stable/12/lib/libc/tests/sys/sendfile_test.c