Bug 895971 - Running niceload updatedb doesn't work on Fedora
Summary: Running niceload updatedb doesn't work on Fedora
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: parallel
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Golo Fuchert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-16 12:04 UTC by Tobias Mueller
Modified: 2013-08-01 18:47 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-01 18:47:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tobias Mueller 2013-01-16 12:04:07 UTC
Description of problem:
Whenever I have some disk IO on my system, the system becomes very very laggy and the load spikes to 12 or 20. Usually, this happens every morning when cron.daily executes updatedb.

I installed parallel to get "niceload" which explains in its manpage the very usecase I have, namely running updatedb.

So I changed /etc/cron.daily/mlocate.cron and to read

#!/bin/sh
nodevs=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" { print $2 }')
renice +19 -p $$ >/dev/null 2>&1
ionice -c2 -n7 -p $$ >/dev/null 2>&1
niceload -L 5 /usr/bin/updatedb -f "$nodevs"




That, however, doesn't as expected as cron now mails me angrily: 


/etc/cron.daily/mlocate.cron:

sh: line 1: bdev: command not found
sh: line 2: proc: command not found
sh: line 3: cgroup: command not found
sh: line 4: cpuset: command not found
sh: line 5: tmpfs: command not found
sh: line 6: devtmpfs: command not found
debugfs 1.42.3 (14-May-2012)
debugfs:  sh: line 8: securityfs: command not found
sh: line 9: sockfs: command not found
sh: line 10: pipefs: command not found
sh: line 11: anon_inodefs: command not found
sh: line 12: configfs: command not found
sh: line 13: devpts: command not found
sh: line 14: ramfs: command not found
sh: line 15: hugetlbfs: command not found
sh: line 16: autofs: command not found
sh: line 17: pstore: command not found
sh: line 18: mqueue: command not found
sh: line 19: selinuxfs: command not found
sh: line 20: binfmt_misc: command not found
sh: line 21: rpc_pipefs: command not found
sh: line 22: nfsd: command not found
sh: line 23: fuse: command not found
sh: line 24: fusectl: command not found


I presume that there is something wrong in niceload's perl script to execute updatedb.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:
I expected cron not to barf on me.

Additional info:

Comment 1 Golo Fuchert 2013-01-17 00:50:19 UTC
Hi Tobias,

the version of parallel in F17 is quite old. I didn't push an update to F17 due to the Fedora update policy. Since this bug _may_ already be fixed in newer versions, I now updated parallel in F17 (and newer branches). This update should be available soon. Please let me know then if this solves your problem.

Comment 2 Fedora Update System 2013-01-28 22:55:03 UTC
parallel-20121222-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/parallel-20121222-1.fc17

Comment 3 Golo Fuchert 2013-01-30 16:04:49 UTC
Hi Tobias,

could you please try if the new version fixes your problem? You can install it with
# yum install parallel --enablerepo=updates-testing
If this doesn't fix your problem we can ask upstream for help.

Comment 4 Tobias Mueller 2013-02-05 10:51:17 UTC
hm. Well. I don't have the feeling it's fixed yet.
And the problem can be illustrated like so, I guess:

muelli@bigbox /tmp $ cat args.sh 
#!/bin/sh

echo $#
muelli@bigbox /tmp $ ./args.sh only "two arguments"
2
muelli@bigbox /tmp $ niceload ./args.sh only "two arguments"
3
muelli@bigbox /tmp $ 


I expected niceload to handle arguments for the applications it's calling correctly.


That problem is then, that the cronjob doesn't work as expected. This is my current crontab:
$ cat /etc/cron.daily/mlocate.cron 
#!/bin/sh
nodevs=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" { print $2 }')
renice +19 -p $$ >/dev/null 2>&1
ionice -c2 -n7 -p $$ >/dev/null 2>&1
niceload -L 3.5 \
/usr/bin/updatedb -f "$nodevs"

and the process tree looks like this:

usr/sbin/anacron -s
─ /bin/bash /bin/run-parts /etc/cron.daily
  ├─ awk -v progname=/etc/cron.daily/mlocate.cron prognam   prin
  └─ /bin/sh /etc/cron.daily/mlocate.cron
     └─ /usr/bin/perl -w /bin/niceload -L 5 /usr/bin/updatedb -f sysfs b
        └─ /usr/bin/perl -w /bin/niceload -L 5 /usr/bin/updatedb -f sysf
           └─ sh -c /usr/bin/updatedb -f sysfs bdev proc cgroup cpuset t
              └─ /usr/bin/updatedb -f sysfs

so you see there is only one argument following updatedb -f, instead of many.

so: This bug still exists.

Comment 5 Golo Fuchert 2013-03-01 09:06:43 UTC
Hi,

I contacted the developer of niceload. He assumes that there is a small syntax error in the niceload command line. He suggests to try

$ niceload -L 5 /usr/bin/updatedb -f $nodevs

or

$ niceload -q -L 5 /usr/bin/updatedb -f "$nodevs"

since $nodevs might contain newlines.

I hope that solves your problem.

Comment 6 Tobias Mueller 2013-03-04 11:40:53 UTC
Hm. It does indeed. The man page probably wants to be adapted, then.

But I think that --quote is a bad bad misnomer. I didn't expect niceload to tamper with the arguments so that I expected
   niceload ./args.sh only "two arguments"

to give two arguments to the args.sh program.

Comment 7 Fedora Update System 2013-06-03 02:59:17 UTC
parallel-20121222-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora End Of Life 2013-07-04 07:03:28 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. 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 WONTFIX if it remains open with a Fedora 
'version' of '17'.

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 prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 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 to Fedora 17's end of life.

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 9 Fedora End Of Life 2013-08-01 18:47:14 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 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.

Thank you for reporting this bug and we are sorry it could not be fixed.


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