Bug 676427 - yum-updatesd runs with "nice 19", and that is inherited when it restarts services
Summary: yum-updatesd runs with "nice 19", and that is inherited when it restarts serv...
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-updatesd   
(Show other bugs)
Version: 14
Hardware: Unspecified
OS: Linux
Target Milestone: ---
Assignee: James Antill
QA Contact: Fedora Extras Quality Assurance
: 676425 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2011-02-09 20:11 UTC by Edgar Hoch
Modified: 2012-08-16 13:29 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-16 13:29:13 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Example part of /var/log/yum.log that corresponds to the update step of yum-updatesd when sshd was restarted. (10.53 KB, text/plain)
2011-02-09 20:11 UTC, Edgar Hoch
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 552279 None None None Never
Red Hat Bugzilla 742363 None None None Never

Internal Trackers: 552279 742363

Description Edgar Hoch 2011-02-09 20:11:21 UTC
Created attachment 477898 [details]
Example part of /var/log/yum.log that corresponds to the update step of yum-updatesd when sshd was restarted.

Description of problem:

Today we recognize that processes we have started with a remote shell using ssh have a nice of 19. But we have not started them with any nice.

We detected that /usr/sbin/sshd is running with nice 19.
Subprocesses like ssh logins inherit the nice of the daemon.
This is the reason why all remote logins with ssh also have nice 19.

But why is /usr/sbin/sshd running with nice 19?

We checked our hosts and found that /usr/sbin/sshd was restarted today on all our Fedora 14 hosts. But the restart time (the time shown by "ps -efl | grep /usr/sbin/sshd" is different on each hosts.

We also found that this start time corresponds to a yum-updatesd update step we found in /var/log/yum.log (a set of package updates nearly at the same time). We found this correspondence on all our Fedora 14 hosts.

Because of the timestamps in /var/log/yum.log and the start time of sshd I speculate that it may have to do with one of these packages:


Or it may have to do something with yum or yum-updatesd or with sshd?

I checked the scripts of the rpm packages for sshd (rpm -q --scripts ...package list from yum.log... | grep sshd) but nothing was found.

I don't know what program has restarted /usr/sbin/sshd and why.

A temporary workaround without rebooting the host is the following: Log in as root (or using su or sudo) and start "renice 0 PID" where PID is the pid of /usr/sbin/sshd. Then log out and log in again.

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




How reproducible:
It appears today (2011-02-09) after an automatic package update by yum-updatesd.
It seems that only Fedora 14 is affected.

Steps to Reproduce:
1. Install Fedora 14 including updates before 2011-02-09.
2. Create yum repositories as available at 2011-02-09 and configure yum to use these repos.
3. Start sshd.
4. Check that sshd runs with nice 0.
5. Start yum-updatesd.
6. Wait until yum-updatesd has installed the updated packages as of 2011-02-09.
7. Check if sshd was restarted and what the nice is.
Actual results:
sshd runs with nice 19.

Expected results:
sshd should run with nice 0.

Additional info:

The output of "ps -efl |grep /usr/sbin/sshd" on the example host that corresponds to the yum.log part in the attachment:

5 S root     15749     1  0  99  19 - 18767 poll_s 12:42 ?        00:00:00 /usr/sbin/sshd

Comment 1 Edgar Hoch 2011-02-09 22:07:24 UTC
I found some more informations:

# rpm -q --scripts glibc
shows as output among others:

postinstall program: /usr/sbin/glibc_post_upgrade.x86_64

See also:
# file /usr/sbin/glibc_post_upgrade.x86_64
/usr/sbin/glibc_post_upgrade.x86_64: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, stripped

# strings - /usr/sbin/glibc_post_upgrade.x86_64 | grep sshd

It seems that it may be the postinstall program of glibc which restarts sshd.

But why is sshd started with nice 19 now?
I earlier Fedora versions sshd runs with nice 0 and yum-updatesd with nice 19.

Comment 2 Edgar Hoch 2011-08-18 12:07:20 UTC
The problem still exists on Fedora 14.

I have noticed it again because the was a glibc update on August 13th 2011 which have restarted sshd.

The causal problem may be that yum-updatesd is started with

  daemon +19 'yum-updatesd &'

in /etc/init.d/yum-updatesd, which inherits the nice 19 to restated processes.

But yum-updated is running as root and may increase its nice level to 0 to restart processes - or at least this may be done when running rpm scripts, so that /usr/sbin/glibc_post_upgrade.x86_64 runs with nice 0.

Is there a solution?

I am not sure if the same problem exists on Fedora 15.
yum-updatesd is also started wit
  daemon +19 'yum-updatesd &'
and glibc also starts /usr/sbin/glibc_post_upgrade.x86_64 (and /usr/sbin/glibc_post_upgrade.i386) in the postinstall script, but sshd seems to run with nice 0.

There was an update of glibc at August 10th, 2011, and I have only one host running since before the update of glibc without reboot. But there sshd. is running with nice 0.

Has Fedora 15 a solution for this problem that is missing in Fedora 14?

Comment 3 Edgar Hoch 2011-08-18 12:10:16 UTC
*** Bug 676425 has been marked as a duplicate of this bug. ***

Comment 4 James Antill 2011-08-18 13:45:01 UTC
 You can run yum-cron instead of yum-updatesd, it is a known bug in yum-updatesd but it isn't at the top of anybodys TODO list atm.

Comment 5 Orion Poplawski 2011-09-29 20:30:24 UTC
yum-cron suffers from the same problem (although with nice 10 instead of 19), see related bug (with fix).

Comment 6 Mike Lococo 2011-10-07 20:47:05 UTC
This was previously reported against RHEL5 in January of 2010 in Bug 552279.  Not sure if this should be duped, or added as a "see also", or what.  Also can't figure out how to modify any of those fields, perhaps I don't have permission.

Comment 7 Mike Lococo 2011-10-07 21:03:28 UTC
Moving to yum-cron is sometimes proposed as a workaround for this bug, but as noted in Comment 5, it suffers from the same issue.  Details and a
workaround are available in Bug 742363 (already added as a see-also to this bug).

packagekit-cron is probably the last option for doing automatic updates on a standalone system.  I haven't tested it to see whether it suffers from a similar bug, but it's a more ambitious framekwork than either yum-updatesd or yum-cron so it might address this issue better.

Alternately one would have to look at satellite or spacewalk, which are pretty heavyweight solutions generally targeted toward large shops.

Comment 8 Fedora End Of Life 2012-08-16 13:29:17 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

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

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached 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 to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

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.

The process we are following is described here: 

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