Bug 240631 - "yum install" with multiple arguments fails to install all packages
Summary: "yum install" with multiple arguments fails to install all packages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-05-18 23:39 UTC by Charles Curley
Modified: 2014-01-21 22:58 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-27 07:21:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Strace per Seth's request (16.44 KB, application/x-bzip2)
2007-05-25 19:45 UTC, Charles Curley
no flags Details

Description Charles Curley 2007-05-18 23:39:15 UTC
Description of problem:


I ran "yum install" with multiple arguments, and each time (except the last)
some of the arguments were not installed. I also find that not all of the
installed packages were listed in /var/logs/yum.log. Yum is version 3.0.6, on FC6.


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

Yum version 3.0.6, and components are the latest versions


How reproducible:

consistently

Steps to Reproduce:

0. Use a low memory machine: 256 MB, no swap.

1. Remove all of "openoffice*" packages. Install "openoffice.org-core". (this
duplicates exactly what I did.)

2. Run this:

yum -y install openoffice.org-draw openoffice.org-writer openoffice.org-impress
openoffice.org-xsltfilter openoffice.org-graphicfilter openoffice.org-math
openoffice.org-calc

3.
  
Actual results:

openoffice.org-calc is the only package that was installed.

Expected results:

Seven packages were installed.


Additional info:

This is on a low memory machine:

[root@phoenix OOo]# free
             total       used       free     shared    buffers     cached
Mem:           248        244          4          0          1         75
-/+ buffers/cache:        167         81
Swap:            0          0          0
Total:         248        244          4

N.B: This may be a memory issue in Python. I added swap space, and duplicated
the experiment. With swap space, the installation ran successfully. Is yum (or
python!?!) checking return values on memory allocations?

Trace:

[root@phoenix log]# yum -y install openoffice.org-draw openoffice.org-writer
openoffice.org-impress openoffice.org-xsltfilter openoffice.org-graphicfilter
openoffice.org-math openoffice.org-calc
Loading "fedorakmod" plugin
Loading "presto" plugin
Setting up Install Process
Setting up repositories
Setting up Presto
Reading Presto metadata in from local files
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for openoffice.org-draw to pack into transaction set.
openoffice.org-draw-2.0.4 100% |=========================|  62 kB    00:00     
---> Package openoffice.org-draw.i386 1:2.0.4-5.5.22 set to be updated
---> Downloading header for openoffice.org-writer to pack into transaction set.
openoffice.org-writer-2.0 100% |=========================|  66 kB    00:00     
---> Package openoffice.org-writer.i386 1:2.0.4-5.5.22 set to be updated
---> Downloading header for openoffice.org-impress to pack into transaction set.
openoffice.org-impress-2. 100% |=========================| 111 kB    00:00     
---> Package openoffice.org-impress.i386 1:2.0.4-5.5.22 set to be updated
---> Downloading header for openoffice.org-xsltfilter to pack into transaction set.
openoffice.org-xsltfilter 100% |=========================|  58 kB    00:00     
---> Package openoffice.org-xsltfilter.i386 1:2.0.4-5.5.22 set to be updated
---> Downloading header for openoffice.org-graphicfilter to pack into
transaction set.
openoffice.org-graphicfil 100% |=========================|  58 kB    00:00     
---> Package openoffice.org-graphicfilter.i386 1:2.0.4-5.5.22 set to be updated
---> Downloading header for openoffice.org-math to pack into transaction set.
openoffice.org-math-2.0.4 100% |=========================|  63 kB    00:00     
---> Package openoffice.org-math.i386 1:2.0.4-5.5.22 set to be updated
---> Downloading header for openoffice.org-calc to pack into transaction set.
openoffice.org-calc-2.0.4 100% |=========================|  66 kB    00:00     
---> Package openoffice.org-calc.i386 1:2.0.4-5.5.22 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 openoffice.org-calc     i386       1:2.0.4-5.5.22   updates           7.7 M
 openoffice.org-draw     i386       1:2.0.4-5.5.22   updates           1.1 M
 openoffice.org-graphicfilter  i386       1:2.0.4-5.5.22   updates           205 k
 openoffice.org-impress  i386       1:2.0.4-5.5.22   updates           1.6 M
 openoffice.org-math     i386       1:2.0.4-5.5.22   updates           1.3 M
 openoffice.org-writer   i386       1:2.0.4-5.5.22   updates           3.0 M
 openoffice.org-xsltfilter  i386       1:2.0.4-5.5.22   updates            96 k

Transaction Summary
=============================================================================
Install      7 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 15 M
Downloading Packages:
(1/7): openoffice.org-dra 100% |=========================| 1.1 MB    00:00     
(2/7): openoffice.org-wri 100% |=========================| 3.0 MB    00:00     
(3/7): openoffice.org-imp 100% |=========================| 1.6 MB    00:00     
(4/7): openoffice.org-xsl 100% |=========================|  96 kB    00:00     
(5/7): openoffice.org-gra 100% |=========================| 205 kB    00:00     
(6/7): openoffice.org-mat 100% |=========================| 1.3 MB    00:00     
(7/7): openoffice.org-cal 100% |=========================| 7.7 MB    00:02     
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: openoffice.org-calc          ######################### [1/7] 
[root@phoenix log]#

Comment 1 Seth Vidal 2007-05-24 14:34:10 UTC
Just for fun. Try the same transaction w/o swap using rpm, please.

Comment 2 Charles Curley 2007-05-24 16:00:35 UTC
[root@phoenix fc6]# swapoff -a ; free
             total       used       free     shared    buffers     cached
