Pacman

Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.
Tasklist

FS#30381 - handle oom situations correctly

Attached to Project: Pacman
Opened by Simon Brakhane (Luminger) - Wednesday, 20 June 2012, 15:43 GMT
Last edited by Allan McRae (Allan) - Saturday, 09 February 2013, 03:44 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version 4.0.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
I just had an out of memory situation on my system and didn't notice it before I started a system upgrade via "packer -Syu" (I quess it just forks a pacman without having it looked up). What happned was that pacman downloaded all the packages, verified them and started upgrading. What now happned was the following:

(64/64) checking package integrity [################################] 100%
(64/64) loading package files [################################] 100%
(64/64) checking for file conflicts [################################] 100%
(65/65) checking available disk space [################################] 100%
(1/1) removing dbus-python [################################] 100%
( 1/64) upgrading libpng [################################] 100%
( 2/64) upgrading cairo [################################] 100%
( 3/64) upgrading freetype2 [################################] 100%
( 4/64) upgrading pango [################################] 100%
error: could not fork a new process (Cannot allocate memory)
( 5/64) upgrading awesome [################################] 100%
( 6/64) upgrading dconf [################################] 100%
error: could not fork a new process (Cannot allocate memory)
( 7/64) upgrading baobab [################################] 100%
error: could not fork a new process (Cannot allocate memory)
( 8/64) upgrading linux-api-headers [################################] 100%
( 9/64) upgrading glibc [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(10/64) upgrading bison [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(11/64) upgrading bluez [################################] 100%
(12/64) upgrading nspr [################################] 100%
(13/64) upgrading sqlite [################################] 100%
(14/64) upgrading nss [################################] 100%
(15/64) upgrading desktop-file-utils [################################] 100%
(16/64) upgrading chromium [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(17/64) upgrading libwbclient [################################] 100%
(18/64) upgrading cifs-utils [################################] 100%
(19/64) upgrading isl [################################] 100%
(20/64) upgrading cloog [################################] 100%
(21/64) upgrading colord [################################] 100%
(22/64) installing python-dbus-common [################################] 100%
(23/64) installing python2-dbus [################################] 100%
Optional dependencies for python2-dbus
dbus-glib: glib mainloop support
(24/64) upgrading dnsutils [################################] 100%
(25/64) upgrading eog [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(26/64) upgrading evolution-data-server [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(27/64) upgrading gtkhtml4 [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(28/64) upgrading evolution [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(29/64) upgrading flashplugin [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(30/64) upgrading gcc-libs [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(31/64) upgrading gcc [################################] 100%
error: could not fork a new process (Cannot allocate memory)
error: could not fork a new process (Cannot allocate memory)
(32/64) upgrading gedit [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(33/64) upgrading git [################################] 100%
(34/64) upgrading gmime [################################] 100%
(35/64) upgrading obexd-client [################################] 100%
(36/64) upgrading gnome-bluetooth [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(37/64) upgrading libdrm [################################] 100%
(38/64) upgrading libglapi [################################] 100%
(39/64) upgrading libgl [################################] 100%
(40/64) upgrading gnome-session [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(41/64) upgrading gtk-engines [################################] 100%
(42/64) upgrading gzip [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(43/64) upgrading initscripts [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(44/64) upgrading libcups [################################] 100%
(45/64) upgrading libidn [################################] 100%
error: could not fork a new process (Cannot allocate memory)
(46/64) upgrading liblrdf [################################] 100%
(47/64) upgrading libltdl [################################] 100%
(48/64) upgrading libquvi-scripts [################################] 100%
(49/64) upgrading libtool [################################] 100%
error: could not fork a new process (Cannot allocate memory)

I havn't rebooted the system as I think it woudn't be usable at all and not trivial to fix. What should happen here is an installation abort at the first sight of an oom error (maybe others also?).

Steps to Reproduce:
- create an oom situation (I had wireshark dumping my traffic and a chromium with several open tabs)
- start a full system upgrade via "pacman -Syu"
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 09 February 2013, 03:44 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Not bailing in the middle of a transaction if at all possible is a good thing...
Comment by Dave Reisner (falconindy) - Wednesday, 20 June 2012, 17:15 GMT
Sorry? We _are_ handling the OOM condition here. If you had run into something more fatal where OOM necessitated bailing out mid-transaction, we would have done that. Bailing mid-transaction is just about the worst thing you can do. I tend to think we did the right thing here. You've missed out on some post_upgrade scriptlets running, but extraction seems to have gone fine otherwise (unless you've omitted something useful from the remaining 15 packages and cleanup).

You could glance over the install scriptlets for the relevant packages, but I don't think there's too much wrong here. Regenerate your locales, rerun depmod and regenerate your initramfs if there was a kernel upgrade...

Loading...