On Mon, Sep 01, 2025 at 12:18:51AM +0200, Samuel Thibault wrote: > > I'm thinking that probably the __vm_set_size_limit call, since it is > directed to the host port, does not actually go through rpctrace
Ok > Do you actually see the RPC call? No, there's no entry for the vm_set_size_limit in the rpctrace output when I use the setrlimit function. But, with the atttached program (which calls vm_set_size_limit directly) it is shown correctly in rpctrace: ... 38<--44(pid3837)->proc_getprivports_request () = 0 60<--55(pid3837) 31<--62(pid3837) task9(pid3837)->mach_port_mod_refs (pn{ 20} 0 1) = 0 49<--25(pid3837)->io_write_request ("task=0x1; host=0x14\n" -1)task=0x1; host=0x14 = 0 20 60<--55(pid3837)->vm_set_size_limit ( task9(pid3837) 2147483648 2147483648) = 0 task9(pid3837)->mach_port_deallocate (pn{ 20}) = 0 38<--44(pid3837)->proc_mark_exit_request (0 0) = 0 task9(pid3837)->task_terminate () = 0 That lead me to suspect of the GLIBC implementation (or the installation). Just in case, I will try again after addressing the review of the gnumach part. Regards, Diego
#include <error.h> #include <hurd.h> #include <mach/mach.h> #include <mach/gnumach.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> static const size_t M_2GB = 2l * 1024l * 1024l * 1024l; int main (int argc, char **argv) { kern_return_t err; mach_port_t task = mach_task_self (); mach_port_t host = MACH_PORT_NULL; err = get_privileged_ports (&host, NULL); if (err) error (1, err, "error getting host priv port"); fprintf (stderr, "task=0x%x; host=0x%x\n", task, host); err = vm_set_size_limit(host, task, M_2GB, M_2GB); if (host != MACH_PORT_NULL) mach_port_deallocate (task, host); if (err) error (1, err, "error setting size limit task"); return 0; }