nohang: System freezes, nohang-desktop only works sometimes

I tested nohang with --memload but once all the ram is used up the whole system freezes as swap starts getting full, but really the whole system is completely locked-up. I thought my swapfile was too small so I made it match my ram (12 GB) but the system still gets frozen.

I changed the default nohang-desktop config and made the soft and hard thresholds a bit bigger but I get the same results. Randomly after 10-30 minutes with a frozen system either it reboots or it recovers and the system becomes responsive again. What logs can I provide? I’m gonna put something, I hope it’s useful.

journalctl -eu nohang-desktop
Feb 12 14:32:02 laptop nohang-desktop[11871]: Memory status that requires corrective actions:
Feb 12 14:32:02 laptop nohang-desktop[11871]:   MemAvailable [54 MiB, 0.5 %] <= soft_threshold_min_mem [947 MiB, 8.0 %]
Feb 12 14:32:03 laptop nohang-desktop[11871]:   SwapFree [1466 MiB, 11.9 %] <= soft_threshold_min_swap [1475 MiB, 12.0 %]
Feb 12 14:32:03 laptop nohang-desktop[11871]: max_soft_exit_time is not exceeded (0.8 < 10.0) for the victim
Feb 12 14:32:03 laptop nohang-desktop[11871]: <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Feb 12 14:32:03 laptop nohang-desktop[11871]: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Feb 12 14:32:03 laptop nohang-desktop[11871]: victim_cache_time is not exceeded for 6840186_pid11966 (0.803 < 10.0)
Feb 12 14:32:03 laptop nohang-desktop[11871]: Memory status that requires corrective actions:
Feb 12 14:32:03 laptop nohang-desktop[11871]:   MemAvailable [53 MiB, 0.5 %] <= soft_threshold_min_mem [947 MiB, 8.0 %]
Feb 12 14:32:03 laptop nohang-desktop[11871]:   SwapFree [1466 MiB, 11.9 %] <= soft_threshold_min_swap [1475 MiB, 12.0 %]
Feb 12 14:32:03 laptop nohang-desktop[11871]: New victim is cached victim 11966 (python3)
Feb 12 14:32:03 laptop nohang-desktop[11871]: Recheck memory levels...
Feb 12 14:32:03 laptop nohang-desktop[11871]: Memory status that requires corrective actions:
Feb 12 14:32:03 laptop nohang-desktop[11871]:   MemAvailable [53 MiB, 0.5 %] <= soft_threshold_min_mem [947 MiB, 8.0 %]
Feb 12 14:32:03 laptop nohang-desktop[11871]:   SwapFree [1466 MiB, 11.9 %] <= soft_threshold_min_swap [1475 MiB, 12.0 %]
Feb 12 14:32:03 laptop nohang-desktop[11871]: max_soft_exit_time is not exceeded (0.8 < 10.0) for the victim
Feb 12 14:32:03 laptop nohang-desktop[11871]: <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Feb 12 14:32:03 laptop nohang-desktop[11871]: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Feb 12 14:32:03 laptop nohang-desktop[11871]: victim_cache_time is not exceeded for 6840186_pid11966 (0.855 < 10.0)
Feb 12 14:32:03 laptop nohang-desktop[11871]: Memory status that requires corrective actions:
Feb 12 14:32:03 laptop nohang-desktop[11871]:   MemAvailable [53 MiB, 0.4 %] <= soft_threshold_min_mem [947 MiB, 8.0 %]
Feb 12 14:32:03 laptop nohang-desktop[11871]:   SwapFree [1466 MiB, 11.9 %] <= soft_threshold_min_swap [1475 MiB, 12.0 %]
Feb 12 14:32:03 laptop nohang-desktop[11871]: New victim is cached victim 11966 (python3)
Feb 12 14:32:03 laptop nohang-desktop[11871]: Recheck memory levels...
Feb 12 14:32:03 laptop nohang-desktop[11871]: Memory status that requires corrective actions:
Feb 12 14:32:03 laptop nohang-desktop[11871]:   MemAvailable [53 MiB, 0.4 %] <= soft_threshold_min_mem [947 MiB, 8.0 %]
Feb 12 14:32:03 laptop nohang-desktop[11871]:   SwapFree [1466 MiB, 11.9 %] <= soft_threshold_min_swap [1475 MiB, 12.0 %]
Feb 12 14:32:03 laptop nohang-desktop[11871]: max_soft_exit_time is not exceeded (0.9 < 10.0) for the victim
Feb 12 14:32:03 laptop nohang-desktop[11871]: <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<```

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 28 (18 by maintainers)

Commits related to this issue

Most upvoted comments

I see a bug with with finding DISPLAY: nohang found :9 instead of :99.0. Maybe I should exclude displays like :99. In your case DISPLAY=:99.0 is used only by dropbox in flatpak:

https://github.com/hakavlad/nohang/commit/72b1197aff32fa7d0265b23c899011a0bb1dead9

I will see how to enable PSI

PSI is included in Linux kernel versions 4.20 and up. Also make sure CONFIG_PSI=y is set in the build configuration. You can check this by cat /proc/config.gz | grep PSI

Your distribution might build the kernel with PSI support but disable the feature per default (CONFIG_PSI_DEFAULT_DISABLED), in which case you need to pass psi=1 on the kernel command line during boot. You can edit kernel boot parameters in your grub2 config.