From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83D5E22A7F0 for ; Thu, 29 Jan 2026 19:05:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.188.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769713550; cv=none; b=sADjeX60BUzARsRzCVQKpZV9WlWlRrSYY8rz7QdpIJyGNXXn555M9q/EIF5B+YwvMTdn1/tzAgK0mmiRlSe7762RmPyK0wQCTrXTDjjv1qDiAqEMOW1eop4yrNL2lyXH7nB18Qjd4CrKhsMmBeIlWoG+qKnC6iKhuDzI1wMiLng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769713550; c=relaxed/simple; bh=lOluY+kohGK59RnEdPozu9jf5kxwl95BMHOqO2h81u4=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=Cf0NLxRLnWQp3lzZzM3X9wDEW4ZQA3kuwYsCBmzVrH1cSPv3DTjezXlEMRR0tLahVP7/M0a2TE96wqcNgtpDR07EQYIKkHtBnhrr4pQm34nm1P1hxwe2XLQu0xydVg5ks6tkojudKwkXhH3Q0CgXI+hY+LOEp31zEW5NyyeD3ys= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=canonical.com; dkim=pass (4096-bit key) header.d=canonical.com header.i=@canonical.com header.b=MwVKP/Np; arc=none smtp.client-ip=185.125.188.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=canonical.com header.i=@canonical.com header.b="MwVKP/Np" Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 849B03F921 for ; Thu, 29 Jan 2026 19:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20251003; t=1769713502; bh=3YUwGhSe5cmulYnP+zjzxZ+VOJXRSZEIvRudrnykpq0=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=MwVKP/NphefDyhkCzZFfYA58vOfbIU2efKcfNpBLjz16wRnxOCKPTXZajhXX/zPKA k/pG62jGCK9+QzPmgaVQcdF2W9qxjxuDRj2ZBKkBnXMfVy13M7UmYp2uKKuYwk0JoD 5IzFbzaaeC0+0AJvSM3XF6KTPcuxNS3663846hGAP/OJFwCgRqnZZj0Acf5EiurdgO L0JeA4tvrSvT5e0weWZ3+Xroso6ZIJ5d4bs2mtlD/DLV2NDGvcwC7+7CrxjMOtJurd svQFV8VEsrC8/GX9LR5C7W1/DGJJOAw2CMTidu/RuA4+o84JPKNmdmRCTqxzvwwCv1 QYrC5w674/EFRfyPvAWVH5UaAJL+UInDy50fTbvV8cHXpkJgTxWIhEgCEzlETxyT8r tuDaI8v34s7hM18fZ3Ql+oSIpMlICxslbDBltZIIehkZJr4fJalXii4z6LBo3eOxel n4ybcCjMOMG1CVKPDXkPBwDt9ku/8wCGaZM1eM/3bIh7LLQXhiFJiuui3L01iHAUUK cI2zN0bDB+oEWVxk9k69dgViS4MwMiQJgaI/ZbbL/3/7UWoGoolZJqybGyuvAE1TzK OWgXIkooxjZpTwnjblzlD/z+qUSnbNvUqw9/717PV7zPpaBd1BLflgL6Xuz5VZAB/O Hqj1lbJg4vjbLD06SJ+/qCRU= Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4806fa4a180so10903775e9.2 for ; Thu, 29 Jan 2026 11:05:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769713502; x=1770318302; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=3YUwGhSe5cmulYnP+zjzxZ+VOJXRSZEIvRudrnykpq0=; b=QQIsMkrfSTzAFwl6d1xlfOJ3MR7+HcRzxHFnvesE0eLkC3goEygoOdcDQJTghZlHuH DQ6nSNZAvFipNgiKZVLUolfWm/wG4qItAoZleS+TyYYscH+U8a/5nKxo3eB+Xne68KEH XUfX2XttG5uwM4DWLXqPGlAlnH32t8MLd1TljPKZoLZCHmCIp8ZQds9TapwcJ8KHNstm jWh6vUXguqaedmQ3nbKBfrKClMGsrIOhmtTiZZxtzP0y4zOm3fm2/iG4l36C/jSiIe5a LVh/nq95hY/fUBrPgxPnEgFuOkzxxlwOJ5tpnYFBp1ribRP0Pq0E0nxDeihyZtMslPxT o1Dw== X-Forwarded-Encrypted: i=1; AJvYcCVLlr409AK1C+8f5XlxG81EkGDOtknlH/HdIbG05m0dXKAXlr23ynK0H/r7QSlFGWnci03hPFCOdqLIR/U=@vger.kernel.org X-Gm-Message-State: AOJu0YzFvGqANROZo0k/q9ObTM/ivAluTts0cOqcfMgPXQFJo93RMqR2 jLqojCURFXPikDeW/oiB7Hfc0QtKiG2r7cEQqbCyAGuyMBTUwHxsBMbjXEWkqYzuqASmhqIO2Vo o4NyJVv8WEnyXqDCbkpS4BHjyXtaVMqOSuMBHrn3KYoaT4crEBy+cNz9Ba8FEI0GhhtJ0Ec8A7+ 8yaz2C4Q== X-Gm-Gg: AZuq6aI8K8V6vVDJPG+DcCr+3kPzi/PY38GB6jjA8oqZAQJA5MPLvzURdIQrrOkngYY NsqOz2BXGbzXPXnwmuXNNXfgxNhlfBfptmJvyyaBWHi7X5A2qqxh5Tho8OaUOnNTZw/nk/T32xG JJnxPQC8FgaCaCFmEbAXwr4Mp9QhGioXegRBBNi7f9LVdC0/ORUE6I2td7T52vfmrGDjb5hD2le 02lfec+XVoFo8RxGJIayQgLDCRLAiLN5f6GATR5vimLAXTeHh8IJBdeS5OzDjl39YVi+K3c/Fdn Erinf1xGRerf+netF/zyK291EZh51uc2zHVFwj9bgfmn5Yy0URE3SdPhlV+572db8kcZeRd82ys dIoGxIBTX X-Received: by 2002:a05:600c:1385:b0:47e:dc64:f1c6 with SMTP id 5b1f17b1804b1-482db493eb4mr2539205e9.6.1769713502061; Thu, 29 Jan 2026 11:05:02 -0800 (PST) X-Received: by 2002:a05:600c:1385:b0:47e:dc64:f1c6 with SMTP id 5b1f17b1804b1-482db493eb4mr2538845e9.6.1769713501608; Thu, 29 Jan 2026 11:05:01 -0800 (PST) Received: from localhost ([2001:67c:1562:8007::aac:4abc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-482da909669sm1850615e9.9.2026.01.29.11.04.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Jan 2026 11:05:00 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 29 Jan 2026 13:04:57 -0600 Message-Id: Cc: "Alexander Viro" , , Subject: Re: PROBLEM: Duplicated entries in /proc//mountinfo From: "Zachary M. Raines" To: "Christian Brauner" X-Mailer: aerc 0.20.0-2ubuntu1~jmap References: <20260129-geleckt-treuhand-4bb940acacd9@brauner> In-Reply-To: <20260129-geleckt-treuhand-4bb940acacd9@brauner> On Thu Jan 29, 2026 at 8:28 AM CST, Christian Brauner wrote: > On Wed, Jan 28, 2026 at 08:49:12AM -0600, Zachary M. Raines wrote: >> ... >> 2. Reads `/prod/1/mountinfo` and checks for duplicates >> >> #!/bin/bash >> THRESHOLD=3D75 >> echo "Starting monitoring at $(date)" >> while true; do >> # Get mountinfo entries and count total >> mountinfo=3D"$(cat /proc/1/mountinfo)" >> mountinfo_count=3D$(echo "$mountinfo" | wc -l) >> >> if ((mountinfo_count > THRESHOLD)); then >> echo "$(date): Mount count ($mountinfo_count) exceeds threshold = ($THRESHOLD)" >> >> # Find and log duplicate mount points with their counts >> duplicates=3D$(echo "$mountinfo" | sort | uniq -cd) >> >> if [[ -n "$duplicates" ]]; then >> echo "Duplicate mounts :" >> echo "$duplicates" >> fi >> echo "=3D=3D=3D=3D=3D" >> echo "$mountinfo" >> echo "---" >> fi >> >> sleep 0.1 >> done >> ... > Thanks for the report. So it's a bit unfortunate that you're showing > duplication by source path. That's not as useful as that can > legitimately happen. So the better test would be to see whether you get > any duplicated unique mount ids, i.e., whether the same > mnt->mnt_id_unique appears multiple times. Because that's a bug for > sure. It turns out I pasted the output of an old version of my test script, above, but if you look at the script itself, it checks for duplicates, of the entire mountinfo line, i.e., duplicates have the same unique id. > I suspect the issue is real though. I'm appending a patch as a proposed > fix. Can you test that and report back, please? I'm traveling tomorrow > so might take a little. Thank you for the quick turnaround on that patch. I applied it on top of 6.19-rc7 and after about 3 hrs I haven't seen any duplicates, in contrast to without the patch where they appear in under 10 minutes. Let me know if there's any other testing that would help. Best, Zach