Bug 279901 - glibc-2.39-2 and above on the host segfault
Summary: glibc-2.39-2 and above on the host segfault
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bhyve (show other bugs)
Version: 14.1-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-virtualization (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-22 01:17 UTC by holo
Modified: 2024-06-24 03:03 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description holo 2024-06-22 01:17:54 UTC
Reproduction steps:

1. get current arch iso (or other rolling release linux). The following will deal with archlinux
2. boot install medium inside the bhyve vm, and attempt to run any of: [vim, python3, archinstall, gdb (if installed), localedef]
3. all of the above will crash with a segfault (sigsev) and error 4 (cause was a user-mode read resulting in no page being found.)
4. downgrading to glibc-2.39-1 fixes all of the above applications, though in the case of bootstrapping scripts like archinstall, this can be fail to work if, for instance, the script re-downloads glibc.

Existing board post discussing this: https://bbs.archlinux.org/viewtopic.php?id=295802

offending commit: https://sourceware.org/git/?p=glibc.git;a=commit;h=aa4249266e9906c4bc833e4847f4d8feef59504f

Affects:
- Ryzen 5 7600, possibly more AMD Zen3 & Zen4 CPUs

Last working version:
- linux glibc-2.39-1

Relevant /boot/loader.conf:
vmm_load="YES"
hw.vmm.amdvi.enable="1"

Relevant /etc/rc.conf:
vm_enable="YES"
vm_dir="zfs:zroot/vm"

vm-bhyve configuration file:
loader="uefi"
graphics="yes"
xhci_mouse="yes"

cpu="8"
cpu_sockets="1"
cpu_cores="4"
cpu_threads="2"

memory="8G"

ahci_device_limit="8"

network0_type="virtio-net"
network0_switch="public"

disk0_type="nvme"
disk0_name="disk0.img"
Comment 1 tennix 2024-06-23 04:35:32 UTC
Recently I was trying to install nixos-24.05 bhyve vm, the official iso crashed during boot. But 23.11 can be installed without any issues. By searching for the glibc package in different nixos, the nixos-24.05 uses glibc 2.39-52 while nixos-23.11 uses glibc 2.38-77. I think this might be same issue.
Comment 2 Konstantin Belousov freebsd_committer freebsd_triage 2024-06-24 03:03:08 UTC
So what is the instruction that faults?