From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sM9+Bn3vemF/kQAAgWs5BA (envelope-from ) for ; Thu, 28 Oct 2021 20:44:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QAo2An3vemG+TAAA1q6Kng (envelope-from ) for ; Thu, 28 Oct 2021 18:44:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1FC6BEFB2 for ; Thu, 28 Oct 2021 20:44:12 +0200 (CEST) Received: from localhost ([::1]:57810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgANl-0007E5-MG for larch@yhetil.org; Thu, 28 Oct 2021 14:44:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgANe-0007CS-Bx for guix-patches@gnu.org; Thu, 28 Oct 2021 14:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41623) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgANe-00022g-12 for guix-patches@gnu.org; Thu, 28 Oct 2021 14:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgANd-0000iA-VQ for guix-patches@gnu.org; Thu, 28 Oct 2021 14:44:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51315] [PATCH] services: tor: Raise file descriptor ulimit. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Oct 2021 18:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51315 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Geerinckx-Rice Cc: 51315@debbugs.gnu.org Received: via spool by 51315-submit@debbugs.gnu.org id=B51315.16354466012668 (code B ref 51315); Thu, 28 Oct 2021 18:44:01 +0000 Received: (at 51315) by debbugs.gnu.org; 28 Oct 2021 18:43:21 +0000 Received: from localhost ([127.0.0.1]:53167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgAMz-0000gy-Bw for submit@debbugs.gnu.org; Thu, 28 Oct 2021 14:43:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgAMx-0000gl-JW for 51315@debbugs.gnu.org; Thu, 28 Oct 2021 14:43:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59990) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgAMr-0001NX-G0; Thu, 28 Oct 2021 14:43:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=vzAg5bVSeznTkLTi6OiUTQqPGf7zkT4P7JTi2WD4P7E=; b=B6NPnfB/ZHonlMGlOkni bDG9uDkTynL9LKwBqyrGFt3UX8IKzBTTJn8h3rE2QVz1iziapLsX9nNyayibcX6JDPLTUwocp6m6U sWXUdX4BIenZzC37YRohBVKfK/6uETn+HJnXaeROi0T9aprU4rpoE+DwwIZbu4GaB3QrzOffOpCEY lUP8f6et9rTSOEqcYs1a10LdI6uQbVFrjYxm/KeYw+WAGjD75zGWZm8KhjfKkmE9n9aX1YvsavgB/ QRgUlwNI0sd5XEWgklVeYDGJHDVd3qFA9aUe1ieNAjjSj6N+aNMo1PK/FVSKRgLPVhtBaHzz209zO 8Q46A1iRWkOnHA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:54850 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgAMr-0005sR-3q; Thu, 28 Oct 2021 14:43:13 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20211021115622.826-1-me@tobias.gr> <20211021120103.3891-1-me@tobias.gr> Date: Thu, 28 Oct 2021 20:43:10 +0200 In-Reply-To: <20211021120103.3891-1-me@tobias.gr> (Tobias Geerinckx-Rice's message of "Thu, 21 Oct 2021 14:01:03 +0200") Message-ID: <878ryd56td.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635446652; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=vzAg5bVSeznTkLTi6OiUTQqPGf7zkT4P7JTi2WD4P7E=; b=sHz8jVvp7GAY71cKWeh+6v+6tQIQ4SrcGaVYx1asSFBm6wCgagvA48voVzRt/bjfuPsmyI mYPoTxslaCsxQCrKuuqQr0unzYvkyJ1+gYSX5mlsyAKsT66N6QCoad9m5fU44xsdx5Mn/1 UvvKBo1RIf0tsw4l5S48ELDMiX2Epx4T92b1FE5VIAlpTfJbWxZm2+LO7BafHFLiPaBHtA mLvPfGmHL3USYU4KL3A7xKhIhVSfN5vvYo/mm9OvK8uEPfd7ksxfueQVR3roR0HhuFOLYs i1tYk61zrUsGBztpqDfjDDkbNRSTgzJZJTd06WQhiqskfm19up3GZ+9lZTPQdA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635446652; a=rsa-sha256; cv=none; b=Bbu2plcVfZX7otKzEW/r4Zg6E24dyxWdSgjuiuM1KMd3vFOYVfVN5YO8sGQwrAxS+0TAH6 4Bwy5poGCQz+p4S1Rj5ICwtPqPxEMDegCJSs/0h8RTRR+XMZ4BFJ3cDMDkv7h5LBMGc/On ok6UMHIHWGCU8VVUsqxNnZqbHdbe/5MUYtzT2vLocoilJ5/89qCIJxoBB5E40nvzMFORju chJeTOigFXwqOaZLM70CwKd6HXyadD0TH3ApIcEGMF81RWQ7ZOKAdtnT/beyqFjoGV/tHG zBJbnoCTNLYDojGvQo9QYFuLyiz9CMrvTyrw2s1CLEW5AxM+EMrTX9WqqZVMeg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="B6NPnfB/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="B6NPnfB/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 1FC6BEFB2 X-Spam-Score: -2.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: iUAoihTMuvhW Hello! Tobias Geerinckx-Rice skribis: > + ;; The file descriptor ulimit must be raised in the > + ;; environment from which the daemon is launched; see > + ;; https://gitweb.torproject.org/tor.git/plain/doc/TUNING > + ;; The exact number is somewhat arbitrary but taken from > + ;; https://gitweb.torproject.org/debian/tor.git/tree/deb= ian/tor.init#n40 > (start #~(make-forkexec-constructor/container > - (list #$(file-append tor "/bin/tor") "-f" #$to= rrc) > + (list #$(file-append bash "/bin/bash") "-c" > + (string-append "ulimit -n 32768; exec " > + #$(file-append tor "/bin/= tor") > + " -f " #$torrc)) Instead of going through Bash, what about something like: (lambda _ (let ((pid (fork+exec-command/container =E2=80=A6))) (container-excursion* pid (lambda () (setrlimit 'nofile 32768 32768))) pid)) ? Ludo=E2=80=99.