On rare occasions, my xterm disappears, and I find a ksh.core lying
around. (Unfortunately the backtrace is nothing but ??.) I've noticed
this for a long time, several releases at least.

When it happens once, it's not unusual for it to happen again a short
time later. When it happened to me today, I ran sh in sh in hopes it
would trigger again later and I'd see an error message. Sure enough:

hostname$ pwd        
/tmp/
sh(69593) in malloc(): write to free mem 0x1aa3c522300[0..7]@96
Abort trap (core dumped) 
hostname$

Here are some factors that might or might not be related:

- A lot of my shell history involved tab completing filenames
  containing Unicode, including double-width characters, which
  on its own triggers rendering bugs in our ksh
- I use vi mode
- I was very low on available processes at the time, lots of
  'unable to fork' etc.

This particular instance happened on a 7.5 box:

OpenBSD 7.5 (GENERIC) #79: Wed Mar 20 15:33:49 MDT 2024
    dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 34278912000 (32690MB)
avail mem = 33218666496 (31679MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xec2b0 (89 entries)
bios0: vendor American Megatrends Inc. version "2205" date 10/09/2014
bios0: ASUS All Series
efi0 at bios0: UEFI 2.3.1
efi0: American Megatrends rev 0x4028f
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT SSDT SSDT SSDT MCFG HPET SSDT SSDT
acpi0: wakeup devices PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) PEGP(S4) 
UAR1(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) 
PXSX(S4) RP05(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz, 3292.45 MHz, 06-3c-03, patch 
00000028
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 
8-way L2 cache, 6MB 64b/line 12-way L3 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4, IBE
cpu at mainbus0: not configured
cpu at mainbus0: not configured
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 8 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf8000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 2 (RP01)
acpiprt5 at acpi0: bus -1 (RP02)
acpiprt6 at acpi0: bus 3 (RP03)
acpiprt7 at acpi0: bus 4 (RP04)
acpiprt8 at acpi0: bus -1 (RP05)
acpiprt9 at acpi0: bus -1 (RP06)
acpiprt10 at acpi0: bus 5 (RP07)
acpiprt11 at acpi0: bus -1 (RP08)
acpiec0 at acpi0: not present
acpipci0 at acpi0 PCI0: 0x00000010 0x00000011 0x00000000
acpicmos0 at acpi0
com0 at acpi0 UAR1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo
"PNP0C14" at acpi0 not configured
acpibtn0 at acpi0: PWRB
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0A0A" at acpi0 not configured
"PNP0C14" at acpi0 not configured
acpicpu0 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PG00, resource for PEG0
acpipwrres1 at acpi0: PG01, resource for PEG1
acpipwrres2 at acpi0: PG02, resource for PEG2
acpipwrres3 at acpi0: FN00, resource for FAN0
acpipwrres4 at acpi0: FN01, resource for FAN1
acpipwrres5 at acpi0: FN02, resource for FAN2
acpipwrres6 at acpi0: FN03, resource for FAN3
acpipwrres7 at acpi0: FN04, resource for FAN4
acpitz0 at acpi0: critical temperature is 105 degC
acpitz1 at acpi0: critical temperature is 105 degC
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: using VERW MDS workaround (except on vmm entry)
cpu0: Enhanced SpeedStep 3292 MHz: speeds: 3301, 3300, 3100, 2900, 2800, 2600, 
2400, 2200, 2000, 1900, 1700, 1500, 1300, 1200, 1000, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x06
ppb0 at pci0 dev 1 function 0 "Intel Core 4G PCIE" rev 0x06: msi
pci1 at ppb0 bus 1
radeondrm0 at pci1 dev 0 function 0 "ATI Radeon HD 5450" rev 0x00
drm0 at radeondrm0
radeondrm0: msi
azalia0 at pci1 dev 0 function 1 "ATI Radeon HD 5470 Audio" rev 0x00: msi
azalia0: no supported codecs
xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x00: msi, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 
addr 1
"Intel 9 Series MEI" rev 0x00 at pci0 dev 22 function 0 not configured
ehci0 at pci0 dev 26 function 0 "Intel 9 Series USB" rev 0x00: apic 8 int 20
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 
addr 1
azalia1 at pci0 dev 27 function 0 "Intel 9 Series HD Audio" rev 0x00: msi
azalia1: codecs: Realtek ALC887
audio0 at azalia1
ppb1 at pci0 dev 28 function 0 "Intel 9 Series PCIE" rev 0xd0: msi
pci2 at ppb1 bus 2
nvme0 at pci2 dev 0 function 0 "Samsung SM981/PM981 NVMe" rev 0x00: msix, NVMe 
1.3
nvme0: Samsung SSD 970 EVO 500GB, firmware 2B2QEXE7, serial S466NX1KB27570N
scsibus1 at nvme0: 2 targets, initiator 0
sd0 at scsibus1 targ 1 lun 0: <NVMe, Samsung SSD 970, 2B2Q>
sd0: 476940MB, 512 bytes/sector, 976773168 sectors
ppb2 at pci0 dev 28 function 2 "Intel 9 Series PCIE" rev 0xd0: msi
pci3 at ppb2 bus 3
re0 at pci3 dev 0 function 0 "Realtek 8168" rev 0x11: RTL8168G/8111G (0x4c00), 
msi, address 08:62:66:2e:95:0a
rgephy0 at re0 phy 7: RTL8251 PHY, rev. 0
ppb3 at pci0 dev 28 function 3 "Intel 9 Series PCIE" rev 0xd0: msi
pci4 at ppb3 bus 4
vendor "Conexant", unknown product 0x8880 (class multimedia subclass video, rev 
0x04) at pci4 dev 0 function 0 not configured
ppb4 at pci0 dev 28 function 6 "Intel 9 Series PCIE" rev 0xd0: msi
pci5 at ppb4 bus 5
em0 at pci5 dev 0 function 0 "Intel 82576" rev 0x01: msi, address 
6c:b3:11:1b:e0:7a
em1 at pci5 dev 0 function 1 "Intel 82576" rev 0x01: msi, address 
6c:b3:11:1b:e0:7b
ehci1 at pci0 dev 29 function 0 "Intel 9 Series USB" rev 0x00: apic 8 int 23
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 
addr 1
pcib0 at pci0 dev 31 function 0 "Intel H97 LPC" rev 0x00
ahci0 at pci0 dev 31 function 2 "Intel 9 Series AHCI" rev 0x00: msi, AHCI 1.3
ahci0: port 0: 6.0Gb/s
ahci0: port 1: 6.0Gb/s
ahci0: port 2: 6.0Gb/s
ahci0: port 3: 6.0Gb/s
scsibus2 at ahci0: 32 targets
sd1 at scsibus2 targ 0 lun 0: <ATA, Samsung SSD 860, RVT0> naa.5002538e40a4c671
sd1: 476940MB, 512 bytes/sector, 976773168 sectors, thin
ichiic0 at pci0 dev 31 function 3 "Intel 9 Series SMBus" rev 0x00: apic 8 int 18
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800
spdmem1 at iic0 addr 0x51: 8GB DDR3 SDRAM PC3-12800
spdmem2 at iic0 addr 0x52: 8GB DDR3 SDRAM PC3-12800
spdmem3 at iic0 addr 0x53: 8GB DDR3 SDRAM PC3-12800
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0 mux 1
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
wbsio0 at isa0 port 0x2e/2: NCT6791D rev 0x03
wbsio0 port 0x290/2 not configured
vmm0 at mainbus0: VMX/EPT
efifb at mainbus0 not configured
uhidev0 at uhub0 port 12 configuration 1 interface 0 "Yubico YubiKey 
OTP+FIDO+CCID" rev 2.00/5.26 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
uhidev1 at uhub0 port 12 configuration 1 interface 1 "Yubico YubiKey 
OTP+FIDO+CCID" rev 2.00/5.26 addr 2
uhidev1: iclass 3/0
fido0 at uhidev1: input=64, output=64, feature=0
ugen0 at uhub0 port 12 configuration 1 "Yubico YubiKey OTP+FIDO+CCID" rev 
2.00/5.26 addr 2
uhidev2 at uhub0 port 13 configuration 1 interface 0 "Logitech USB Laser Mouse" 
rev 2.00/56.01 addr 3
uhidev2: iclass 3/1
ums0 at uhidev2: 8 buttons, Z and W dir
wsmouse0 at ums0 mux 0
uhidev3 at uhub0 port 14 configuration 1 interface 0 "Microsoft Natural\M-. 
Ergonomic Keyboard 4000" rev 2.00/1.73 addr 4
uhidev3: iclass 3/1
ukbd1 at uhidev3: 8 variable keys, 6 key codes
wskbd2 at ukbd1 mux 1
uhidev4 at uhub0 port 14 configuration 1 interface 1 "Microsoft Natural\M-. 
Ergonomic Keyboard 4000" rev 2.00/1.73 addr 4
uhidev4: iclass 3/0, 1 report id
ucc0 at uhidev4 reportid 1: 1024 usages, 20 keys, array
wskbd3 at ucc0 mux 1
uhub3 at uhub1 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 
2.00/0.00 addr 2
uhub4 at uhub2 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 
2.00/0.00 addr 2
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd1a (5b38f95c398ae344.a) swap on sd1b dump on sd1b
radeondrm0: CEDAR
radeon_audio_component_init: stub
radeondrm0: 2560x1440, 32bpp
wsdisplay0 at radeondrm0 mux 1
pckbd_enable: command error
EDID block 1 (tag 0xff) checksum is invalid, remainder is 127
wskbd1: connecting to wsdisplay0
wskbd2: connecting to wsdisplay0
wskbd3: connecting to wsdisplay0
wsdisplay0: screen 0-5 added (std, vt100 emulation)

Reply via email to