!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

228 Members
74 Servers

Load older messages


SenderMessageTime
27 Oct 2024
@artturin:matrix.orgArtturin * lovesegfault: https://github.com/NixOS/nix/pull/6645#issuecomment-1230341511 are you still patching it yourself? 23:37:17
@emilazy:matrix.orgemily(set it if it's lower, I mean, so no change for Linux.)23:38:35
@emilazy:matrix.orgemily doing something fancier in Nix may also be nice but one line in stdenv to avoiding hacks in Nixpkgs derivations now seems like a good trade-off. 23:39:06
@artturin:matrix.orgArtturinyep23:39:20
@emilazy:matrix.orgemily
/*
 * This structure is used for the management of descriptors.  It may be
 * shared by multiple processes.
 *
 * A process is initially started out with NDFILE descriptors [XXXstored within
 * this structureXXX], selected to be enough for typical applications based on
 * the historical limit of 20 open files (and the usage of descriptors by
 * shells).  If these descriptors are exhausted, a larger descriptor table
 * may be allocated, up to a process' resource limit; [XXXthe internal arrays
 * are then unusedXXX].  The initial expansion is set to NDEXTENT; each time
 * it runs out, it is doubled until the resource limit is reached. NDEXTENT
 * should be selected to be the biggest multiple of OFILESIZE (see below)
 * that will fit in a power-of-two sized piece of memory.
 */
#define NDFILE          25              /* 125 bytes */
#define NDEXTENT        50              /* 250 bytes in 256-byte alloc. */
23:43:32
@emilazy:matrix.orgemilythankfully XNU is open source!23:43:44
@emilazy:matrix.orgemilyso, it won't cause any memory increase out of the box to set it to 122880.23:43:53
@emilazy:matrix.orgemilytherefore it seems fine, the only risk is processes using up all of them which would be a whopping 600 KiB.23:44:43
@emilazy:matrix.orgemilyso I'll just do that.23:44:48
@emilazy:matrix.orgemily reno: you have a macOS 11 VM, right? what's kern.maxfilesperproc there? 23:47:44
@emilazy:matrix.orgemilyit turns out that it's 10240 on 10.12 so we probably can't go above that for now >:(23:47:55
@artturin:matrix.orgArtturinWhat happens when you set it above the max23:48:23
@emilazy:matrix.orgemilyit fails.23:48:30
@paparodeo:matrix.org@paparodeo:matrix.org
In reply to @emilazy:matrix.org
it turns out that it's 10240 on 10.12 so we probably can't go above that for now >:(
kern.maxfilesperproc: 98304
23:48:33
@emilazy:matrix.orgemilyand I don't want to implement conditional logic.23:48:36
@emilazy:matrix.orgemily
In reply to @paparodeo:matrix.org
kern.maxfilesperproc: 98304
wow they really just keep bumping it up
23:48:43
@emilazy:matrix.orgemilyok I'll put it at 10240 for now.23:48:49
@emilazy:matrix.orgemilyridiculous number.23:48:53
@artturin:matrix.orgArtturin ulimit || ulimit || ulimit 23:49:09
@emilazy:matrix.orgemilythey could at last have made it 1638423:49:14
@emilazy:matrix.orgemily
In reply to @artturin:matrix.org
ulimit || ulimit || ulimit
yeah. but otoh nothing in the tree sets it above 8196.
23:49:23
@emilazy:matrix.orgemilyso it doesn't seem worth it. I can bump it as a treat to myself every time I bump the minimum macOS version.23:49:35
@artturin:matrix.orgArtturinhttps://github.com/LnL7/nix-darwin/blob/5c0c6aaa797d6ccbb6cdab14de0248135735709d/modules/services/nix-daemon.nix#L5123:52:35
@artturin:matrix.orgArtturinnix-darwin has 104857623:52:40
@artturin:matrix.orgArtturinWonder if it's applying for them23:53:05
@emilazy:matrix.orgemilyhttps://github.com/LnL7/nix-darwin/commit/ec06ea883757c6075c61d1426f40719742d51f5923:53:24
@emilazy:matrix.orgemilywas just copied from Nix23:53:31
@emilazy:matrix.orgemily you definitely can't go above kern.maxfilesperproc so my expectation is that it's either doing nothing or getting silently capped 23:54:01
@emilazy:matrix.orgemilyand apparently not passing down to builds anyway(?)23:54:10
28 Oct 2024
@artturin:matrix.orgArtturinCommented https://github.com/LnL7/nix-darwin/pull/940/files#r181822049400:02:36

Show newer messages


Back to Room ListRoom Version: 9