[TAG] segmentation fault in aptitude

Benjamin A. Okopnik ben at linuxgazette.net
Thu Apr 7 19:25:50 MSD 2005


On Thu, Apr 07, 2005 at 07:30:24PM +0530, Joydeep Bakshi wrote:
> On Wednesday 06 Apr 2005 11:51 pm, Benjamin A. Okopnik wrote:
> > On Tue, Apr 05, 2005 at 10:22:01PM +0530, J.Bakshi wrote:
> >
> > > write(1, "\rBuilding Dependency Tree... 51%"..., 33) = 33
> > > write(1, "\rBuilding Dependency Tree... 52%"..., 33) = 33
> > > write(1, "\rBuilding Dependency Tree... 53%"..., 33) = 33
> > > write(1, "\rBuilding Dependency Tree... 55%"..., 33) = 33
> > > write(1, "\rBuilding Dependency Tree... 61%"..., 33) = 33
> > > write(1, "\rBuilding Dependency Tree... 67%"..., 33) = 33
> > > --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> > > +++ killed by SIGSEGV +++
> >
> > Interesting, and very odd. If you want to do further troubleshooting in
> > this direction, it may be worthwhile to re-run the above "strace" with
> > more options -
> >
> > ``
> > strace -s 1000 -fvto apt-get.strace check
> > ''
> I have executed the command and it has generated the apt-get.strace file. may 
> I email that file ?

Just the last 50 lines should be sufficient - "tail -50 apt-get.strace"
will do that.

> >  - but at this point, I'm suspecting one of several possibilities:
> >
> > 1) You may be running out of virtual memory (physical memory/swap
> > space.) It's worth checking if you've actually *got* a mounted swap
> > partition with "swapon -s".
> 
> in my system *swapon -s* displays
> 
> Filename                        Type            Size    Used    Priority
> /dev/hda2                       partition       125204  44340   -1
 
OK. Kapil's suggestion, regarding "reformatting" that swap partition,
may be worthwhile here.

> > 2) You might be running out of disk space (doubtful but possible.)
> >
> 
> but *di* command shows
> 
> Filesystem         Mount         Megs     Used      Avail   %used fs Type
> /dev/hda1          /                 3981.4   1345.4   2636.1  34%  reiserfs
> tmpfs              /dev/shm        22.6      0.0        22.6     0%      tmpfs
 
That last entry _might_ give you problems: 22.6MB for /tmp is pretty
small; if 'apt-get' uses it to build a temp file of some sort, you could
easily run out. As an example, my 'tmpfs' partition is more than 10
times larger than yours (250MB) - and it's that size precisely because I
had a problem with a program ('convert') that would segfault because it
was running out of space.

> > 3) You may have a damaged dependencies database (probably the largest
> > possibility.)
> >
> > 4) You may have a damaged "apt-get" binary.
> >
> 
> is it possible to fix the above mentioned problems  [point 3) and 4)] ?

Well... for the second case, you can just reinstall 'apt-get' by
downloading the package and using "dpkg"... actually, that would be an
interesting test on its own. If "dpkg" doesn't see any problems with the
database, then it's definitely a problem in apt-get itself. Try running
"dpkg -C" and let us know the results, please.


* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://linuxgazette.net *




More information about the TAG mailing list