[RESOLVED] Out of memory error on anything above 5.19.0.11.1
nickdnk
Status: New User - Welcome
Joined: 10 Oct 2022
Posts: 3
Reply Quote
Hello

I know almost nothing about Linux kernels, so excuse my ignorance. I use Liquorix to host CS:GO servers, which has been working fine for a few years.

Now I get "Loading initial ramdisk... error: Out of memory" and no option to continue as soon as the machine boots into 5.19.0.12, 13 and 14. I'm "stuck" on 5.19.0.11.1 because any attempt to upgrade results in that error on boot.

It installs alright, no errors or anything. I tried removing the "broken" version and reinstalling it, and I also just waited a bit as I was hoping it would be fixed in a later version, but there have been a couple of releases since and I see no mention of this error on this forum either.

Edit: If I let it sit for a bit, it continues and gives me this stack trace:

:: Code ::

...
Call Trace:
  <TASK>
  dump_stack_lvl+0x45/0x5e
  panic+0x10c/0x283
  mount_block_root+0x154/0x1fd
  prepare_namespace+0x136/0x165
  ? reset_init+0xd0/0xd0
  kernel_init+0x16/0x130
  ret_from_fork+0x1f/0x30
  </TASK>
Kernel Offset: disabled
---[ end Kernel panic - not syncing:...


inxi output:

:: Code ::

System:
  Host: nicolai-desktop Kernel: 5.19.0-11.1-liquorix-amd64 arch: x86_64
    bits: 64 compiler: gcc v: 9.4.0 Desktop: GNOME v: 3.36.9 tk: GTK v: 3.24.20
    wm: gnome-shell dm: GDM3 Distro: Ubuntu 20.04.5 LTS (Focal Fossa)
Machine:
  Type: Desktop System: Gigabyte product: Z390 M GAMING v: N/A serial: N/A
  Mobo: Gigabyte model: Z390 M GAMING-CF v: x.x serial: N/A
    UEFI: American Megatrends v: F9l date: 09/16/2020
Battery:
  Device-1: hid-F0T815300ESJ1YMAK-battery model: Apple Inc. Magic Keyboard
    serial: N/A charge: N/A status: discharging
CPU:
  Info: 6-core Intel Core i5-9600K [MCP] arch: Coffee Lake speed (MHz):
    avg: 4599
Graphics:
  Device-1: NVIDIA TU106 [GeForce RTX 2070] vendor: Micro-Star MSI
    driver: nvidia v: 510.85.02 arch: Turing pcie: speed: 2.5 GT/s lanes: 16
    bus-ID: 01:00.0 chip-ID: 10de:1f02
  Display: server: X.Org v: 1.20.13 with: Xwayland compositor: gnome-shell
    driver: X: loaded: nvidia unloaded: fbdev,modesetting,nouveau,vesa
    gpu: nvidia resolution: 2560x1440~144Hz
  OpenGL: renderer: NVIDIA GeForce RTX 2070/PCIe/SSE2 v: 4.6.0 NVIDIA
    510.85.02 direct render: Yes
Network:
  Device-1: Intel Ethernet I219-V vendor: Gigabyte driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15bc
Drives:
  Local Storage: total: 11.82 TiB used: 356.89 GiB (2.9%)
Info:
  Processes: 332 Uptime: 9m Memory: 15.57 GiB used: 3.03 GiB (19.5%)
  Init: systemd v: 245 target: graphical (5) default: graphical Compilers:
  gcc: 9.4.0 alt: 8/9 Packages: 2186 pm: dpkg pkgs: 2168 pm: snap pkgs: 18
  Shell: Bash v: 5.0.17 running-in: gnome-terminal inxi: 3.3.22

Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
Your output is missing memory output, which this is about.

Can you include the output of inxi -mj on a running system?
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
Ok, googling the error you're getting, you may have a misconfigured initramfs:

unix.stackexchange.com/questions/698890/out-of-memory-on-loading-initial-ramdisk-after-kernel-upgrade-4-15-to-4-19-o

unix.stackexchange.com/questions/270390/how-to-reduce-the-size-of-the-initrd-when-compiling-your-kernel

The issue is that Liquorix now contains debug symbols in the modules and kernel image. If initramfs is not configured to compress or whatever the default was, it'll result in a needlessly large ramdisk. There's also a chance the ramdisk is larger than your actual memory and you can't load it for other reasons.

EDIT:

In /etc/initramfs-tools/initramfs.conf, you should at least have compression on with modules set to most, like so:

:: Code ::
#
# MODULES: [ most | netboot | dep | list ]
#
# most - Add most filesystem and all harddrive drivers.
#
# dep - Try and guess which modules to load.
#
# netboot - Add the base modules, network modules, but skip block devices.
#
# list - Only include modules from the 'additional modules' list
#

MODULES=most

...

#
# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz | zstd ]
#

COMPRESS=gzip


You can get much better compression by changing COMPRESS=gzip to COMPRESS=xz, or as a nice compromise, change it to zstd.
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
I pushed out a change late yesterday that compresses modules with ZSTD. This will also help in-case your initramfs is not configured to compress properly. This configuration is standard with Arch Linux.
Back to top
nickdnk
Status: New User - Welcome
Joined: 10 Oct 2022
Posts: 3
Reply Quote
Hello

5.19.0-14.3 worked. No problems.

I looked at my /etc/initramfs-tools/initramfs.conf before updating, and it had (and still has):

:: Code ::

MODULES=most
BUSYBOX=auto
COMPCACHE_SIZE=""
COMPRESS=lz4
DEVICE=
NFSROOT=auto
RUNSIZE=10%


I made no changes to this file.

Memory is 16GB. Do you still want the inxi with -mj?
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
I think you provided enough information. Part of the issue I think is this:

COMPRESS=lz4

LZ4 has poor compression efficiency as a trade off for high performance. By compressing modules with ZSTD, that overrode LZ4's compression for higher efficiency, allowing for your ramdisk to mount properly. That's my theory at least.

I'll mark this as resolved.
Back to top
nickdnk
Status: New User - Welcome
Joined: 10 Oct 2022
Posts: 3
Reply Quote
Alright. Thanks.

Is there somewhere I can define/increase the size of this ramdisk? I mean, with 16GB of RAM I would assume there's plenty of headroom to just increase its size, should this problem occur in the future.
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
I'm not sure, this appears to be some limit with the implementation for Debian. You have enough ram but whatever was provisioned and configured by Debian is not enough in some cases.

Either way, another update was pushed out to further reduce the size of the modules by using XZ instead of ZSTD. Debian Bullseye doesn't support ZSTD so I fell back to XZ, so the size of the package you get will be smaller still. I don't anticipate this issue coming up again.
Back to top
DeepDayze
Status: Contributor
Joined: 21 May 2009
Posts: 128
Reply Quote
Out of curiosity what's the maximum size an initrd can be to boot successfully?
Back to top
Display posts from previous:   

All times are GMT - 8 Hours