Applications killed randomly on arm64 without swap

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
adr
Reply | Threaded
Open this post in threaded view
|

Applications killed randomly on arm64 without swap

adr
I've been experiencing random killings of applications on an rpi4-8G,
including addons and tabs on iridium. I'm using current.

It doesn't matter if I limit the ram to 3G, or if ACPI is
enable or not.

This only happens with the multiprocessor kernel.

At first I thought that it was something exclusive to the rpi code
because I have an h5 board running and compiling without any problem.
Then I remembered some similar behavior when the file system of the
swap (it is a file) were dirty and the h5 board started without
swap.

I created a swap file and now all seams to be fine. The good news
is that this workaround will not make any impact on performance
because the swap is _not_ used. I have been compiling ports taking
a look at top.

So I imagine you have some kind of race in the arm64 MP code, the
system test for swap space to page out and then kills the process.
The funny thing is that the swap is not (apparently) used.

I'm afraid that this has to be fixed directly, some developer of
arm64 familiar with the MP code (Mark Kettenis?) has to take a
look... or not, just an advise.

Regards,
adr.

PS for your convinience:

OpenBSD 6.8-current (GENERIC.MP) #970: Sun Jan 10 14:39:07 MST 2021
    [hidden email]:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 8378908672 (7990MB)
avail mem = 8089104384 (7714MB)
random: good seed from bootblocks
mainbus0 at root: Raspberry Pi 4 Model B Rev 1.4
psci0 at mainbus0: PSCI 1.1, SMCCC 1.2
cpu0 at mainbus0 mpidr 0: ARM Cortex-A72 r0p3
cpu0: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu0: 1024KB 64b/line 16-way L2 cache
cpu0: CRC32
cpu1 at mainbus0 mpidr 1: ARM Cortex-A72 r0p3
cpu1: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu1: 1024KB 64b/line 16-way L2 cache
cpu1: CRC32
cpu2 at mainbus0 mpidr 2: ARM Cortex-A72 r0p3
cpu2: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu2: 1024KB 64b/line 16-way L2 cache
cpu2: CRC32
cpu3 at mainbus0 mpidr 3: ARM Cortex-A72 r0p3
cpu3: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu3: 1024KB 64b/line 16-way L2 cache
cpu3: CRC32
efi0 at mainbus0: UEFI 2.7
efi0: https://github.com/pftf/RPi4 rev 0x10000
smbios0 at efi0: SMBIOS 3.3.0
smbios0: vendor https://github.com/pftf/RPi4 version "UEFI Firmware v1.21" date 11/13/2020
smbios0: Raspberry Pi Foundation Raspberry Pi 4 Model B
apm0 at mainbus0
"system" at mainbus0 not configured
"axi" at mainbus0 not configured
simplebus0 at mainbus0: "soc"
bcmclock0 at simplebus0
bcmmbox0 at simplebus0
bcmgpio0 at simplebus0
bcmaux0 at simplebus0
ampintc0 at simplebus0 nirq 256, ncpu 4 ipi: 0, 1: "interrupt-controller"
bcmtmon0 at simplebus0
bcmdmac0 at simplebus0: DMA0 DMA2 DMA4 DMA5 DMA6 DMA7 DMA8 DMA9
"timer" at simplebus0 not configured
bcmirng0 at simplebus0
pluart0 at simplebus0
com0 at simplebus0: ns16550, no working fifo
"local_intc" at simplebus0 not configured
bcmdog0 at simplebus0
simplebus1 at simplebus0: "firmware"
"clocks" at simplebus1 not configured
"gpio" at simplebus1 not configured
"power" at simplebus0 not configured
"mailbox" at simplebus0 not configured
sdhc0 at simplebus0
sdhc0: SDHC 3.0, 250 MHz base clock
sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed
"gpiomem" at simplebus0 not configured
"fb" at simplebus0 not configured
"vcsm" at simplebus0 not configured
"clocks" at mainbus0 not configured
"phy" at mainbus0 not configured
simplebus2 at mainbus0: "emmc2bus"
sdhc1 at simplebus2
sdhc1: SDHC 3.0, 100 MHz base clock
sdmmc1 at sdhc1: 8-bit, sd high-speed, mmc high-speed, ddr52, dma
"arm-pmu" at mainbus0 not configured
agtimer0 at mainbus0: tick rate 54000 KHz
simplebus3 at mainbus0: "scb"
bcmpcie0 at simplebus3
pci0 at bcmpcie0
ppb0 at pci0 dev 0 function 0 "Broadcom BCM2711" rev 0x10
pci1 at ppb0 bus 1
xhci0 at pci1 dev 0 function 0 "VIA VL805 xHCI" rev 0x01: intx, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "VIA xHCI root hub" rev 3.00/1.00 addr 1
bse0 at simplebus3: address dc:a6:32:c2:64:74
brgphy0 at bse0 phy 1: BCM54210E 10/100/1000baseT PHY, rev. 2
"dma" at simplebus3 not configured
"hevc-decoder" at simplebus3 not configured
"rpivid-local-intc" at simplebus3 not configured
"h264-decoder" at simplebus3 not configured
"vp9-decoder" at simplebus3 not configured
"leds" at mainbus0 not configured
"sd_io_1v8_reg" at mainbus0 not configured
"fixedregulator_3v3" at mainbus0 not configured
"fixedregulator_5v0" at mainbus0 not configured
simplebus4 at mainbus0: "v3dbus"
"clk-108M" at mainbus0 not configured
"sd_vcc_reg" at mainbus0 not configured
simplefb0 at mainbus0: 1920x1080, 32bpp
wsdisplay0 at simplefb0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
sdmmc1: can't enable card
uhub1 at uhub0 port 1 configuration 1 interface 0 "VIA Labs USB2.0 Hub" rev 2.10/4.21 addr 2
uhub2 at uhub1 port 1 configuration 1 interface 0 "GenesysLogic USB2.0 Hub" rev 2.10/4.01 addr 3
uhidev0 at uhub2 port 1 configuration 1 interface 0 " USB Keyboard" rev 1.10/4.06 addr 4
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SC16G, 0080> removable
sd0: 15193MB, 512 bytes/sector, 31116288 sectors
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub2 port 1 configuration 1 interface 1 " USB Keyboard" rev 1.10/4.06 addr 4
uhidev1: iclass 3/0, 2 report ids
uhid0 at uhidev1 reportid 1: input=1, output=0, feature=0
uhid1 at uhidev1 reportid 2: input=3, output=0, feature=0
uhidev2 at uhub1 port 3 configuration 1 interface 0 "PixArt USB Optical Mouse" rev 1.10/1.00 addr 5
uhidev2: iclass 3/1
ums0 at uhidev2: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
uaudio0 at uhub1 port 4 configuration 1 interface 1 "GeneralPlus USB Audio Device" rev 1.10/1.00 addr 6
uaudio0: class v1, full-speed, sync, channels: 2 play, 1 rec, 8 ctls
audio0 at uaudio0
uhidev3 at uhub1 port 4 configuration 1 interface 3 "GeneralPlus USB Audio Device" rev 1.10/1.00 addr 6
uhidev3: iclass 3/0
uhid2 at uhidev3: input=1, output=0, feature=0
uhub3 at uhub0 port 2 configuration 1 interface 0 "GenesysLogic USB3.0 Hub" rev 3.00/4.01 addr 7
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on sd0a (fcaf18c6524b96db.a) swap on sd0b dump on sd0b
WARNING: clock lost 61 days
WARNING: CHECK AND RESET THE DATE!
gpio0 at bcmgpio0: 58 pins
--

