compcache locks the system; Was: Swap problems
email.listen at googlemail.com
email.listen at googlemail.com
Sat Feb 7 21:03:05 UTC 2009
On Sat, 7. February 2009 21:37:48 email.listen at googlemail.com wrote:
> On Fri, 6. February 2009 12:30:55 Dake K. Odzangba wrote:
> > Hello, I do not have a swap partition (or file) because I've got 2GB of
>
> physical ram. Yet the output of free tells me:
> > > total used free shared buffers
> > > cached Mem: 2064336 1986368 77968 0 54092
> > > 456332 -/+ buffers/cache: 1475944 588392
> > > Swap: 516080 377168 138912
> >
> > And when I examined my logs I found this:
[...]
> > > Feb 6 11:08:28 mal-zeth kernel: >[1562156248.450441]66248.450473]
> > > c448.450757] co..450789] comp550821] compcac8854] compc75] compcache:
> > > compcache:rompcache: Errotpcache: Err-ache: Error rhe: Error alloo:
> > > Error a Error allorror allo or allocati allocatingpllocating medocating
> > > memoating memory ing memory for g memory fomemory for c4mory for co0ry
> > > for compressed
> > >
> > > 8 for compress1or compresse8 compressed p)ompressed pag<pressed page:
> > > >essed page: 101sed page: 1036d page: 1034page: 103968, si.ge: 1034e:
> > >
> > > 103970, 1 103971, 9103972, 03973, siz]974, si 75, sizec6, size=28
> >
> > This doesn't look good... any ideas?
>
> Yes, I've also seen this on one of my machines.
>
> The problem is compcache which maps ram as swapspace (ramdisk).
> I saw this first when this machine got totaly locked. Only rebooting with a
> hard reset by pressing poweroff helped.
>
> You will see this when you run in a terminal:
>
> sudo swapon -s
>
> The output will show the memory allocated by compcache.
>
> or
>
> sudo lsmod | grep compcache
>
> The output will show that compcache, lzo_decompress and lzo_compress
> modules are loaded.
>
> The solution is to disable compcache:
>
> sudo swapoff -a
> sudo swapon -a
>
> You may also unload all modules after you disabled compcache loaded by
> compcache and compcache itself:
>
> sudo rmmod compcache
> sudo rmmod lzo_decompress
> sudo rmmod lzo_compress
>
>
> regards,
> thomas
Pardon me, I forgot to cut you long list of output in my previous email.
The following little script may be helpfull:
---8<--- swapreset ---8y---
#!/bin/bash
#
# Filename : swapreset
# Version : 0.1
# Date : 07-feb-09
# Author : email.listen at gmail.com
# Last changed : 07-feb-09
#
# Options : none-yet
# Usage : swapreset
#
## test for compcache
## if yes reset swap and remove compcache and it's child kernel modules
if [ "$(lsmod|grep compcache)" ] ; then
## restarting swap,
## compcache will _not_ restart
echo -e "currently aktive swap partitions:"\n
echo -e "--------------------------------"\n
sudo swapon -s
echo -e "will now reset swap partitions"\n
sudo swapoff -a
sudo swapon -a
echo -e "--------------------------------"\n
echo -e "finally aktive swap partitions:"\n
sudo swapon -s
sudo rmmod compcache
sudo rmmod lzo_decompress
sudo rmmod lzo_compress
else
echo -e "no compcache loaded! \nnothing to do so far."
fi
---8<--- swapreset ---8y---
Save this file to a users $HOME/bin/ directory who has sudo privileges.
Make it executable with:
sudo chmod 700 swapreset
Start it and compcache is disabled.
regards,
thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swapreset
Type: application/x-shellscript
Size: 853 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090207/9ccaeff7/attachment.bin>
More information about the ubuntu-users
mailing list