| 14 Mar 2026 |
matthewcroughan | Caught in the act | 19:04:48 |
matthewcroughan | nixos-disko-images> +++ xargs -P 8 -I '{}' cp --recursive '{}' /mnt/nix/store
nixos-disko-images> [ 45.634884] Kernel panic - not syncing: Out of memory: compulsory panic_on_oom is enabled
nixos-disko-images> [ 45.637327] CPU: 15 UID: 0 PID: 1928 Comm: cp Tainted: P O 6.18.16 #1-NixOS PREEMPT(voluntary)
nixos-disko-images> [ 45.640188] Tainted: [P]=PROPRIETARY_MODULE, [O]=OOT_MODULE
nixos-disko-images> [ 45.641794] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS unknown 02/02/2022
nixos-disko-images> [ 45.644168] Call Trace:
nixos-disko-images> [ 45.644972] <TASK>
nixos-disko-images> [ 45.645686] dump_stack_lvl+0x5d/0x80
nixos-disko-images> [ 45.646829] vpanic+0xdb/0x2d0
nixos-disko-images> [ 45.647822] panic+0x6b/0x6b
nixos-disko-images> [ 45.648745] out_of_memory.cold+0x58/0x78
nixos-disko-images> [ 45.649981] __alloc_frozen_pages_noprof+0xfa1/0x1120
nixos-disko-images> [ 45.651495] alloc_pages_mpol+0x86/0x170
nixos-disko-images> [ 45.652706] folio_alloc_noprof+0x5b/0xb0
nixos-disko-images> [ 45.653898] __filemap_get_folio+0x1db/0x600
nixos-disko-images> [ 45.655197] ? page_cache_ra_unbounded+0x19f/0x260
nixos-disko-images> [ 45.656666] filemap_fault+0x112/0xf50
nixos-disko-images> [ 45.657746] ? filemap_map_pages+0x4ee/0x770
nixos-disko-images> [ 45.659020] __do_fault+0x34/0x1d0
nixos-disko-images> [ 45.660068] do_fault+0x350/0x5c0
nixos-disko-images> [ 45.661093] __handle_mm_fault+0x8d8/0xf40
nixos-disko-images> [ 45.662365] ? pick_next_task_fair+0x146/0x260
nixos-disko-images> [ 45.663656] handle_mm_fault+0xe7/0x2e0
nixos-disko-images> [ 45.664751] do_user_addr_fault+0x21a/0x690
nixos-disko-images> [ 45.665975] exc_page_fault+0x6a/0x150
nixos-disko-images> [ 45.667109] asm_exc_page_fault+0x26/0x30
nixos-disko-images> [ 45.668339] RIP: 0033:0x5630228ed340
nixos-disko-images> [ 45.669415] Code: Unable to access opcode bytes at 0x5630228ed316.
nixos-disko-images> [ 45.671204] RSP: 002b:00007ffd040fe0f8 EFLAGS: 00010246
nixos-disko-images> [ 45.672812] RAX: 0000000000011901 RBX: 0000000000011976 RCX: 0000000000000000
nixos-disko-images> [ 45.674865] RDX: 0000000000011976 RSI: 00007f83903bf000 RDI: 0000000000000005
nixos-disko-images> [ 45.676785] RBP: 00007ffd040fe120 R08: 0000000000000000 R09: 0000000000011976
nixos-disko-images> [ 45.678651] R10: 0000000000000000 R11: 0000000000000000 R12: 00007f83903bf000
nixos-disko-images> [ 45.680269] R13: 0000000000000000 R14: 0000000000000005 R15: 00007f83903bf000
nixos-disko-images> [ 45.681855] </TASK>
nixos-disko-images> [ 45.682705] Kernel Offset: 0x19a00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
nixos-disko-images> [ 46.397862] Rebooting in 1 seconds..
| 19:04:50 |
matthewcroughan | something something page cache | 19:05:12 |
lassulus | can you check if https://github.com/nix-community/disko/pull/1234 makes it better? or worse? :D | 19:15:18 |
matthewcroughan | https://github.com/nixos/nixpkgs/issues/495198 | 19:15:27 |
matthewcroughan | The issue doesn't happen in 6.12, and does in anything higher | 19:15:54 |
matthewcroughan | I believe this is related | 19:16:03 |
lassulus | hmm, but CPU and IO is not memory? | 19:17:01 |
matthewcroughan | The issue is only documenting the observed effects, maybe they weren't paying attention to other effects | 19:17:30 |
lassulus | could be, but in my head running slow usually doesn't correlate with using more memory | 19:18:16 |
matthewcroughan | ┃ error: undefined variable 'nocache'
┃ at /home/matthew/git/disko/lib/make-disk-image.nix:98:7:
┃ 97| kmod
┃ 98| nocache
┃ | ^
┃ 99| ]
| 19:18:24 |
matthewcroughan | It does if you have to buffer more as a consequence | 19:18:39 |
matthewcroughan | did you clanker that? | 19:19:25 |
matthewcroughan | I don't see it in nixpkgs anywhere, so can only assume you clankered that | 19:20:52 |
matthewcroughan | See how good AI is? | 19:22:07 |
Mic92 | What the fuck are you talking about? | 19:25:39 |
matthewcroughan | See the PR above https://github.com/nixos/nixpkgs/issues/495198 | 19:25:54 |
matthewcroughan | * See the PR above | 19:26:00 |
matthewcroughan | https://github.com/nix-community/disko/pull/1234 | 19:26:04 |
matthewcroughan | this nocache utility doesn't exist in nixpkgs | 19:26:11 |
matthewcroughan | But it does exist on Github | 19:26:21 |
matthewcroughan | So I can only assume a clanker was asked about this issue, and the PR above is the result | 19:26:32 |
| amadaluzia joined the room. | 19:28:41 |
Mic92 | That was 12 months ago. Don't think lassulus was using any such tools at this time and llms would have been properly doing a better job at actually testing the code | 19:29:18 |
matthewcroughan | 12 months ago? | 19:29:44 |
matthewcroughan | the PR is from 15 mins ago | 19:29:48 |
matthewcroughan | commit d2fd33640c8207f9bb50da1d6b88ba7ee64c6153 (HEAD -> master)
Author: lassulus <git@lassul.us>
Date: Sat Mar 14 20:13:40 2026 +0100
make-disk-image: use nocache for smaller memory footprint
diff --git a/lib/make-disk-image.nix b/lib/make-disk-image.nix
index a9c732c..80dc561 100644
--- a/lib/make-disk-image.nix
+++ b/lib/make-disk-image.nix
@@ -95,6 +95,7 @@ let
util-linux
findutils
kmod
+ nocache
]
++ cfg.extraDependencies;
preVM = ''
@@ -165,7 +166,7 @@ let
P=${toString cfg.copyNixStoreThreads}
''
}
- xargs -P "$P" -I {} cp --recursive {} "$rootMountPoint"/nix/store < ${closureInfo}/store-paths
+ xargs -P "$P" -I {} nocache cp --recursive {} "$rootMountPoint"/nix/store < ${closureInfo}/store-paths
${systemToInstall.config.system.build.nixos-install}/bin/nixos-install --root "$rootMountPoint" --system ${systemToInstall.config.system.build.toplevel} --keep-going --no-channel-copy -v --no-root-password --option binary-caches ""
umount -Rv "$rootMountPoint"
| 19:31:44 |
matthewcroughan | The PR now says rsync instead of nocache, will try that | 19:31:57 |
matthewcroughan | What is from 12 months ago though, are we talking about two different things? | 19:32:10 |
Mic92 | @matthewcroughan:defenestrate.it: if this the attitude you bring up against us, I might just as well block as well so I don't have to read your slop anymore | 19:32:22 |