4 Sep 2023 |
nbp | I recall this could be done on the command line, but I forgot the command since. | 15:28:50 |
vcunat | systemd docs about that limit says
Note that most process resource limits configured with these options are per-process
| 15:28:55 |
vcunat | man systemd.exec.5 | 15:29:06 |
vcunat | In reply to @nbp:mozilla.org I recall this could be done on the command line, but I forgot the command since. ulimit -n uses the same syscall | 15:30:41 |
K900 | In reply to @vcunat:matrix.org I really thought that setrlimit is per-process and I can't quickly find a reference. setrlimit yes but I think systemd does some fancier cgroup stuff | 15:30:47 |
K900 | Not 100% sure though | 15:30:57 |
vcunat |
Set soft and hard limits on various resources for executed processes. See setrlimit(2) for
| 15:31:06 |
vcunat | *
Set soft and hard limits on various resources for executed processes. See setrlimit(2) for [...]
| 15:31:29 |
hexa | so what does that mean? | 15:32:32 |
hexa | nix-daemon can open a million files, alright | 15:32:38 |
hexa | and everything it spawns can open 1024? | 15:32:45 |
hexa | * and everything it spawns can open their very own 1024? | 15:33:05 |
vcunat | These limits are inherited into descendant processes. | 15:34:33 |
vcunat | So each of these processes should be able to use a million file-descriptors. | 15:35:05 |
hexa | except for the test runner, which is stuck with 1024 for some reason | 15:35:23 |
vcunat | Yes, we must be missing something. | 15:35:46 |
vcunat | The systemd option says to set both soft and hard limit, so I assume that's not it. | 15:36:07 |
vcunat | In reply to @hexa:lossy.network except for the test runner, which is stuck with 1024 for some reason Did you see 1024 in some logs? | 15:36:36 |
hexa | I think so | 15:36:55 |
hexa | diff --git a/nixos/tests/firefox.nix b/nixos/tests/firefox.nix
index 3f9cea6662fb..6e311259a6eb 100644
--- a/nixos/tests/firefox.nix
+++ b/nixos/tests/firefox.nix
@@ -58,8 +58,19 @@ in
};
+ extraPythonPackages = ps: with ps; [
+ psutil
+ types-psutil
+ ];
+
testScript = ''
from contextlib import contextmanager
+ import psutil
+
+
+ def sample_open_files():
+ for proc in psutil.process_iter():
+ machine.log(f"{proc.name()}={proc.num_fds()}")
@contextmanager
@@ -95,6 +106,8 @@ in
machine.wait_for_x()
+ sample_open_files()
+
with subtest("Wait until Firefox has finished loading the Valgrind docs page"):
machine.execute(
"xterm -e '${firefoxPackage'.unwrapped.binaryName} file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html' >&2 &"
@@ -102,6 +115,8 @@ in
machine.wait_for_window("Valgrind")
machine.sleep(40)
+ sample_open_files()
+
with subtest("Check whether Firefox can play sound"):
with record_audio(machine):
machine.succeed(
| 17:11:19 |
hexa | this is how I sampled open files fwiw | 17:11:24 |
hexa | * this is how I sampled open fds fwiw | 17:11:31 |
nbp | I wonder if this could be the file system bound of the nix store in the VM, but I would not expect Firefox to be the first to hit this limit. | 18:34:25 |
nbp | * I wonder if this could be the file system mound of the nix store in the VM, but I would not expect Firefox to be the first to hit this limit. | 18:36:45 |
nbp | * I wonder if this could be the file system mount of the nix store in the VM, but I would not expect Firefox to be the first to hit this limit. | 18:36:50 |
5 Sep 2023 |
ajs124 | anyone got any time to review https://github.com/NixOS/nixpkgs/pull/252547?
looks like a release with few changes, but I'd rather not self-merge if I can avoid it | 14:09:40 |
hexa | not before nixcon | 14:10:03 |
ajs124 | understandable. I'll take a look at the timeline, when we need this. Then again, since we've split nss, we can just land this with the firefox release that actually requires it. | 14:22:19 |
6 Sep 2023 |
vcunat | September 26 is the closest date with major FF update. We surely don't need it before that. | 06:37:28 |
vcunat | (for stable releases at least) | 06:37:39 |