Bug 1252865 - /usr/bin/free -s broken, and possible issues with man page.
/usr/bin/free -s broken, and possible issues with man page.
Status: ASSIGNED
Product: Fedora
Classification: Fedora
Component: procps-ng (Show other bugs)
26
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Jaromír Cápík
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-12 08:09 EDT by Greg
Modified: 2017-08-09 06:39 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-08 08:07:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
backported commit fd007d6d: free: Parse -s option correctly. (441 bytes, patch)
2016-12-13 01:21 EST, Christian Kujau
no flags Details | Diff

  None (edit)
Description Greg 2015-08-12 08:09:43 EDT
Description of problem: /usr/bin/free -s fails for floating-point and integers.


Version-Release number of selected component (if applicable):
3.3.10-5

How reproducible: Always.


Steps to Reproduce:
1. /usr/bin/free -s 1
free: seconds argument `1' failed

2. /usr/bin/free -c 1
works

3. /usr/bin/free -s 1 -c 1
free: seconds argument `1' failed

4. /usr/bin/free -c 1 -s 1
works

Actual results: As above. Verified that c > 1 work, when -c works at all.

Expected results: Functional continuous results from /usr/bin/free, and agreement between man page and program output. From man:
-c, --count count
Display the result count times. Requires the -s option.
-s, --seconds seconds
Continuously display the result delay seconds apart. You may actually specify any floating point number for delay, usleep(3) is used for microsecond resolution delay times.

Currently, it is -s that requires -c. Which is perverse if one wants to use free as a rough and ready means of tracking memory usage as several processes are started, and the time required to do that is unknown, Nor should order of specifying -c and -s matter, which would be a usability bug.

Additional info: Discovered this while attempting to use '-s 0.1', and discovering that even integers did not work.
Comment 1 Christian Kujau 2015-08-29 02:47:40 EDT
Could not reproduce this issue with the _upstream_ version (neither v3.3.10 nor current master). Btw, the package description still cites Sourceforge as its upstream project URL, but it's moved to Gitlab now: https://gitlab.com/procps-ng/procps
Comment 2 Greg 2015-08-29 17:48:05 EDT
Verified it 2015-08-23 after updating to procps-ng-3.3.10-8.fc21.x86_64. It wasn't in the changlog, but thought that perhaps that was an oversite. 

For completeness: 
$ date; cat /etc/redhat-release
Sat Aug 29 14:44:39 PDT 2015
Fedora release 21 (Twenty One)
$ /usr/bin/free -s 1
free: seconds argument `1' failed
$
Comment 3 Fedora End Of Life 2015-11-04 05:41:08 EST
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 4 Christian Kujau 2015-11-06 14:10:45 EST
This is still happening in F22, but I'm unable to change the 'version' field on this bug:

$ rpm -qf /usr/bin/free
procps-ng-3.3.10-8.fc22.i686

$ /usr/bin/free -s 1
free: seconds argument `1' failed
Comment 5 Greg 2015-11-13 02:58:26 EST
Yeah. Just upgraded to F22. It seems to have let me change it. I guess I'll know when I save changes...
Comment 6 Christian Kujau 2015-11-15 22:54:45 EST
Oh, and also present in F23:

$ rpm -qf /usr/bin/free
procps-ng-3.3.10-9.fc23.i686

$ /usr/bin/free -s 1
free: seconds argument `1' failed
Comment 7 Greg 2015-11-17 16:27:14 EST
My stay on F22 was extremely brief, due to other problems. In this case, I decided to risk F23 rather than bail to CentOS (which I may still do), verified your result, and changed the version to 23. Because bugs in older, more stable  versions seem to get little or no attention from at least some maintainers.

Sorry for the rant, but when I was assigned a bug, in a former role. the first thing I did was a quick review and a best-effort status (priority, etc.) communication. But that is mere professionalism, and is apparently outweighed by the advantages of remaining entirely silent.
Comment 8 Kees de Jong 2016-09-16 07:19:49 EDT
Also present in Fedora 24.
Comment 9 Fedora End Of Life 2016-11-24 07:17:35 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 10 Kees de Jong 2016-11-24 07:27:18 EST
This bug is also present in Fedora 25. Please update the Fedora version in this bug report, I'm unable to do that, insufficient permission.
Comment 11 Greg 2016-12-07 21:21:59 EST
Verified that initial bug report still valid on F24, changed distro. Do not have a F25 instance, but at least they won't kill it EOL, as per SOP. 

1252865: making performance analysis difficult for a year and a half, and counting. Kudos to assignee Jaromír Cápík.
Comment 12 Christian Kujau 2016-12-13 01:20:50 EST
This is still present in F25.

And it appears to be a real bug in upstream procps-ng that has been fixed quite over a year ago:

 > free: Parse -s option correctly. 
 > https://gitlab.com/procps-ng/procps/commit/fd007d6d1df1714bda1338d8423c8c72238a6a14

Applying this commit along to Fedora's version of procps-ng (from the pkgs.fedoraproject.org Git tree) fixes it for me.

That being said (and the fact that even Debian/testing ships procps-3.3.12 already), Fedora should upgrade to the latest procps release too.
Comment 13 Christian Kujau 2016-12-13 01:21 EST
Created attachment 1231070 [details]
backported commit fd007d6d: free: Parse -s option correctly.
Comment 14 Greg 2017-02-02 13:23:56 EST
Still present in F24.

$ daterel; rpm -q procps-ng coreutils
Thu Feb  2 10:15:06 PST 2017
Fedora release 24 (Twenty Four)
procps-ng-3.3.10-11.fc24.x86_64
coreutils-8.25-7.fc24.x86_64
$ /usr/bin/free -s 1
free: seconds argument `1' failed
$
Comment 15 Christian Kujau 2017-02-17 21:06:03 EST
Clearing the [needinfo] flag; even a patch has been provided :-)
Comment 16 Christian Kujau 2017-07-10 17:04:57 EDT
Still present in F25 (although the package name still says "f24"):

$ rpm -qf `which free` /etc/os-release; free -s 1
procps-ng-3.3.10-11.fc24.x86_64
fedora-release-25-2.noarch
free: seconds argument `1' failed
Comment 17 Fedora End Of Life 2017-07-25 15:08:39 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 18 Kees de Jong 2017-07-26 09:58:37 EDT
Still present in both Fedora 25 and Fedora 26.

Fedora 25: procps-ng-3.3.10-11.fc24.x86_64
Fedora 26: procps-ng-3.3.10-13.fc26.x86_64

According to the --help output: "-s N, --seconds N   repeat printing every N seconds"

# free -s 5
free: seconds argument `5' failed

# free --seconds=5
free: seconds argument `5' failed
Comment 19 Fedora End Of Life 2017-08-08 08:07:47 EDT
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 20 Rex Dieter 2017-08-08 08:27:53 EDT
rebasing per comment #18
Comment 21 Jan Rybar 2017-08-09 06:39:32 EDT
Waiting for upstream's new release 3.3.13 containing new features and upstreamed fixes (including this one). It should come any moment now. We hoped for it to come to F26, but it's still being finished.

Please be patient.

Note You need to log in before you can comment on or make changes to this bug.