[vox-tech] Segmentation Fault with RPM --rebuilddb

ME vox-tech@lists.lugod.org
Thu, 2 Jan 2003 01:03:20 -0800 (PST)


A simplification of a segfault is the event that happens when the ksystem
kills a process as it tries to read or write data to a space in memory for
which it wa not allocated/permitted to read/write.

It can happen when a coder does not consider that another user may provide
information that is out of bounds of what is allocated for use by the
program.

(Say, I have a char array with space for 8 chars, but you enter 9. Such an
event can lead to a segfault.)

What is causing this? I dont have or use redhat, but some suggestions:
Check the physical files that would be replaced or modified with an update
to the db. Any of these files could be damaged, or have odd permissions,
or be creating problems unexpected by the updatedb sufficient that it cant
cleanup and/or recover.

If it takes a while for it to appear and your machine gets a little slow
with some disk access, perhaps you have a case where it is passing through
a series of symlinks that eventually loop back. Such can lead to problems
when recursives searches build paths internally without consideration for
simlink vs real-dirs as they are asked to recursively search.

Another useful tool, is "strace". It mostly will include "gibberish" to
the non-coder, but even a good user who is not a coder can often get
useful information front an strace of an app that is failing with a
segfault. The last 50 or so lines can often be very revealing. If
debugging symbols are included, then "gdb" is a great tool for traceing
through the actual execution, but it has an even steeper curve for a non
coder.

HTH,
-ME

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM$/IT$/LS$/S/O$ !d--(  ) !s !a   (-----) C  $(    ) U    $( $) P $>
L   $(  ) E W   $( ) N  o K w $>  >    O-@ M $ V-$>- !PS !PE Y  PGP
t@-(  ) 5 @ X@ R- tv- b   DI    D  G--@ e >  >     h(  )>  r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html


Richard Crawford said:

> Don't believe so.  Here's the output from df -h:
>
> [rscrawford@...]$ df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/hda2             7.9G  7.0G  577M  93% /
> /dev/hda7              10G  5.4G  4.2G  56% /home
> /dev/hda6             4.0G  645M  3.3G  16% /u1
> none                  125M     0  124M   0% /dev/shm
>
> On Thu, 2003-01-02 at 00:35, Bill Kendrick wrote:
>> On Thu, Jan 02, 2003 at 12:28:57AM -0800, Richard Crawford wrote:
>> > Trying to get my system ready for upgrading to RH8, I decided to run
>> rpm
>> > --rebuilddb on my system.  I got "Segmentation fault".
>> >
>> > What does this mean?  How can I repair the fault?
>>
>> Ouch!  That sucks.  I've not got a RedHat box handy, and doubt I could
>> do
>> much research on it myself without having one that also segfaulted...
>> But, my first guess is to check to make sure you don't have a full
>> hard drive partition somewhere that's keeping "rpm" from doing its
>> thing.
>>
>> Good luck!
>>
>> -bill!
>> _______________________________________________
>> vox-tech mailing list
>> vox-tech@lists.lugod.org
>> http://lists.lugod.org/mailman/listinfo/vox-tech
> --
> Slainte,
> Richard S. Crawford
>
> mailto:rscrawford@mossroot.com		http://www.mossroot.com
> AIM:  Buffalo2K   ICQ: 11646404  Yahoo!: rscrawford
> MSN:  underpope@hotmail.com
>
> "It is only with the heart that we see rightly; what is essential is
> invisible to the eye."  --Antoine de Saint Exupery
>
> vi vi vi - the editor of the beast
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>