!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

233 Members
75 Servers

Load older messages


SenderMessageTime
28 Oct 2024
@emilazy:matrix.orgemilywe basically just aim to match the upstream plist there00:03:52
@emilazy:matrix.orgemilyso probably it's an issue for Nix primarily00:04:06
@artturin:matrix.orgArtturinEdited my comment00:05:41
@artturin:matrix.orgArtturinIt did not work before https://github.com/NixOS/nix/pull/6645 as shown by issue https://github.com/NixOS/nix/issues/655700:05:43
@emilazy:matrix.orgemilyhttps://github.com/NixOS/nixpkgs/pull/35178300:05:57
@emilazy:matrix.orgemily
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:matrix.orgArtturin To check nix build --impure --expr '(import <nixpkgs> {}).runCommand "hi" {} "ulimit -a > $out" 00:06:29
@emilazy:matrix.orgemilyheh, I already constructed that when checking Linux00:06:43
@paparodeo:matrix.org@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:matrix.orgArtturinwell no need for a redirection00:06:45
@emilazy:matrix.orgemily
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@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
@emilazy:matrix.orgemilygood to know. then it should be harmless to match NixOS00:07:23
@paparodeo:matrix.org@paparodeo:matrix.org
In reply to @emilazy:matrix.org
with a launchd daemon?
just from shell.
00:07:31
@emilazy:matrix.orgemily ulimit -n 99999 failed for me on 10.12. 00:07:43
@emilazy:matrix.orgemilyuh, hang on00:07:51
@emilazy:matrix.orgemily
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
@emilazy:matrix.orgemily I'm confused: why is ulimit -n 4096 ever fixing builds? it should be making the problem worse. 00:08:24
@emilazy:matrix.orgemilyI fear this is some kind of cursed environment difference.00:08:50
@artturin:matrix.orgArtturin How about nix build --impure --expr '(import <nixpkgs> {}).runCommand "hi" {} "bash -c \"ulimit -a\"" 00:09:32
@artturin:matrix.orgArtturin * How about nix build --impure --expr '(import <nixpkgs> {}).runCommand "hi" {} "bash -c \"ulimit -a\""' 00:09:55
@emilazy:matrix.orgemilysame result.00:10:36
@emilazy:matrix.orgemilyoh.00:10:48
@emilazy:matrix.orgemilyI think I know what's going on.00:10:52
@emilazy:matrix.orgemily reno doesn't use nix-darwin, and maybe the Nix installation is old? 00:10:59
@emilazy:matrix.orgemilyno, wait, that doesn't explain it, since it used to be 4096 still.00:11:21
@artturin:matrix.orgArtturin 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
@emilazy:matrix.orgemilyto check if too-high values are getting capped, or?00:12:44
@artturin:matrix.orgArtturinIf setting it above the limit is interpreted as 1 or something00:13:21
@artturin:matrix.orgArtturinwell it shouldn't be 1 because then all builds would fail 00:13:43

Show newer messages


Back to Room ListRoom Version: 9