Bug 183036 - rpm -e kernel-devel-# doesn't work and returns "memory alloc (4 bytes) returned NULL."
rpm -e kernel-devel-# doesn't work and returns "memory alloc (4 bytes) return...
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-25 13:27 EST by kmberry
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-18 00:40:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description kmberry 2006-02-25 13:27:03 EST
Description of problem:
I have been updating this system using yum since Feb. 2005 and problem appeared
probably as long ago and still is unresolved.  I did rpm -e kernel-devel as a
wildcard and it didn't work so I tried to individually uninstall and the problem
appeared.  Now rpm consumes all memory when I do it and the result is always the
same:  rpm -e kernel-devel-2.6.14-1.1688_FC5
memory alloc (4 bytes) returned NULL.
I tried rebuilding the database and it didn't work. ALso I tried using
--noscripts and --justdb to no avail. I found 2 people with the problem
Googling.  One had a peoples kernel and no one replied.  The other person said
he had to remove a kernel-smp to solve the problem-I don't have any kernel-smp
just cman and dlm.  Everything else works great and I removed all my kernel rpms
except last 5 or so individually.  I removed all /lib/modules, /usr/src/kernels
and /boot stuff that was unremovable by rpm manually.

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


How reproducible:
Maybe if you get frustrated trying to remove dozens of kernel-devel rpms and
wildcard it or just try to list all of them individually on one line for removal?

Steps to Reproduce:
1. rpm -e kernel-devel-a_kernel
2.
3.
  
Actual results:
rpm consumes all memory and returns with this message:
memory alloc (4 bytes) returned NULL.

Expected results:
removal of kernel-devel

Additional info:
Comment 1 Paul Nasrat 2006-03-01 16:00:46 EST
How many kernels (of all flavours do you have installed?)

