From nobody Mon Aug 08 15:35:30 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M1gJL5kpFz4YJNG for ; Mon, 8 Aug 2022 15:35:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M1gJL4hr4z3CT2 for ; Mon, 8 Aug 2022 15:35:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M1gJL3gY8zx04 for ; Mon, 8 Aug 2022 15:35:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 278FZUDJ047170 for ; Mon, 8 Aug 2022 15:35:30 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 278FZUvY047169 for bugs@FreeBSD.org; Mon, 8 Aug 2022 15:35:30 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 262743] Memory leak in security/strongswan's charon daemon when communicating over vici socket. Date: Mon, 08 Aug 2022 15:35:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mskalski13@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659972930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DP/v7aSmPbqseZpEhzHs++XTnssGpLgiUNTlI8CUyeQ=; b=ADMOMXWZ5jKn2qoZj4V3blv4FMljmvRrGnwt/eCX4NloUS/L0qaM4zD8qwN31cD3b76CoT IxoPmGXW4zmcJN0LDwj5WmixDArT8STRNv6d/9TIoULdA+nX/kPogn8WJHJomUG+4/hl1/ ODDjh8haISkUviolYpLydv5e1lM+SG4ZT3uUSOt7JgJoyZGGmleeyjLsJ2rsu+Y2es1as7 DCfbbZ93G0SnSWMi8sPo7nDa9cKkkZUGcnTBatvLG8Zv+GC9VXlTNtcE8LeUDnYG/iw7sU LsqqxgFFRmGvkeGRwiyyxg0DFUVzIw8u6EXa8yllH03aa6FgMYrRsSiftQINpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659972930; a=rsa-sha256; cv=none; b=RIRjLcmLI1RN3CLg9FpnlHrvC2+NhmQrallr12cAlT3bJ2dRq/sesLvEQIeCQaq4RFUI9R PaQFgR4nR5uTfaxVu3IyENHYS8bM5of+cIJ5NF8nKAMjzOZuZdlXf3mBkH/2nynTCCJ4qB 76CpMrkvUbTWmn2uga7uEPZohH5QnbmKJkd07butslhZzD/N2DW/vycFApxT/LdLZKyPrW ZiFlngTqtqfW3vCw1GEl6Shhnc+HWdjiG5oJMvIU06/8WUpUFnulfWleI4QvAT33kz6uMf 6KZlw8WWN5RUv2K3fYKypd8wkUZL7iOnDPOnIgLU+3JzoyboOmwbGx/2JCK9+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262743 --- Comment #7 from Micha=C5=82 Skalski --- OK, thank you very much for all the help. The problem was wrong (missing) `--with-printf-hooks=3Dbuiltin` option for configure script.=20 To be sure, I made longer (1.5 week lasting) tests with more strongswan's daemon `charon` stressing. I configured few tunnels with short lifetime and started executing stressing tests like below: sh -c 'while :; do swanctl -l >/dev/null && swanctl -L >/dev/null && swanctl -x >/dev/null || sleep 10; done' which lists all SAs, all configured tunnels and all certificates in an endl= ess loop. Results show that during time some memory (RSS) footprint increases over the time, but when memory is needed strongswan )or system) drops unused memory. And indeed first few minutes memory increase is quite large, which made me think `printf-hook=3Dbuiltin` option does not work at all. Attaching new shell script used for memory tracking using only `ps` (also `printf` and `date`) command and doesn't need python, adding also logs from this test and graph generated by gnuplot (gnuplot's script below). #!/usr/bin/env gnuplot set style line 1 linecolor rgb '#0060ad' linetype 1 linewidth 2 pointty= pe 7 pointsize 0.5 set xdata time set xlabel '[Time]' set ylabel '[MB]' plot 'charon_mem.log' using ($1):($5/1024) with linespoints linestyle 1 title columnhead(4) So the issue may be closed. --=20 You are receiving this mail because: You are the assignee for the bug.=