ps version is UNKNOWN in procps 2:3.3.16-1ubuntu2

Bug #1917148 reported by Mat M
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
procps (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Low
Kellen Renshaw
Hirsute
Fix Released
Undecided
Unassigned
Impish
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * Breakage of tools expecting the version number or the number to substantially match the Debian package version.
 * May confuse users expecting the version to substantially match the Debian package version.
 * Restores behavior to that provided in Groovy/Hirsute+ and Bionic and prior releases.
   - Focal is the only release affected.
 * Backported Debian fix to restore ".tarball-version" file to provide version information during build.
   - Also included the autopkgtests for versioning from the same Debian fix.

[Test Plan]

 1) Create a Focal (or derived from Focal) system.
 2) Execute "ps --version" or any of the binaries provided by the package with their respective version flags.
 3) Instead of desired output of the version, the output is:
    the invoked binary name followed by "from procps-ng UNKNOWN"
    Example: "ps from procps-ng UNKNOWN"

[Where problems could occur]

 * This fix could cause issues if applications have come to depend on the incorrect behavior. IE, an application that uses a version string of "UNKNOWN" as part of a heuristic for identifying a Focal system.
 * If the version of procps-ng is incremented, this patch would need to be updated or removed if it is no longer relevant. Otherwise, an incorrect version would be reported by the binaries.

[Other Info]
 * This change is in Groovy+ and Debian packaging with the same version of procps-ng.
   - Introduced in procps (2:3.3.16-5) unstable in Debian.

[Original Description]

From Linux Lint 20.1, so Focal Fossa 20.04.1

Package procps 2:3.3.16-1ubuntu2

$ LANG=C ps --version
ps from procps-ng UNKNOWN

I don't know if it comes from Ubuntu or upstream.

Mat M (matm-8)
description: updated
Norbert (nrbrtx)
tags: added: focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in procps (Ubuntu):
status: New → Confirmed
Revision history for this message
Norbert (nrbrtx) wrote :

# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

# apt-cache policy procps
procps:
  Installed: 2:3.3.16-1ubuntu2
  Candidate: 2:3.3.16-1ubuntu2
  Version table:
 *** 2:3.3.16-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

# ps --version
ps from procps-ng UNKNOWN

Changed in procps (Ubuntu):
assignee: nobody → Kellen Renshaw (krenshaw)
Revision history for this message
Eric Desrochers (slashd) wrote :

I'll be reviewing the change with my colleague Kellen.

In the meanwhile ...
What is the concern/impact behind not having the version available in ps ? (Outside it should output/report it) ?

The version can be found in the package version (dpkg -l procps)

Is it for integrity purposes in order to make sure the ps binary in place really comes from that given procps package ? If it is the case, making --version works won't help much as an integrity check. There are other approaches that can be used to achieve this goal such as 'dpkg '--verify' and '--audit'

To summarize, I'm trying to find the rationale behind it to clearly document the bug when we'll reach the SRU approval/justification.

Eric

Eric Desrochers (slashd)
tags: added: seg sts
Changed in procps (Ubuntu Bionic):
status: New → Fix Released
Changed in procps (Ubuntu Hirsute):
status: New → Fix Released
Changed in procps (Ubuntu Impish):
status: Confirmed → Fix Released
Changed in procps (Ubuntu Focal):
assignee: nobody → Kellen Renshaw (krenshaw)
Changed in procps (Ubuntu Impish):
assignee: Kellen Renshaw (krenshaw) → nobody
Changed in procps (Ubuntu Focal):
importance: Undecided → Low
description: updated
Eric Desrochers (slashd)
Changed in procps (Ubuntu Focal):
status: New → Confirmed
Eric Desrochers (slashd)
tags: added: sts-sponsors-slashd
Revision history for this message
Kellen Renshaw (krenshaw) wrote :

Proposed debdiff for Focal

description: updated
Changed in procps (Ubuntu Focal):
status: Confirmed → In Progress
description: updated
Revision history for this message
Kellen Renshaw (krenshaw) wrote :

Autopkgtest for the attached debdiff.

Revision history for this message
Eric Desrochers (slashd) wrote :

[sts-sponsors]

Debian uses autopkgtest for 'version' w/ restriction superficial as follows:

Tests: version
Restrictions: superficial

https://people.debian.org/~eriberto/README.package-tests.html

superficial
The test does not provide significant test coverage, so if it passes, that does not necessarily mean that the package under test is actually functional. If a superficial test fails, it will be treated like any other failing test, but if it succeeds, this is only a weak indication of success. Continuous integration systems should treat a package where all non-superficial tests are skipped as equivalent to a package where all tests are skipped.

Additionally, since that ".tarball-version" only focus on upstream version "3.3.16". The version won't change unless ones bump the version (which won't happen in stable release) unless under serious exception. So this value is unlikely to be removed or changes any time soon in Focal.

Usually, adding autopkgtest inside an SRU is not a desired change.

For the above reasons, I think it is safe to skip the autopkgtest and only focus on the version fix.

Eric Desrochers (slashd)
description: updated
Revision history for this message
Eric Desrochers (slashd) wrote :

[sts-sponsors]

Sponsored in Focal upload queue, now waiting for SRU verification team approval.

Thanks for your contribution, Kellen.

Test case validation (before upload):
----
root@procpsf:/tmp# pgrep --version
pgrep from procps-ng 3.3.16

root@procpsf:/tmp# ps --version
ps from procps-ng 3.3.16

root@procpsf:/tmp# free --version
free from procps-ng 3.3.16
----

- Eric

Eric Desrochers (slashd)
tags: removed: sts-sponsors-slashd
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

hm, I am a bit worried about this patch. Basically it's as the regression potential field mentions: I don't like the idea that the patch hard-codes the version number in the patch body. On the other hand, it feels rather unlikely that we'll be bumping the upstream version in focal... I think we'll likely just stay on 3.3.16. Still, need to think about this a bit.

Revision history for this message
Eric Desrochers (slashd) wrote :

I totally get your concern. In the same time, other procps pkkg in Ubuntu groovy, ... uses the same approach.

But I leave you to decide what is best for this particular bug.

Let us know.

Thanks

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Mat, or anyone else affected,

Accepted procps into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/procps/2:3.3.16-1ubuntu2.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in procps (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (procps/2:3.3.16-1ubuntu2.3)

All autopkgtests for the newly accepted procps (2:3.3.16-1ubuntu2.3) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

xpra/3.0.6+dfsg1-1build1 (amd64)
reprotest/0.7.14 (amd64, arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#procps

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Eric Desrochers (slashd) wrote :

[autopkg regression]

All tests are now fine. They needed a second retry.

- Eric

Revision history for this message
Eric Desrochers (slashd) wrote :

[Verification Focal]

This has been brought to my attention by an impacted user:

"
I was able to apply the fixed procps package from the focal-proposed repo on servers in a test cluster. The fix resolved the issue with free -V and the related DataStax OpsCenter error.

Thanks
"

- Eric

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package procps - 2:3.3.16-1ubuntu2.3

---------------
procps (2:3.3.16-1ubuntu2.3) focal; urgency=medium

  * Fixes version output of utilities (LP: #1917148)
    - d/p/fix_version.patch

 -- Kellen Renshaw <email address hidden> Thu, 09 Sep 2021 08:59:24 -0400

Changed in procps (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for procps has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.