what about debug with max verbose output?
also log file can be specified with -E log_file
Bash:
sysrc sshd_flags="-ddd"
sysrc sshd_flags="-ddd"
When you say, "disabled"...? `aesni` is compiled into the kernel so setting `aesni_load="NO"` probably has no effect.Crashed again with aesni disabled. So I think it's safe to say this is not caused by some kind of virtual crypto offload.
fatal: pack_hostkeys: serialize hostkey private: string is too large
getent passwd root
getent group wheel
id root
FreeBSD: 14.4-RELEASE-p7 amd64
Kernel/userland: 14.4-RELEASE-p7 / 14.4-RELEASE-p7
Virtualization: kvm
vCPU: 1
RAM: 1 GiB
aesni_load="YES"
cc_htcp_load="YES"
crypto_load="YES"
# cryptodev_load="YES" # disabled temporarily while investigating recurring sshd crashes
virtio_random_load="YES"
virtio_random.ko
cc_htcp.ko
pf.ko
'VirtIO Entropy Adapter','Intel Secure Key RNG'
permitrootlogin no
passwordauthentication no
kbdinteractiveauthentication no
hostkeyalgorithms ssh-ed25519
hostkey /etc/ssh/ssh_host_ed25519_key
subsystem sftp /usr/libexec/sftp-server
maxstartups 3:30:10
group: files
hosts: files dns
networks: files
passwd: files
shells: files
services: files
protocols: files
rpc: files
pwd_mkdb -C /etc/master.passwd
chkgrp /etc/group
#!/bin/sh
ulimit -c unlimited
iteration=1
max_iterations=1000
result=0
while [ "$iteration" -le "$max_iterations" ]; do
echo "ITERATION $iteration: getent passwd root"
getent passwd root >/dev/null
rc=$?
if [ "$rc" -ne 0 ]; then
echo "FAILURE: getent passwd root failed at iteration $iteration with rc=$rc"
result=10
break
fi
echo "ITERATION $iteration: getent group wheel"
getent group wheel >/dev/null
rc=$?
if [ "$rc" -ne 0 ]; then
echo "FAILURE: getent group wheel failed at iteration $iteration with rc=$rc"
result=12
break
fi
echo "ITERATION $iteration: id root"
id root >/dev/null
rc=$?
if [ "$rc" -ne 0 ]; then
echo "FAILURE: id root failed at iteration $iteration with rc=$rc"
result=13
break
fi
iteration=$((iteration + 1))
done
if [ "$result" -eq 0 ]; then
echo "RESULT: completed $max_iterations iterations without failure"
else
echo "RESULT: reproducer failed with result=$result"
fi
exit "$result"
14.4-RELEASE-p7
14.4-RELEASE-p7
Virtualization: hv
vCPU: 1
RAM: 4 GiB
Relevant loaded modules: cryptodev.ko, zfs.ko, mac_ntpd.ko
Random source: Intel Secure Key RNG
comparison host: 5/5 runs completed 1000 iterations without failure
affected host: 4/5 runs completed 1000 iterations without failure; 1/5 failed
FAILURE: getent group wheel failed at iteration 679 with rc=139
Segmentation fault (core dumped)
RESULT: reproducer failed with result=12
* thread #1, name = 'getent', stop reason = signal SIGSEGV
* frame #0: libc.so.7`strcasecmp_l + 118
frame #1: libc.so.7`bsearch + 70
frame #2: libc.so.7`_nsdbtaddsrc + 139
frame #3: libc.so.7`_nsyyparse + 1099
frame #4: libc.so.7`_nsdispatch + 976
frame #5: libc.so.7`setgroupent + 44
frame #6: getent
/usr/bin/getent
/lib/libc.so.7
/libexec/ld-elf.so.1
FAILURE: getent group wheel failed at iteration 581 with rc=139
Segmentation fault (core dumped)
ITERATION 172: getent passwd root
ITERATION 172: getent group wheel
Segmentation fault (core dumped)
FAILURE: getent group wheel failed at iteration 172 with rc=139
RESULT: reproducer failed with result=12
libc.so.7`strcasecmp_l
libc.so.7`bsearch
libc.so.7`_nsdbtaddsrc
libc.so.7`_nsyyparse
libc.so.7`_nsdispatch
setgroupent / setpassent / getpwnam
KVM/Vultr versus Hyper-V
VirtIO Entropy Adapter
1 GiB RAM versus 4 GiB RAM
loaded kernel modules
provider image versus clean FreeBSD ISO installation
local system state
1. Deploy a fresh Vultr instance from the official FreeBSD ISO and run the reproducer.
2. If the failure still occurs, test with virtio_random disabled.
3. If it persists, attempt reproduction on a non-Vultr KVM or bhyve VM.
4. Optionally test the affected host with the default nsswitch.conf as another control.
5. Optionally test in single-user mode to reduce background activity.
So maybe getting the dbg sysmbols in base installed and having that sysctl turned on should be considered. And then I guess "wait" for core to drop.
# gdb -q login
Reading symbols from login...
Reading symbols from /usr/lib/debug//usr/bin/login.debug...
(gdb) core /root/login.core
[New LWP 100369]
warning: Can't read pathname for load map.
warning: Can't read pathname for load map.
warning: Can't read pathname for load map.
warning: Can't read pathname for load map.
warning: Can't read pathname for load map.
warning: Can't read pathname for load map.
warning: Can't read pathname for load map.
warning: Can't read pathname for load map.
Core was generated by `login'.
Program terminated with signal SIGSEGV, Segmentation fault.
Address not mapped to object.
#0 0x0000098f6e706780 in ?? ()
(gdb) bt
#0 0x0000098f6e706780 in ?? ()
#1 0x0000098f749caa0d in thr_fork_impl (a=0x98f66021a48) at /usr/src/lib/libthr/thread/thr_fork.c:179
#2 0x0000098f749ca988 in __thr_fork () at /usr/src/lib/libthr/thread/thr_fork.c:319
#3 0x0000098745275eaf in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/usr.bin/login/login.c:548
(gdb)
pid 1723 (sshd), jid 0, uid 0: exited on signal 11
getent passwd root
getent group wheel
id root
strcasecmp_l
_nsdbtput
_nsyyparse
_nsdispatch
setpassent
getent
strcasecmp_l
bsearch
_nsdbtaddsrc
_nsyyparse
_nsdispatch
setpassent
getent
group: compat
group_compat: nis
passwd: compat
passwd_compat: nis
50,000 x getent passwd root
plus
20,000 cycles of:
getent passwd root
getent group wheel
id root
= approximately 110,000 relevant calls
/lib/libc.so.7
95b6597787b89cec982f44bee5e9af2cf0cd5e5258c1a20ae9cadf8f0421ea5b
/usr/bin/getent
90334c62aa9ba4f2972c99f4691502cfd38ad2114736994e198ec2c1c241a9e9
/usr/bin/id
3104fbf4fc5beccda9c032148dd1f2740d088832c87d099eb8133f3047dfa417
/usr/sbin/sshd
b0f7a9fa64cab1e2f7243bb7fc0ff86f6c115cc2900ba04d1a852dc12b142aa9
1 vCPU
1 GiB RAM
SeaBIOS
i440FX/PIIX machine
VirtIO block device
VirtIO network device
KVM
ZFS root
Hypervisor: Origin = "KVMKVMKVM"
50,000 x getent passwd root
plus
20,000 cycles of:
getent passwd root
getent group wheel
id root
freebsd-version -kru
15.1-RELEASE-p2
15.1-RELEASE-p2
15.1-RELEASE-p2
50,000 getent passwd calls
60,000 calls in a mixed NSS test
300,000 calls in five additional rounds
410,000 post-p2 calls
520,000 relevant NSS calls
A: Vultr-provided image
Vultr + KVM/QEMU/VirtIO + FreeBSD 15.1-p2
FAIL
B: Official FreeBSD ISO
Vultr + KVM/QEMU/VirtIO + FreeBSD 15.1-p2
PASS
C: Official FreeBSD ISO
Proxmox + QEMU/KVM/VirtIO + FreeBSD 15.1-p2
PASS
#!/bin/sh
ulimit -c unlimited
iteration=1
max_iterations=500000
result=0
while [ "$iteration" -le "$max_iterations" ]; do
echo "ITERATION $iteration: getent passwd root"
getent passwd root >/dev/null
rc=$?
if [ "$rc" -ne 0 ]; then
echo "FAILURE: getent passwd root failed at iteration $iteration with rc=$rc"
result=10
break
fi
echo "ITERATION $iteration: getent group wheel"
getent group wheel >/dev/null
rc=$?
if [ "$rc" -ne 0 ]; then
echo "FAILURE: getent group wheel failed at iteration $iteration with rc=$rc"
result=12
break
fi
echo "ITERATION $iteration: id root"
id root >/dev/null
rc=$?
if [ "$rc" -ne 0 ]; then
echo "FAILURE: id root failed at iteration $iteration with rc=$rc"
result=13
break
fi
iteration=$((iteration + 1))
done
if [ "$result" -eq 0 ]; then
echo "RESULT: completed $max_iterations iterations without failure"
else
echo "RESULT: reproducer failed with result=$result"
fi
exit "$result"
ITERATION 499994: getent passwd root
ITERATION 499994: getent group wheel
ITERATION 499994: id root
ITERATION 499995: getent passwd root
ITERATION 499995: getent group wheel
ITERATION 499995: id root
ITERATION 499996: getent passwd root
ITERATION 499996: getent group wheel
ITERATION 499996: id root
ITERATION 499997: getent passwd root
ITERATION 499997: getent group wheel
ITERATION 499997: id root
ITERATION 499998: getent passwd root
ITERATION 499998: getent group wheel
ITERATION 499998: id root
ITERATION 499999: getent passwd root
ITERATION 499999: getent group wheel
ITERATION 499999: id root
ITERATION 500000: getent passwd root
ITERATION 500000: getent group wheel
ITERATION 500000: id root
RESULT: completed 500000 iterations without failure
freebsd-update IDS but it doesn't find any issues.fatal: pack_hostkeys: serialize hostkey private: string is too large
unless there is a really, REALLY bad bug (e.g. memory contents leaking between VMs) in the hypervisor this shouldn't matter. However, since we're talking about KVM and (most likely) also qemu, I wouldn't rule that out since both are quite bloated with decades of cruft...Mine is a shared resource VPS.
Mine are all the same instance type, all shared resource. The only difference is whether I use the prebuilt image or build my own. There must be some difference in the instance settings they use with the prebuilt images.Maybe it has something to do with the instance type? Mine is a shared resource VPS.