Bug 3289

Summary: Select needed in getOutputFrom() near files.c:1483.
Product: [Retired] Red Hat Linux Reporter: kestes
Component: rpmAssignee: Jay Turner <jturner>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: jbj, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-06-17 15:45:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description kestes 1999-06-05 19:13:10 UTC
From: Jeff Johnson <jbj>
This is a request for  a performance increase in RPM, the
code works great but the additions I am making to RPM
will cause it to slow down unacceptably.  Hopefully this
can get some attention before we merge our code bases


Ken Estes

To: Ken Estes <kestes.com>
Subject: Re: cpu during find-*
Date: Sat, 5 Jun 1999 14:51:35 -0400

On Sat, Jun 05, 1999 at 02:41:49PM -0400, Ken Estes wrote:
>
> I have been building perl 5.00502 all day (I will upgrade
once this
> work is finished. I want to see how portable my work is).
The perl
> dependencies take at least 10 minutes to complete.  The
build of perl
> is now up to 25 minutes (and I want to add a few more
sections!)
>
> I noticed the stranges thing during my requires/provides
part of a
> build.  The CPU is being chewed up by rpm itsself not by
my new
> dependency scripts.  Do you know what may be causing
this?  Here are
> some outputs of top to prove that this is not an isolated
problem but
> continues for minutes at a time.
>

See getOutputFrom() near files.c:1483. I eliminated a race
condition
there, but the code really needs a select(2) or even a
sleep(1).

Hit me in bugzilla if you want it fixed ...

73 de Jeff

>
>
>   PID USERNAME THR PRI NICE  SIZE   RES STATE   TIME
CPU COMMAND
> 23105 root       1 -25    0 3168K 2544K run     3:36
74.65% rpm
>  2188 root       1  33    0 2080K 1680K cpu     0:01
0.60% top
>     1 root       1  33    0 1328K  736K sleep   0:36
0.29% init
>  2815 root       1 -25    0 1144K  872K run     0:00
0.23% find-requires
>   462 root       1  33    0 7128K 6528K sleep   0:15
0.00% emacs
>   215 root       1  33    0 1704K 1000K sleep   0:15
0.00% sshd
>   136 root       1   8    0 1608K 1360K sleep   0:03
0.00% inetd
>   457 root       1  23    0 2072K 1648K sleep   0:01
0.00% bash
>   424 root       9  27    0 2368K 1960K sleep   0:01
0.00% nscd
>  2813 root       1 -25    0  912K  752K sleep   0:00
0.00% find-requires
>   110 root       4 -10    0 2016K 1296K sleep   0:00
0.00% keyserv
>
>
>   PID USERNAME THR PRI NICE  SIZE   RES STATE   TIME
CPU COMMAND
> 23105 root       1 -25    0 3168K 2544K run     5:22
66.33% rpm
>  2188 root       1  33    0 2080K 1680K cpu     0:01
0.60% top
>     1 root       1  33    0 1328K  736K sleep   0:36
0.20% init
>  2815 root       1   6    0 1144K  872K sleep   0:00
0.12% find-requires
>   462 root       1  33    0 7128K 6528K sleep   0:15
0.00% emacs
>   215 root       1  33    0 1704K 1000K sleep   0:15
0.00% sshd
>   136 root       1   8    0 1608K 1360K sleep   0:03
0.00% inetd
>   457 root       1  23    0 2072K 1648K sleep   0:01
0.00% bash
>   424 root       9  27    0 2368K 1960K sleep   0:01
0.00% nscd
>  7503 root       1 -25    0 1144K  272K run     0:00
0.00% find-requires
>  2813 root       1 -25    0  912K  752K sleep   0:00
0.00% find-requires
>   110 root       4 -10    0 2016K 1296K sleep   0:00
0.00% keyserv

--
JeffJohnson	ARS N3NPQ
jbj (jbj)
Chapel Hill, NC

Comment 1 Jeff Johnson 1999-06-17 15:45:59 UTC
A fix for this is in rpm-3.0.2-0.3 (and cvs).