Mem:           248        231         16          0         17        122
-/+ buffers/cache:         91        156
Swap:            0          0          0
Total:         248        231         16
[root@phoenix fc6]# ls
openoffice.org-calc-2.0.4-5.3.i386.rpm          
openoffice.org-impress-2.0.4-5.3.i386.rpm
openoffice.org-core-2.0.4-5.3.i386.rpm          
openoffice.org-math-2.0.4-5.3.i386.rpm
openoffice.org-draw-2.0.4-5.3.i386.rpm          
openoffice.org-writer-2.0.4-5.3.i386.rpm
openoffice.org-graphicfilter-2.0.4-5.3.i386.rpm 
openoffice.org-xsltfilter-2.0.4-5.3.i386.rpm
[root@phoenix fc6]# rpm -ivh *
Preparing...                ########################################### [100%]
   1:openoffice.org-core    ########################################### [ 13%]
   2:openoffice.org-calc    ########################################### [ 25%]
   3:openoffice.org-draw    ########################################### [ 38%]
   4:openoffice.org-graphicf########################################### [ 50%]
   5:openoffice.org-impress ########################################### [ 63%]
   6:openoffice.org-math    ########################################### [ 75%]
   7:openoffice.org-writer  ########################################### [ 88%]
   8:openoffice.org-xsltfilt########################################### [100%]
[root@phoenix fc6]#


Comment 3 Seth Vidal 2007-05-24 19:53:03 UTC
Could you attach a debugger or strace to the yum process and see where it is
exiting. I think I know, but I'd like to be sure.

Comment 4 Charles Curley 2007-05-25 19:45:20 UTC
Created attachment 155477 [details]
Strace per Seth's request

Comment 5 Charles Curley 2007-05-25 19:48:04 UTC
After I ran this test, I realized that this was slightly different from the case
above: it pulled in OOo-core as a dependency. I doubt that will affect the point
of the test.

It failed as follows:

[root@phoenix ~]# strace -o strace.txt yum -y install openoffice.org-draw
openoffice.org-writer openoffice.org-impress openoffice.org-xsltfilter
openoffice.org-graphicfilter openoffice.org-math openoffice.org-calc 
Loading "fedorakmod" plugin
Loading "presto" plugin
Setting up Install Process
Setting up repositories
Setting up Presto
Reading Presto metadata in from local files
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for openoffice.org-draw to pack into transaction set.
openoffice.org-draw-2.0.4 100% |=========================|  62 kB    00:00     

...

Transaction Summary
=============================================================================
Install      8 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 103 M
Downloading Packages:
(1/8): openoffice.org-dra 100% |=========================| 1.1 MB    00:00     
(2/8): openoffice.org-wri 100% |=========================| 3.0 MB    00:00     
(3/8): openoffice.org-imp 100% |=========================| 1.6 MB    00:00     
(4/8): openoffice.org-xsl 100% |=========================|  96 kB    00:00     
(5/8): openoffice.org-cor 100% |=========================|  88 MB    00:16     
(6/8): openoffice.org-gra 100% |=========================| 205 kB    00:00     
(7/8): openoffice.org-mat 100% |=========================| 1.3 MB    00:00     
(8/8): openoffice.org-cal 100% |=========================| 7.7 MB    00:00     
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: openoffice.org-core          ######################### [1/8] 
[root@phoenix ~]# 


The trace file is 163 MB; I assume you don't need all of that. I have grabbed
the last 2048 lines, compressed them and attached them (comment 4). I will
preserve the whole trace in case you want more.


Comment 6 Seth Vidal 2007-05-25 20:46:16 UTC
rt_sigaction(SIGCHLD, {0xa272f0, [], SA_SIGINFO}, {SIG_DFL}, 8) = 0
pipe([31, 32])                          = 0
rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7f55708) = -1 ENOMEM (Cannot allocate memory)
close(31)                               = 0
close(32)                               = 0


ENOMEM That looks like our winner. It's just running out of memory during the
transaction. rpm grabs the signal and doesn't let us exit gracefully.

not sure what else there is to it.



Comment 7 Charles Curley 2007-05-25 22:10:26 UTC
How about: 

* Give the user an error message?

* Return a suitable non-zero value so that calling apps can diagnose the problem
(e.g. Anaconda)?

If this is the problem I have been hitting with installations on my firewall (67
MB of physical memory), it would be nice to know that it is a memory issue. I'm
sure I'm not the only person hitting this.

If rpm is not returning the correct return value, methinks that's an RPM bug.
Anyone care to file a report?


Comment 8 Jeff Johnson 2007-06-21 02:30:29 UTC
There's no signal delivery in the snippet in comment #6. There are SIGCHLD events later
that are reaping processes correctly. Nothing whatsoever is prohibiting "us from exiting
gracefully."

The code that is returning ENOMEM is before the pipe(2) call is a fork(), nothing more.
ENOMEM indicates that your system has insufficient resources to run a program and install
openoffice using yum.

A large part of that reason is the memory required to run yum, another part of the
problem is that openoffice is huge. The third part of the problem is that you are
attempting this on a machine with insufficient memory.

Running yum in 67MB of memory will be *ahem* exciting. Installing openoffice on
a machine with 67MB is likely impossible with yum or anaconda.





Comment 9 Red Hat Bugzilla 2007-08-21 05:34:22 UTC
User pnasrat's account has been closed

Comment 10 Panu Matilainen 2007-08-22 06:31:46 UTC
Reassigning to owner after bugzilla made a mess, sorry about the noise...

Comment 11 Panu Matilainen 2007-09-27 07:21:19 UTC
rpm 4.4.2.1 (already released as FC6 update) and later give error messages about
fork failures (ENOMEM or otherwise). Not much else can be done here I'm afraid,
it could just as well die through OOM-killer in a lowmem situation without
having any chance to react...


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