Re: Seg fault / memory error with yum 3.2 on redhat 5.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Solved it.

For anyone else's reference, should they end up with the same problem
and find this thread:

RedHat (and possibly other Linuxes, but I'll stick to what I'm sure of)
does not reset user limits when you su to another user.  Thus, when I
logged in as me, my user limits were set to values reasonable for an
individual user, but when I su-ed to root I had those same limits, but
now applied to root processes.  There being a fair number of root
processes running on the machine eating memory, those limits were
exceeded, and I couldn't get at any more memory.  So the memory
allocation error from yum was legitimate, but the problem wasn't system
memory - which I'd checked - it was user limits.

Anyone finding themselves with the same error message should use ulimit
-a to check their user limits, checking particularly the virtual memory
limit, and reset it as necessary with ulimit -v.

Thanks again for your help Seth,

     - rob.


On 04/13/2010 02:27 PM, Seth Vidal wrote:
> 
> 
> On Tue, 13 Apr 2010, Rob Moser wrote:
> 
>> Hello All,
>>
>> I've got a redhat 5.5 machine which is supposedly up-to-date according
>> to RHN (yum-3.2.22-26.el5, python-2.4.3-27.el5). When I try to do
>> anything with yum, I get the following error:
>>
>> ---
>> There was a problem importing one of the Python modules
>> required to run yum. The error leading to this problem was:
>>
>>   /usr/lib64/python2.4/lib-dynload/_weakref.so: failed to map segment
>> from shared object: Cannot allocate memory
>>
>> Please install a package which provides this module, or
>> verify that the module is installed correctly.
>>
>> It's possible that the above module doesn't match the
>> current version of Python, which is:
>> 2.4.3 (#1, Jun 11 2009, 14:09:37)
>> [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]
>>
>> If you cannot solve this problem yourself, please go to
>> the yum faq at:
>>  http://yum.baseurl.org/wiki/Faq
>> ---
>>
>> RHN verifies both the python and yum packages as correct, and as near as
>> I can tell the version of yum I have (yum-3.2.22-26.el5) should work
>> fine with the version of python (python-2.4.3-27.el5). What's more, I
>> have a separate brand new redhat machine with exactly the same versions
>> of the software installed, and yum works fine on that machine. If I
>> import the yum library into python myself I get a segmentation fault:
>>
>> ---
>> # python -vv
>> import zipimport # builtin
>> import site # precompiled from /usr/lib64/python2.4/site.pyc
>> import os # precompiled from /usr/lib64/python2.4/os.pyc
>> import posix # builtin
>> import posixpath # precompiled from /usr/lib64/python2.4/posixpath.pyc
>> import stat # precompiled from /usr/lib64/python2.4/stat.pyc
>> import errno # builtin
>> import UserDict # precompiled from /usr/lib64/python2.4/UserDict.pyc
>> import copy_reg # precompiled from /usr/lib64/python2.4/copy_reg.pyc
>> import types # precompiled from /usr/lib64/python2.4/types.pyc
>> import japanese # directory /usr/lib64/python2.4/site-packages/japanese
>> import japanese # precompiled from
>> /usr/lib64/python2.4/site-packages/japanese/__init__.pyc
>> import japanese.aliases # directory
>> /usr/lib64/python2.4/site-packages/japanese/aliases
>> import japanese.aliases # precompiled from
>> /usr/lib64/python2.4/site-packages/japanese/aliases/__init__.pyc
>> import encodings # directory /usr/lib64/python2.4/encodings
>> import encodings # precompiled from
>> /usr/lib64/python2.4/encodings/__init__.pyc
>> import codecs # precompiled from /usr/lib64/python2.4/codecs.pyc
>> import _codecs # builtin
>> import encodings.aliases # precompiled from
>> /usr/lib64/python2.4/encodings/aliases.pyc
>> import warnings # precompiled from /usr/lib64/python2.4/warnings.pyc
>> import linecache # precompiled from /usr/lib64/python2.4/linecache.pyc
>> import encodings.utf_8 # precompiled from
>> /usr/lib64/python2.4/encodings/utf_8.pyc
>> Python 2.4.3 (#1, Jun 11 2009, 14:09:37)
>> [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>> dlopen("/usr/lib64/python2.4/lib-dynload/readline.so", 2);
>> import readline # dynamically loaded from
>> /usr/lib64/python2.4/lib-dynload/readline.so
>>
>>>>> import yum
>> [vast swathes of successful imports snipped for space reasons]
>> import bisect # precompiled from /usr/lib64/python2.4/bisect.pyc
>> dlopen("/usr/lib64/python2.4/lib-dynload/_bisect.so", 2);
>> import _bisect # dynamically loaded from
>> /usr/lib64/python2.4/lib-dynload/_bisect.so
>> # trying cookielib.so
>> # trying cookielibmodule.so
>> # trying cookielib.py
>> # trying cookielib.pyc
>> # trying /usr/lib64/python24.zip/cookielib.so
>> # trying /usr/lib64/python24.zip/cookielibmodule.so
>> # trying /usr/lib64/python24.zip/cookielib.py
>> # trying /usr/lib64/python24.zip/cookielib.pyc
>> # trying /usr/lib64/python2.4/cookielib.so
>> # trying /usr/lib64/python2.4/cookielibmodule.so
>> # trying /usr/lib64/python2.4/cookielib.py
>> # /usr/lib64/python2.4/cookielib.pyc matches
>> /usr/lib64/python2.4/cookielib.py
>> Segmentation fault
>> ---
>>
>> I've tried googling round but can't find anyone else having a similar
>> problem; anyone have any suggestions? Thanks for any help,
>>
> 
> run an:
> 
> rpm -Va
> 
> just for grins to see what else turns up 'odd'.
> 
> thanks,
> -sv
> 
> _______________________________________________
> Yum mailing list
> Yum@xxxxxxxxxxxxxxxxx
> http://lists.baseurl.org/mailman/listinfo/yum

_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux