From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 wInmEBXtVWMkaAEAbAwnHQ (envelope-from ) for ; Mon, 24 Oct 2022 03:40:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sHriEBXtVWPUZgEAauVa8A (envelope-from ) for ; Mon, 24 Oct 2022 03:40:37 +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 CCFBB32CDB for ; Mon, 24 Oct 2022 03:40:36 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omjTq-0003PE-HP for larch@yhetil.org; Sun, 23 Oct 2022 18:30:06 -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 1omL0M-0004Ul-6q for bug-guix@gnu.org; Sat, 22 Oct 2022 16:22:02 -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 1omL0L-0007qc-VH for bug-guix@gnu.org; Sat, 22 Oct 2022 16:22:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1omL0L-00059V-KG for bug-guix@gnu.org; Sat, 22 Oct 2022 16:22: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:22: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: Liliana Marie Prikler Cc: 58631@debbugs.gnu.org Received: via spool by 58631-submit@debbugs.gnu.org id=B58631.166647009019763 (code B ref 58631); Sat, 22 Oct 2022 20:22:01 +0000 Received: (at 58631) by debbugs.gnu.org; 22 Oct 2022 20:21:30 +0000 Received: from localhost ([127.0.0.1]:42436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omKzq-00058g-7d for submit@debbugs.gnu.org; Sat, 22 Oct 2022 16:21:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omKzo-00058O-2Y for 58631@debbugs.gnu.org; Sat, 22 Oct 2022 16:21:28 -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 1omKzi-0007js-TF; Sat, 22 Oct 2022 16:21:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=B1rZif7uPQTTXckiQIBYg4sCjlUa1KbFl5ZhUWJOxIg=; b=Ies65QeJyrU4iZAzZjlC 6EphAq6gAGlp3LUPnUg/8jI9xoW8QCqjhG9HXoik/R10f91HPmFDAivhtNnDbi2gWq69ruImv3I70 tXrD2qRl0a/F+K2mIPDeigOJ53s6W1guq1WTa12KUff4E/KzlxrBvAWKEPalpGCCAocWa+xOZfa8l nilIicwHWkU9PkISiAOn1c9bd5jhIhgZ4tjFkKNdjP1bBDjn4SXiwj9rQmb6iJkFiCcG8pyqxIK0P M4k3ehOCgKcLqCeeORMRbVcOpTJ1H31P1Ro8WjpE/x9Csxo4uzzNNa3mVjfbykrYABD69xsoWBrOg biJuGY7HAUbOVg==; 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 1omKzi-0004HU-Fx; Sat, 22 Oct 2022 16:21:22 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <3ba120cf2d9ec36d15bc89bc797eb004dbe91c18.camel@ist.tugraz.at> (Liliana Marie Prikler's message of "Fri, 21 Oct 2022 15:07:11 +0200") References: <87pmeohute.fsf@gnu.org> <87sfjjhjcd.fsf@gnu.org> <87a65qhmh3.fsf@gnu.org> <3ba120cf2d9ec36d15bc89bc797eb004dbe91c18.camel@ist.tugraz.at> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) Date: Sat, 22 Oct 2022 22:21:20 +0200 Message-ID: <87sfjf4njz.fsf_-_@gnu.org> 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: 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=1666575636; 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=B1rZif7uPQTTXckiQIBYg4sCjlUa1KbFl5ZhUWJOxIg=; b=Njy89KU0bTinsNF3822nse/3g7yNunNu53gpBZqGwPnNUwAoRohW3GYRFQDLqtIWIEV1Op nbuN8o0QWEbRSr1Tskm/5TA9tFmcxTH5XKMFPAUHPY/7Uxza5jw2Cdn0SIMLQVUs2eIazo KKDemO2StiB9dB++iIbRI7EkJJlp8bpJ8jUNvk9YThuD2zTKQ31NgDlTRhTxXoc6/eTNOO VDU8oC1bMrFqOL69a+sp4MGBd+3k8RNERDu2HlJQ0c7kzZQQpfdMyB4z5d+fn6fD051aHp 4Amzz5rl1IDrYjwhNDgukwyqSgeo58JBPf3CW3hylV8cPe5GBXyyS0hvzaBGKw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666575636; a=rsa-sha256; cv=none; b=BaUc7vi+knX8BpM06zArBhtGJ/Y6J8CzAa92ftNxGijqZvMH3mszlApjc46tZvg08QEQOj 7IoHuwMKLawJP4vn65oFL2DkyAAC1hx81RK9IK5butl4SmoU60cWOsAhyHmBLZzwZpPSkQ kNdrMSxPyt0ojZ1UC7b/OETllKbGGT0k3+QHDT2p4T22N+zCvxCm/ckrBLeE33ydEh5ZTD BOGYt2Yk5B40jftJOIyd8lUp6ugh2zU/JgSXf38DiFRUgPn4FUlyYNjR61kDr59JGXiB6L GJ6yuYd79sPnK4noWRdnola3IJqA+qrOSzgmwV/rVg4g5ugXcHGZERHZZHMdHQ== 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=Ies65QeJ; 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: -2.21 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Ies65QeJ; 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: CCFBB32CDB X-Spam-Score: -2.21 X-Migadu-Scanner: scn0.migadu.com X-TUID: DVaTQnUri3JL Liliana Marie Prikler skribis: > Am Donnerstag, dem 20.10.2022 um 11:29 +0200 schrieb Ludovic Court=C3=A8s: >> Logging as performed by =E2=80=98%service-file-logger=E2=80=99 is quite = GC-intensive >> (but shouldn=E2=80=99t be leaky!); this bit: >>=20 >> =C2=A0=C2=A0=C2=A0=C2=A0 (let ((prefix (strftime default-logfile-date-fo= rmat >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 (localtime (current-time))))) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (format output "~a~a~%" prefix line) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (loop)) > > (let ((prefix (strftime default-logfile-date-format > (localtime (current-time))))) > (format output "~a~a~%" prefix line) > (loop)) > > Would it make a difference if you instead wrote > > (let ((prefix (strftime default-logfile-date-format > (localtime (current-time))))) > (format output "~a~a~%" prefix line)) > (loop) > > ? Semantically, they're equivalent (perhaps with a wrapping begin > needed), but the compiler might fail to see this. I=E2=80=99m confident the compiler does the right thing, and it=E2=80=99s a= tail call so =E2=80=98prefix=E2=80=99 doesn=E2=80=99t outlive one loop iteration. Ludo=E2=80=99.