rpm -qa \*kernel\*
Comment 2 kmberry 2006-03-02 10:54:37 EST
(In reply to comment #1)
> How many kernels (of all flavours do you have installed?)
> 
> rpm -qa \*kernel\*
> 

[root@kmberry kmberry]# rpm -q kernel
kernel-2.6.15-1.1975_FC5
kernel-2.6.15-1.1969_FC5
kernel-2.6.15-1.1955_FC5
kernel-2.6.15-1.1948_FC5
kernel-2.6.15-1.1977_FC5
kernel-2.6.15-1.1991_FC5
kernel-2.6.15-1.1996_FC5

[root@kmberry kmberry]# rpm -q kernel-devel
kernel-devel-2.6.14-1.1806_FC5
kernel-devel-2.6.14-1.1713_FC5
kernel-devel-2.6.14-1.1756_FC5
kernel-devel-2.6.14-1.1688_FC5
kernel-devel-2.6.15-1.1948_FC5
kernel-devel-2.6.15-1.1977_FC5
kernel-devel-2.6.14-1.1788_FC5
kernel-devel-2.6.15-1.1826.2.5_FC5
kernel-devel-2.6.14-1.1739_FC5
kernel-devel-2.6.14-1.1696_FC5
kernel-devel-2.6.14-1.1796_FC5
kernel-devel-2.6.14-1.1715_FC5
kernel-devel-2.6.14-1.1712_FC5
kernel-devel-2.6.14-1.1765_FC5
kernel-devel-2.6.14-1.1743_FC5
kernel-devel-2.6.15-1.1872_FC5
kernel-devel-2.6.14-1.1783_FC5
kernel-devel-2.6.14-1.1740_FC5
kernel-devel-2.6.14-1.1777_FC5
kernel-devel-2.6.14-1.1786_FC5
kernel-devel-2.6.14-1.1805_FC5
kernel-devel-2.6.15-1.1955_FC5
kernel-devel-2.6.14-1.1729_FC5
kernel-devel-2.6.14-1.1800_FC5
kernel-devel-2.6.14-1.1682_FC5
kernel-devel-2.6.14-1.1719_FC5
kernel-devel-2.6.15-1.1928_FC5
kernel-devel-2.6.14-1.1707_FC5
kernel-devel-2.6.14-1.1760_FC5
kernel-devel-2.6.14-1.1752_FC5
kernel-devel-2.6.15-1.1939_FC5
kernel-devel-2.6.14-1.1749_FC5
kernel-devel-2.6.14-1.1674_FC5
kernel-devel-2.6.14-1.1807_FC5
kernel-devel-2.6.15-1.1969_FC5
kernel-devel-2.6.15-1.1826.2.10_FC5
kernel-devel-2.6.15-1.1975_FC5
kernel-devel-2.6.15-1.1991_FC5
kernel-devel-2.6.15-1.1996_FC5
[root@kmberry kmberry]#


Comment 3 kmberry 2006-03-02 10:56:45 EST
[root@kmberry kmberry]# rpm -qa \*kernel\*
kernel-devel-2.6.14-1.1740_FC5
kernel-devel-2.6.14-1.1707_FC5
kernel-devel-2.6.14-1.1713_FC5
kernel-devel-2.6.14-1.1682_FC5
kernel-devel-2.6.14-1.1786_FC5
kernel-devel-2.6.14-1.1739_FC5
kernel-devel-2.6.14-1.1800_FC5
kernel-devel-2.6.14-1.1756_FC5
kernel-devel-2.6.15-1.1928_FC5
kernel-devel-2.6.15-1.1991_FC5
kernel-devel-2.6.14-1.1765_FC5
kernel-doc-2.6.15-1.1996_FC5
dlm-kernel-2.6.15.0-20051219.162641.FC5.9.7
kernel-devel-2.6.14-1.1752_FC5
kernel-devel-2.6.14-1.1743_FC5
kernel-devel-2.6.14-1.1783_FC5
kernel-devel-2.6.15-1.1955_FC5
kernel-devel-2.6.15-1.1975_FC5
kernel-devel-2.6.15-1.1872_FC5
kernel-devel-2.6.14-1.1719_FC5
kernel-devel-2.6.15-1.1939_FC5
kernel-2.6.15-1.1948_FC5
kernel-devel-2.6.14-1.1807_FC5
dlm-kernel-2.6.15.0-20051219.162641.FC5.9.3
kernel-devel-2.6.15-1.1826.2.5_FC5
cman-kernel-2.6.15.0-20051219.162641.FC5.11.7
kernel-devel-2.6.15-1.1977_FC5
kernel-devel-2.6.14-1.1696_FC5
kernel-devel-2.6.14-1.1729_FC5
kernel-2.6.15-1.1969_FC5
kernel-devel-2.6.15-1.1969_FC5
kernel-devel-2.6.14-1.1715_FC5
kernel-devel-2.6.15-1.1826.2.10_FC5
kernel-devel-2.6.14-1.1688_FC5
kernel-devel-2.6.14-1.1674_FC5
kernel-devel-2.6.15-1.1948_FC5
kernel-devel-2.6.14-1.1777_FC5
kernel-devel-2.6.14-1.1788_FC5
cman-kernel-2.6.15.0-20051219.162641.FC5.11.4
kernel-2.6.15-1.1991_FC5
kernel-devel-2.6.14-1.1760_FC5
kernel-2.6.15-1.1955_FC5
kernel-devel-2.6.14-1.1805_FC5
kernel-2.6.15-1.1996_FC5
kernel-devel-2.6.14-1.1749_FC5
kernel-devel-2.6.14-1.1806_FC5
kernel-devel-2.6.15-1.1996_FC5
kernel-devel-2.6.14-1.1712_FC5
kernel-devel-2.6.14-1.1796_FC5
kernel-2.6.15-1.1975_FC5
kernel-2.6.15-1.1977_FC5
[root@kmberry kmberry]#
Comment 4 Paul Nasrat 2006-03-06 11:50:37 EST
How much memory do you have on this machine?
Comment 5 kmberry 2006-03-09 13:54:13 EST
(In reply to comment #4)
> How much memory do you have on this machine?
512 MB
Comment 6 kmberry 2006-03-15 21:18:30 EST
Here is some more information:
http://www.thelinuxpimp.com/main/modules.php?op=modload&name=News&file=article&sid=579
last seen on March 15, 2006 and dated October 14, 2004.
Here is another:
http://linux.derkeiler.com/Mailing-Lists/Fedora/2004-04/2400.html last seen
March 15, 2006 and dated March 4, 2004 although problem is reverse.
Both messages have one thing in common: "memory alloc (4 bytes) returned NULL."
Comment 7 Jeff Johnson 2006-03-16 07:49:52 EST
Yes, the problem is known.

Try recompiling rpm with the patch below to erase the packages.
Note: the patch is not recommended in production use because it will change
handling of upgrades and totally disables disk space checks.
diff -u rpmdb.c rpmdb.c.bz183036
--- rpmdb.c     2005-12-13 07:20:29.000000000 -0500
+++ rpmdb.c.bz183036    2006-03-16 07:53:58.000000000 -0500
@@ -3360,13 +3360,7 @@
 /*@observer@*/ /*@null@*/
     const char * dn;
 } skipDirs[] = {
-    _skip("/usr/share/zoneinfo"),
-    _skip("/usr/share/locale"),
-    _skip("/usr/share/i18n"),
-    _skip("/usr/share/doc"),
-    _skip("/usr/lib/locale"),
-    _skip("/usr/src"),
-    _skip("/lib/modules"),
+    _skip("/"),
     { 0, NULL }
 };
Comment 8 kmberry 2006-03-17 20:17:40 EST
I applied patch and it didn't work.  You think I should erase my entire rpm
installation and try again?
Comment 9 Jeff Johnson 2006-03-17 20:32:56 EST
Nah. Tar up /var/lib/rpm
   cd /var/lib/rpm
   tar czvf /tmp/rpmdb-183036.tar.gz ./rpm
give me a ptr (i.e. a URL_) yp that tar ball, and I'll try to remove the kernel-devel headers for you.
Comment 10 kmberry 2006-03-17 21:09:32 EST
I put it on my server test page at http://kmberry.org" in the lower right hand
corner.  I don't know if it will work since Im using targeted and firestarter
and I don't run a server since I don't have a reason yet.  Might also try
66.92.238.250 because I am broke and I never renewed registration for my name.
Comment 11 Jeff Johnson 2006-03-17 21:55:43 EST
Can't get there, neither http://kmberry.org or http://66.92.238.250 are functional.
Comment 12 kmberry 2006-03-17 22:35:06 EST
I opened port 80 on firestarter and its working now because I just checked it
with my other computer an 8600 powermac running ubuntu.
Comment 13 Jeff Johnson 2006-03-17 23:35:05 EST
Downloading now ...
Comment 14 Jeff Johnson 2006-03-18 00:40:07 EST
OK, your database w all kernel-devel headers removed is at
    http://wraptastic.org/pub/jbj/rpmdb-183036-FIX.tar.gz

I'm not sure what your problem is/was. All I did was
remove my kernel-devel, switch in your rpmdb, and then do
    rpm -q kernel-devel > /tmp/list
    for i in `cat /tmp/list`; do rpm -evv $i; done

At no time did I see a memory footprint larger than 20 Mb, so your problem was *NOT*
the fingerprint problem I thought it was.

No idea why you are/were having difficulty. HTH
Comment 15 Jeff Johnson 2006-03-18 00:44:12 EST
FWIW, I'm using rpm-4.4.6-0.5 (but I know of no changes since 4.4.2 that have this symptom).

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