!PbcQeaWcgMyjVfeGQN:nixos.org

Nix Mozilla 🦊🐦🐒

169 Members
A room about a number of weird animals (also known as Mozilla products): Firefox, Thunderbird, Spidermonkey, NSS, cacert. Also a little bit of fun times, small amounts of extreme, when building weird animals. But for bugs please file GitHub issues. | Release Schedule: https://whattrainisitnow.com | Crash-Stats: https://crash-stats.mozilla.org/search/?distribution_id=%3Dnixos&product=Firefox&product=Thunderbird49 Servers

Load older messages


SenderMessageTime
4 Sep 2023
@nbp:mozilla.orgnbpI wish we could have a wireguard-boot, where one image would connect using wireguard to download its latest image. This way we could make it work without having to redo the DHCP of the network.15:11:38
@hexa:lossy.networkhexa

Nowadays, the hard limit defaults to 524288, a very high value compared to historical defaults. Typically applications should increase their soft limit to the hard limit on their own, if they are OK with working with file descriptors above 1023, i.e. do not use select(2).

15:12:14
@hexa:lossy.networkhexaI think knowing what number of open fds we're having on the builders would be an easy first step15:21:40
@k900:0upti.meK900 ⚡️
In reply to @vcunat:matrix.org
A million (per process) sounds quite a lot.
It's not per process though
15:22:43
@k900:0upti.meK900 ⚡️It's per cgroup15:22:46
@k900:0upti.meK900 ⚡️And everything is in the cgroup15:22:53
@vcunat:matrix.orgvcunatCan you point me to docs about that?15:27:52
@k900:0upti.meK900 ⚡️Uh, it's in systemd docs somewhere 15:28:11
@vcunat:matrix.orgvcunatI really thought that setrlimit is per-process and I can't quickly find a reference.15:28:15
@nbp:mozilla.orgnbpI recall this could be done on the command line, but I forgot the command since.15:28:50
@vcunat:matrix.orgvcunat

systemd docs about that limit says

Note that most process resource limits configured with these options are per-process

15:28:55
@vcunat:matrix.orgvcunat man systemd.exec.5 15:29:06
@vcunat:matrix.orgvcunat
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:0upti.meK900 ⚡️
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:0upti.meK900 ⚡️Not 100% sure though 15:30:57
@vcunat:matrix.orgvcunat
       Set soft and hard limits on various resources for executed processes. See setrlimit(2) for
15:31:06
@vcunat:matrix.orgvcunat *

Set soft and hard limits on various resources for executed processes. See setrlimit(2) for [...]

15:31:29
@hexa:lossy.networkhexaso what does that mean?15:32:32
@hexa:lossy.networkhexanix-daemon can open a million files, alright15:32:38
@hexa:lossy.networkhexaand everything it spawns can open 1024?15:32:45
@hexa:lossy.networkhexa * and everything it spawns can open their very own 1024?15:33:05
@vcunat:matrix.orgvcunatThese limits are inherited into descendant processes.15:34:33
@vcunat:matrix.orgvcunatSo each of these processes should be able to use a million file-descriptors.15:35:05
@hexa:lossy.networkhexaexcept for the test runner, which is stuck with 1024 for some reason 15:35:23
@vcunat:matrix.orgvcunatYes, we must be missing something.15:35:46
@vcunat:matrix.orgvcunatThe systemd option says to set both soft and hard limit, so I assume that's not it.15:36:07
@vcunat:matrix.orgvcunat
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:lossy.networkhexaI think so15:36:55
@hexa:lossy.networkhexa
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:lossy.networkhexathis is how I sampled open files fwiw17:11:24

Show newer messages


Back to Room ListRoom Version: 9