adr
Reply | Threaded
Open this post in threaded view
|

Re: Applications killed randomly on arm64 without swap

adr
On Fri, Jan 15, 2021 at 10:44:03PM +0000, [hidden email] wrote:
> I've been experiencing random killings of applications on an rpi4-8G,
> including addons and tabs on iridium. I'm using current.
>
> It doesn't matter if I limit the ram to 3G, or if ACPI is
> enable or not.
>
> This only happens with the multiprocessor kernel.

Just to be clear, the swap is not needed in any of this situations,
plenty of free ram:

$ top -d1
load averages:  0.12,  0.12,  0.06    r4.my.domain 00:40:37
74 processes: 73 idle, 1 on processor  up  6:58
CPU0 states: 19.1% user,  0.0% nice,  3.8% sys,  0.7% spin,  0.0% intr, 76.4% idle
CPU1 states: 20.7% user,  0.0% nice,  5.3% sys,  1.1% spin,  0.0% intr, 72.9% idle
CPU2 states: 20.8% user,  0.0% nice,  5.1% sys,  1.0% spin,  0.0% intr, 73.1% idle
CPU3 states: 20.2% user,  0.0% nice,  4.6% sys,  0.9% spin,  0.0% intr, 74.3% idle
Memory: Real: 1310M/3019M act/tot Free: 4695M Cache: 1006M Swap: 0K/250M

  PID USERNAME PRI NICE  SIZE   RES STATE     WAIT      TIME    CPU COMMAND
59907 _x11       2    0   42M   52M sleep/3   poll    101:17  1.66% Xorg
67045 adr        2    0 5172K   13M sleep/0   select    0:00  0.15% xterm
13536 adr        2    0  145M   86M idle      poll     55:22  0.00% iridium
 1212 adr        2    0   76M  104M sleep/1   poll     10:22  0.00% netsurf-gtk3
55372 adr        2    0  222M  167M sleep/1   poll      6:50  0.00% iridium
57416 _sndio     2  -20  760K 1368K idle      poll      6:36  0.00% sndiod
 9243 adr       10    0  138M   47M sleep/1   fsleep    2:35  0.00% iridium
55788 adr       10    0  146M   60M idle      fsleep    2:08  0.00% iridium
 9008 adr       10    0  205M  111M idle      fsleep    0:40  0.00% iridium
82955 adr       10    0  196M   95M idle      fsleep    0:35  0.00% iridium
54906 adr       10    0  217M  146M idle      fsleep    0:28  0.00% iridium
58502 adr       10    0  204M  135M idle      fsleep    0:24  0.00% iridium
12123 adr        2    0  624K 2580K sleep/2   poll      0:23  0.00% ssh-agent
 9039 adr        2    0 3548K 4616K idle      poll      0:19  0.00% at-spi-bus-launc
73961 adr        2    0 2556K 5352K sleep/0   poll      0:17  0.00% at-spi2-registry
67744 adr       10    0  201M  135M idle      fsleep    0:16  0.00% iridium
12361 adr       10    0  201M  136M sleep/1   fsleep    0:13  0.00% iridium
62399 root      10    0 1024M  418M sleep/1   mfsidl    0:12  0.00% mount_mfs

$ vmstat
 procs    memory       page                    disk traps          cpu
 r   s   avm     fre  flt  re  pi  po  fr  sr sd0  int   sys   cs us sy id
 1 277 1310M   4696M 1038   0   0   0   0   0   1    0  7728 3476 20  6 74