System Freeze completly during pacman upgrade of kernel packages

When I do a full update the packages download works fine as well as the installation of “regular” packages. Then the system hangs and becomes unusabale for a few minutes when it upgrade kernel module ( pasted below)

281/416) upgrading linux-firmware                                                                                                             [########################################################################################] 100%
(282/416) upgrading mkinitcpio-busybox                                                                                                         [########################################################################################] 100%
(283/416) upgrading linux414                                                                                                                   [########################################################################################] 100%
(284/416) upgrading linux414-r8168                                                                                                             [########################################################################################] 100%
(285/416) upgrading linux419                                                                                                                   [########################################################################################] 100%
(286/416) upgrading linux419-r8168                                                                                                             [########################################################################################] 100%
(287/416) upgrading linux54                                                                                                                    [########################################################################################] 100%
(288/416) upgrading linux54-r8168                                                                                                              [########################################################################################] 100%

Cpu and ram are low during the freeze so I’m not sure what cause this. I’ve never had that before on any other OS nor Manjaro.

Moreover, I think I’ve had the problem since the installation 2 year ago, I’m not sure. Usually I upgrade when I’m afk.

Thanks,

F.f

You haven’t give us any system information but those are very disk-intensive operations so if you still have spinning rust a 5400 RPM HDD that could be causing the “freeze” as CPU wait time is not taken into account in all CPU monitors and the system is just waiting for disk I/O to finish.

:thinking:

The os is on a a nvme ssd. So that shouldn’t be an issues, isn’t?

inxi --admin --verbosity=7 --filter --no-host --width
System:
  Kernel: 5.4.112-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.4-x86_64 
  root=UUID=30a427ca-5791-4920-aced-f594086744ca rw quiet 
  cryptdevice=UUID=5a87230c-02e9-4b45-b42c-bfb1a2e5ad19:luks-5a87230c-02e9-4b45-b42c-bfb1a2e5ad19 
  root=/dev/mapper/luks-5a87230c-02e9-4b45-b42c-bfb1a2e5ad19 
  resume=/dev/mapper/luks-5a87230c-02e9-4b45-b42c-bfb1a2e5ad19 
  Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm4 vt: 7 
  dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME H310M-A v: Rev X.0x 
  serial: <filter> UEFI: American Megatrends v: 0803 date: 06/20/2018 
Battery:
  Message: No system battery data found. Is one present? 
Memory:
  RAM: total: 31.22 GiB used: 5.31 GiB (17.0%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: 6-Core model: Intel Core i5-8600 bits: 64 type: MCP arch: Kaby Lake 
  note: check family: 6 model-id: 9E (158) stepping: A (10) microcode: DE 
  cache: L2: 9 MiB bogomips: 37213 
  Speed: 800 MHz min/max: 800/4300 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 
  4: 800 5: 800 6: 800 
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon art 
  avx avx2 bmi1 bmi2 bts clflush clflushopt cmov constant_tsc cpuid 
  cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est 
  f16c flexpriority flush_l1d fma fpu fsgsbase fxsr hle ht hwp hwp_act_window 
  hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid invpcid_single lahf_lm lm 
  mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae pat 
  pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts 
  rdrand rdseed rdtscp rep_good rtm sdbg sep smap smep smx ss ssbd sse sse2 
  sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust 
  tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt 
  xsaves xtopology xtpr 
  Vulnerabilities: Type: itlb_multihit status: KVM: Vulnerable 
  Type: l1tf mitigation: PTE Inversion 
  Type: mds mitigation: Clear CPU buffers; SMT disabled 
  Type: meltdown mitigation: PTI 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, 
  IBRS_FW, STIBP: disabled, RSB filling 
  Type: srbds mitigation: Microcode 
  Type: tsx_async_abort mitigation: Clear CPU buffers; SMT disabled 
Graphics:
  Device-1: Intel UHD Graphics 630 vendor: ASUSTeK driver: i915 v: kernel 
  bus-ID: 00:02.0 chip-ID: 8086:3e92 class-ID: 0300 
  Device-2: ARC Camera type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-3:2 
  chip-ID: 05a3:9331 class-ID: 0102 serial: <filter> 
  Display: x11 server: X.org 1.20.11 driver: loaded: intel 
  unloaded: modesetting alternate: fbdev,vesa resolution: <missing: xdpyinfo> 
  OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.0.2 
  direct render: Yes 
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: ASUSTeK driver: snd_hda_intel 
  v: kernel alternate: snd_soc_skl,snd_sof_pci bus-ID: 00:1f.3 
  chip-ID: 8086:a348 class-ID: 0403 
  Device-2: ARC Camera type: USB driver: snd-usb-audio,uvcvideo bus-ID: 1-3:2 
  chip-ID: 05a3:9331 class-ID: 0102 serial: <filter> 
  Sound Server-1: ALSA v: k5.4.112-1-MANJARO running: yes 
  Sound Server-2: sndio v: N/A running: no 
  Sound Server-3: JACK v: 0.125.0 running: no 
  Sound Server-4: PulseAudio v: 14.2 running: yes 
  Sound Server-5: PipeWire v: 0.3.25 running: no 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: ASUSTeK driver: r8168 v: 8.048.03-NAPI modules: r8169 port: 3000 
  bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200 
  IF: enp2s0 state: up speed: 10 Mbps duplex: half mac: <filter> 
  IP v4: <filter> type: noprefixroute scope: global broadcast: <filter> 
  IP v6: <filter> type: noprefixroute scope: link 
  WAN IP: <filter> 
Bluetooth:
  Message: No bluetooth data found. 
Logical:
  Message: No logical block device data found. 
  Device-1: sda1_crypt maj-min: 254:1 type: LUKS dm: dm-1 size: 3.64 TiB 
  Components: 
  p-1: sda1 maj-min: 8:1 size: 3.64 TiB 
  Device-2: luks-5a87230c-02e9-4b45-b42c-bfb1a2e5ad19 maj-min: 254:0 
  type: LUKS dm: dm-0 size: 111.5 GiB 
  Components: 
  p-1: sdb2 maj-min: 8:18 size: 111.5 GiB 
RAID:
  Message: No RAID data found. 
Drives:
  Local Storage: total: 3.75 TiB used: 2.55 TiB (68.0%) 
  SMART Message: Required tool smartctl not installed. Check --recommends 
  ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD40EZRZ-22GXCB0 
  size: 3.64 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: 5400 rpm serial: <filter> rev: 0A80 scheme: GPT 
  ID-2: /dev/sdb maj-min: 8:16 vendor: Western Digital 
  model: WDS120G2G0B-00EPW0 size: 111.8 GiB block-size: physical: 512 B 
  logical: 512 B speed: 6.0 Gb/s rotation: SSD serial: <filter> rev: 0000 
  scheme: GPT 
  Message: No optical or floppy data found. 
Partition:
  ID-1: / raw-size: 111.5 GiB size: 109.25 GiB (97.98%) 
  used: 84.27 GiB (77.1%) fs: ext4 dev: /dev/dm-0 maj-min: 254:0 
  mapped: luks-5a87230c-02e9-4b45-b42c-bfb1a2e5ad19 label: N/A 
  uuid: 30a427ca-5791-4920-aced-f594086744ca 
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) 
  used: 408 KiB (0.1%) fs: vfat dev: /dev/sdb1 maj-min: 8:17 label: N/A 
  uuid: 00A6-59C6 
  ID-3: /home/<filter>/thiccboi raw-size: 3.64 TiB size: 3.58 TiB (98.40%) 
  used: 2.47 TiB (68.9%) fs: ext4 dev: /dev/dm-1 maj-min: 254:1 
  mapped: sda1_crypt label: N/A uuid: N/A 
Swap:
  Kernel: swappiness: 50 (default 60) cache-pressure: 100 (default) 
  ID-1: swap-1 type: file size: 5.86 GiB used: 0 KiB (0.0%) priority: 100 
  file: /swapfile 
  ID-2: swap-2 type: file size: 20 GiB used: 0 KiB (0.0%) priority: 10 
  file: /home/<filter>/thiccboi/.swapfile 
Unmounted:
  Message: No unmounted partitions found. 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 16 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 1-3:2 info: ARC Camera type: Video,Audio 
  driver: snd-usb-audio,uvcvideo interfaces: 4 rev: 2.0 speed: 480 Mb/s 
  power: 200mA chip-ID: 05a3:9331 class-ID: 0102 serial: <filter> 
  Device-2: 1-5:3 info: Microsoft Basic Optical Mouse v2.0 type: Mouse 
  driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 1.5 Mb/s 
  power: 100mA chip-ID: 045e:00cb class-ID: 0301 
  Device-3: 1-6:4 info: Logitech DeLuxe 250 Keyboard type: Keyboard,HID 
  driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 1.5 Mb/s 
  power: 100mA chip-ID: 046d:c312 class-ID: 0300 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 27.8 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 249 Uptime: 28m wakeups: 0 Init: systemd v: 247 tool: systemctl 
  Compilers: gcc: 10.2.0 clang: 11.1.0 Packages: pacman: 1946 lib: 454 
  Shell: Bash v: 5.1.0 running-in: terminator inxi: 3.3.04

I think it’s simply that your hd is full, at that stage shown, pacman needs disc space to extract the package files.
To gain space you might want to delete old packages using

pacman -Sc

No it isn’t:

I.E.

  • The “drives” section of inxi shows the partitions, so if the disk is fully allocated to partitions, it’s 100% (in this case ~2% isn’t actually allocated)
  • The “partitions” section shows the actual disk usage as per df, so the 109 GB / only has 84 GB in use.

:wink:

No, it isn’t: it’s on an M2 SSD

Well, M2s are much faster than HDDs but even the speed of an M2 isn’t infinite neither, so next time before running a large update, start:

sudo iotop

in another terminal in parallel and then you’ll see it even maxes out a WD M2 green when updating 3 kernels…

:grin: :running_man:

P.S. After you do the above, please don’t forget to come back and click the 3 dots below the answer to mark a solution like this below the answer that helped you most:
Solution
so that the next person that has the exact same problem you just had will benefit from your post as well as your question will now be in the “solved” status.

Thanks for both replies,

I’ve already checked with iotop, disk usage is far from saturating the drive.

I’ve never experienced this on another setup, with a graphic environment or headless or with arch or debian based OS. My laptop has worse spec and a sata ssd (and even before a hdd) and update are smooth.

I’m not talking about a slow down of the system, the whole thing freeze for 10 minutes. I guess I could test if a limiter such as ionice fix the issue but this is not a “normal” behaviour.