From nobody Sat Jun 6 13:15:38 2026 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 4gXf1l1MDrz6ggnm for ; Sat, 06 Jun 2026 13:15:39 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gXf1l0ZKkz3Mr2 for ; Sat, 06 Jun 2026 13:15:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780751739; 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; bh=iP1IA0VqR4/AX+VGOLUlvI88PcwYRMwcZ01VeYmlHvI=; b=e0+08Yxw8ud+i3cS7GWbVMP5tuDFbcpmMMTjsu4bjR2+PHZHKMClED7CJeth9ORR2F64Ya nk/CNFNl5v6gLnJ9K1GUivxVCjFRdEdkeeBzJCDGFUbr++XJ/VItzCYoV+fKtMiWV92S8k OGeKe5jvV7ahvsrH9IHr780bIQKUjrWrhN0XaPtKsd3NbtLYomFA+ITMEYfwzQ9s9O3so4 Dx0u8rhzCG/nFg7Dl7VHn9nibyOP7chLegbIT7rBc29yjYrHkiJKn/YLp4tVBW3+pzWMKQ tR+kmJTg3VidCTlrXx/po1cYTO4OxTXJVFF8u2Kx2mpgJ+4JtSuUpxSZFVcM6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780751739; a=rsa-sha256; cv=none; b=CWqpO9xBPzwYtGnITMiR7yHLKg5DfyrGGlY6IgLF65sKSKhlxOoQMSfiYHiibBR18MgTnl Ip+gZ9f/neXgLieC/nsiwW5+dx/1Y3po04xzKpzp4vFYoXlihlj/BMxVuragaXqNgj125/ 157gkED+Hq5OOogcdBMqNZvvT2B40UkWFfbvpuxouwF/1NroxAidtMdCYR3DnzqL/+UN0T gMkqzprm1jNQGjkSN3RMtvAxczZUizDGv1uQD//ULAlnSdsWnOkmaZzfECanaXQAJD+18V N4C0AsvOiYxWHDGI9VGtF5LTNgbMotXXwsnxCcqcSRxvwfZvWssy9LhXZVn98Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780751739; 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; bh=iP1IA0VqR4/AX+VGOLUlvI88PcwYRMwcZ01VeYmlHvI=; b=TJvLeGEsjrdUiY5mxYS1wcH+yP9B1rlzDRpNi5Be5b7v7JYRDVUXs2bf+ccnCpLnwulgit KPoMQKgKVSQFoPvBGy5JT7bcckPTBu3hxzxsPXHpNVgabuNzqmYyt3Jth0JMrEUhbabJfg 8V0sxz/EPlIij2eO2yi+rRO7+ojaas5+/sV+KyP81pQz7k38myyyqATjwUzHb9MBcWVXXR 9RmreKLjrDgq6U9fAxXw/zercFhj12OALUN/OJRl2LbtDRDqp2VCB5L0+YzG/R94tn90tc x/LoKDlI745T+Qi6RwwzUpIV4fgk88dKCwtpRggfDs2N51G5nof4M5dRqxBiXg== 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 4gXf1l0B4Dz21T for ; Sat, 06 Jun 2026 13:15:39 +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 656DFcIi091339 for ; Sat, 6 Jun 2026 13:15:38 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 656DFcpP091338 for bugs@FreeBSD.org; Sat, 6 Jun 2026 13:15:38 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 295893] "procstat binary " returns 0 despite file not found after replacing binary Date: Sat, 06 Jun 2026 13:15:38 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ltning-freebsd@anduin.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D295893 Bug ID: 295893 Summary: "procstat binary " returns 0 despite file not found after replacing binary Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: ltning-freebsd@anduin.net When using 'procstat binary' to identify whether running code matches the on-disk version, I get the following behaviour: --- $ procstat binary $$ PID COMM OSREL PATH 38822 bash 1500068 /usr/local/bin/bash $ sudo pkg upgrade -qy bash $ procstat binary $$ PID COMM OSREL PATH procstat: sysctl: kern.proc.pathname: 38822: No such file or directory $ echo $? 0 --- I would expect the exit code to be 1, as it would be if the given PID did n= ot exist: --- $ procstat binary 1234 procstat: sysctl(kern.proc): No such process procstat: procstat_getprocs() $ echo $? 1 --- Am I wrong in assuming this can be considered a bug? --=20 You are receiving this mail because: You are the assignee for the bug.=