From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id rG7bA+3mVWPMMAAAbAwnHQ (envelope-from ) for ; Mon, 24 Oct 2022 03:14:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YCkjA+3mVWPgHAAA9RJhRA (envelope-from ) for ; Mon, 24 Oct 2022 03:14:21 +0200 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 BE6B1324E0 for ; Mon, 24 Oct 2022 03:14:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjUf-0003lw-TL for larch@yhetil.org; Sun, 23 Oct 2022 18:30:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omL9B-0004yP-Lo for bug-guix@gnu.org; Sat, 22 Oct 2022 16:31:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omL93-0000iI-TU for bug-guix@gnu.org; Sat, 22 Oct 2022 16:31:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omL93-0005OR-I3 for bug-guix@gnu.org; Sat, 22 Oct 2022 16:31:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#58631: [Shepherd] Indefinite heap growth (memory leak) Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 22 Oct 2022 20:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58631 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 58631@debbugs.gnu.org Received: via spool by 58631-submit@debbugs.gnu.org id=B58631.166647060920648 (code B ref 58631); Sat, 22 Oct 2022 20:31:01 +0000 Received: (at 58631) by debbugs.gnu.org; 22 Oct 2022 20:30:09 +0000 Received: from localhost ([127.0.0.1]:42444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omL8C-0005My-Lf for submit@debbugs.gnu.org; Sat, 22 Oct 2022 16:30:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omL89-0005Kx-Hk for 58631@debbugs.gnu.org; Sat, 22 Oct 2022 16:30:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omL84-0000Jr-AO for 58631@debbugs.gnu.org; Sat, 22 Oct 2022 16:30:00 -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=bV+Ey/BoNPjoxw7zPMcC2fy/uOvWoA30y1y+WuH+Um0=; b=Kd1G3lJQvdrBL4qrC+wU n18CLrp2lzpTq8nG1SpUKgNDkNxCv5Rj7tPqs4xmYcJxUO1FZEzm7HMLYO4cHjIynu9YgqrfVOwD7 5AGcAX6tKjTaJsk7XIsBmGziJHsENu68OqGFMfYqcVZ3u0qghDanWydhLpeC63RTkZWOyhmHfWS/K AJ0IEhkBYP/CxnZs+PMlB6du3idxv72Ye/PP/xMSo9At1O+jh8r1xh4bkis4wFea/wezoOkUBgSkI oYu5uZaxBm3GcE3U7KCPEOV78z1GDy1fOVtMjSniBdeCxRpPZfw96zwybyjUeK2NAOu9OriXb4D9M qUNe4ewXUOgu4g==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omL83-0001Rz-RZ for 58631@debbugs.gnu.org; Sat, 22 Oct 2022 16:30:00 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87pmeohute.fsf@gnu.org> <87sfjjhjcd.fsf@gnu.org> <87a65qhmh3.fsf@gnu.org> Date: Sat, 22 Oct 2022 22:29:58 +0200 In-Reply-To: <87a65qhmh3.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Thu, 20 Oct 2022 11:29:28 +0200") Message-ID: <87ilkb4n5l.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666574060; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: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=bV+Ey/BoNPjoxw7zPMcC2fy/uOvWoA30y1y+WuH+Um0=; b=lHnjtKtpj31xK1lWoUmsAAelfJ3jPu4tga37KCJqmT0QxM4HqZDvw8jk7Ki/vEPZKYpORa G/sGG7XNW7LlXmsWUuXL04UAYPiPyqw9/w5XYYyMRggTXqVkylovP0QiF2j2MT1volKe4X UMU92DJH4POs5OKBxj9vNJXn0/rnX+2GVfPP0s/fK59ZN7p4CaENxaPabTMoQ5rdB+9hpg Q+HbtYp5JFtG24ExPRDs1tILfNvGfBRi2bZRx2fqTOZgC+a0iedzWGuQS0S6Dc5S0sAuzj eqJGsPa3d6XDFrQaTsdw3fs9fxcqxInLiil6iDKiGMmWq+/OIekP6XNwlJzdmg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666574060; a=rsa-sha256; cv=none; b=NllES6C5u/0dhWQ/mzBrz+u/MATdHUkuhzP5TBowlQmb9JhwmYtOxOvO1/LIkEchSIIkE4 EGdi+pXdq+qMpXVTfIJBHC3OvmVisyFKboeRme5hs9qnd0nSfj1wWBB6//YCh9ukkNSBJL E6J5VI8KUZR/p0fjka4V3y1XQPhGTk/feacINbIn8Mtdcr8RIRlSbxu8GSB3rrI3UFKdJh UVC2sWyrR+yU6UTFeJiwgeKkCBljgNDas+UHXRIuxIC53U4KNZTsw7FPPvP4lsSRNq5Uwk lXSgjmpBQGHdfjwX2SCCyBm1KWL+UohmyEZVUd+0DTIFllUde5oj1GtO/c7X/w== 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=Kd1G3lJQ; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Kd1G3lJQ; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: BE6B1324E0 X-Spam-Score: -1.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: pY7sgacQqLni --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable An update: I can reproduce in a VM running a slightly simplified version of =E2=80=98hydra/berlin.scm=E2=80=99, with loop running: while true; do wget -qO/dev/null http://localhost:3000/nix-cache-info; do= ne to trigger =E2=80=98guix publish=E2=80=99 logging. Better, I can mostly reproduce the issue with the attached config file, then starting shepherd: rm -f sock && ./shepherd -s sock -c log-conf.scm -I =E2=80=A6 monitoring heap usage: ./herd -s sock eval root '(gc-stats)' =E2=80=A6 and triggering inetd service startup, which in turn triggers heap growth: while : ; do echo foo> /dev/tcp/localhost/4567 ; done Then the heap size reported by =E2=80=98gc-stats=E2=80=99 seems to hit a th= reshold above which is stop growing, or it grows too slowly (IOW the problem is not as easy to observe as on berlin). That=E2=80=99s pretty much all I have so far. :-/ Ludo=E2=80=99. --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=log-conf.scm Content-Description: the shepherd config file ;; https://issues.guix.gnu.org/58631 (define %command (list "/bin/sh" "-c" (string-append "while true; do " (string-concatenate (make-list 30 (string-append "echo " (string-concatenate (make-list 8 "logging ")) "; "))) "sleep 0.2; " " done"))) (define %echo-server ;; Simple echo server. '("/bin/sh" "-c" "echo hello; read line; echo line; echo done")) (define loss (make-vector (* 10 (expt 2 20)))) (register-services (make #:provides '(test-logging) #:start (make-forkexec-constructor %command #:log-file "/tmp/service.log") #:stop (make-kill-destructor)) (make #:provides '(test-inetd) #:start (make-inetd-constructor %echo-server (list (endpoint (make-socket-address AF_INET INADDR_LOOPBACK 4567)))) #:stop (make-inetd-destructor))) (start 'test-logging) (start 'test-inetd) (pk 'init-gc (gc-stats)) --=-=-=--