| 27 Oct 2024 |
emily | and apparently not passing down to builds anyway(?) | 23:54:10 |
| 28 Oct 2024 |
Artturin | Commented https://github.com/LnL7/nix-darwin/pull/940/files#r1818220494 | 00:02:36 |
emily | we basically just aim to match the upstream plist there | 00:03:52 |
emily | so probably it's an issue for Nix primarily | 00:04:06 |
Artturin | Edited my comment | 00:05:41 |
Artturin | It did not work before https://github.com/NixOS/nix/pull/6645 as shown by issue https://github.com/NixOS/nix/issues/6557 | 00:05:43 |
emily | https://github.com/NixOS/nixpkgs/pull/351783 | 00:05:57 |
emily | In reply to @artturin:matrix.org It did not work before https://github.com/NixOS/nix/pull/6645 as shown by issue https://github.com/NixOS/nix/issues/6557 ah, okay. wasn't sure on the relative timing | 00:06:08 |
Artturin | To check nix build --impure --expr '(import <nixpkgs> {}).runCommand "hi" {} "ulimit -a > $out" | 00:06:29 |
emily | heh, I already constructed that when checking Linux | 00:06:43 |
@paparodeo:matrix.org | In reply to @emilazy:matrix.org you definitely can't go above kern.maxfilesperproc so my expectation is that it's either doing nothing or getting silently capped seems like it gets capped based on
include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
int count = 3;
while (open("/dev/null", O_RDONLY) != -1) {
count++;
}
printf("%s: %d\n", strerror(errno), count);
return 0;
}
| 00:06:45 |
Artturin | well no need for a redirection | 00:06:45 |
emily | In reply to @paparodeo:matrix.org
seems like it gets capped based on
include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
int count = 3;
while (open("/dev/null", O_RDONLY) != -1) {
count++;
}
printf("%s: %d\n", strerror(errno), count);
return 0;
}
with a launchd daemon? | 00:07:16 |
@paparodeo:matrix.org | In reply to @emilazy:matrix.org you definitely can't go above kern.maxfilesperproc so my expectation is that it's either doing nothing or getting silently capped * seems like it gets capped based on
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
int count = 3;
while (open("/dev/null", O_RDONLY) != -1) {
count++;
}
printf("%s: %d\n", strerror(errno), count);
return 0;
}
| 00:07:19 |
emily | good to know. then it should be harmless to match NixOS | 00:07:23 |
@paparodeo:matrix.org | In reply to @emilazy:matrix.org with a launchd daemon? just from shell. | 00:07:31 |
emily | ulimit -n 99999 failed for me on 10.12. | 00:07:43 |
emily | uh, hang on | 00:07:51 |
emily | emily@yuyuko ~> nix build --impure --expr 'with (builtins.getFlake "nixpkgs").legacyPackages.x86_64-darwin; runCommand "x" {} "ulimit -a > $out"' -L
emily@yuyuko ~> cat result
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1048576
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 5568
virtual memory (kbytes, -v) unlimited
| 00:07:55 |
emily | I'm confused: why is ulimit -n 4096 ever fixing builds? it should be making the problem worse. | 00:08:24 |
emily | I fear this is some kind of cursed environment difference. | 00:08:50 |
Artturin | How about nix build --impure --expr '(import <nixpkgs> {}).runCommand "hi" {} "bash -c \"ulimit -a\"" | 00:09:32 |
Artturin | * How about nix build --impure --expr '(import <nixpkgs> {}).runCommand "hi" {} "bash -c \"ulimit -a\""' | 00:09:55 |
emily | same result. | 00:10:36 |
emily | oh. | 00:10:48 |
emily | I think I know what's going on. | 00:10:52 |
emily | reno doesn't use nix-darwin, and maybe the Nix installation is old? | 00:10:59 |
emily | no, wait, that doesn't explain it, since it used to be 4096 still. | 00:11:21 |
Artturin | What if in one of the places that require the ulimit to be set you set it to the linux number instead of 4096 | 00:11:29 |