Hi Samuel, Diego, and all, Follow-up to the thread I started on Feb 11 about surf/luakit aborting inside libjavascriptcoregtk-4.1 (JSC abort in StructureAlignedMemoryAllocator, tied to the 4GiB structureIDMask reservation Diego identified).
I wanted to share some empirical data before giving up on this. My working hypothesis, based on the timing, was that the regression is connected to the "Implement per task virtual memory limit" patch (applied 2025-09-21), since the version of gnumach carrying it reached my Debian GNU/Hurd system via a package upgrade around 2025-12-29 — right when surf/luakit stopped working for me. Since the v1 patch left a TODO about how to derive the initial size_cur_limit/size_max_limit from swap size, I ran a small experiment varying RAM and swap to see how ulimit -v responds: RAM 3 GB, swap 128 MB -> ulimit -v ~= 3,145,728 KB (~3 GiB) RAM 4 GB, swap 6 GiB -> ulimit -v = 4,194,104 KB RAM 4 GB, swap 20 GiB -> ulimit -v = 4,194,104 KB (identical, swap increase had zero effect) The swap was added as a second QEMU virtual disk (wd1), with a proper Linux swap signature written via mkswap on the host image before swapon inside the guest. I also fully rebooted the guest with the 20 GiB swap already present from boot, to rule out the limit being computed once at boot from a smaller swap snapshot — result was unchanged. This looks consistent with: limit = min(available RAM+swap, ~4 GiB fixed ceiling). Below 4 GiB of combined resources the limit tracks what's available; above it, it stays flat at exactly 4,194,104 KB regardless of how much swap is added. Given that JSC needs a full 4 GiB (4,194,304 KB) contiguous reservation for structureIDMask, and the observed ceiling sits 200 KB short of that, this would explain why surf/luakit fail on any system that ends up at or above that ceiling — no amount of extra swap/RAM will help once you're past it. Two questions for whoever implemented the default limit calculation: 1. Is ~4 GiB a deliberate hardcoded default ceiling (rather than something meant to scale with RAM+swap beyond that point)? 2. Is there already a userspace way to invoke vm_set_size_limit to raise the limit for a specific task (or system-wide), or does that capability currently only exist as a kernel-level API with no userspace tool using it yet? Happy to run further tests if useful (I still have this VM set up specifically for this). Thanks for all the work on this so far. Best, Jose Luis. -- https://lordofunix.org/ Not Registered GNU/Hurd User. Registered BSD User 51101. Registered Linux User #213309. Memories..... You are talking about memories. Rick Deckard. Blade Runner.
pgpmqUttr2osx.pgp
Description: Firma digital OpenPGP
