Friday, 8 July 2011

An error occured in avast! engine: Invalid argument

I recently installed Avast4Workstation in my laptop running Ubuntu 10.10. The avast engine was able to do a complete scan of my system. After that I decided to fetch latest updates for avast and clicked 'Update database' in the GUI. After the update happened, the avast will not open, but shows the error message

An error occurred in avast! engine: Invalid argument

Solved:
In older kernels the maximum size of SHM block was limited to a certain number of bytes, that is being exceeded by the database. We need to increase the size of the SHM block to accommodate the large database
The command to be executed in the terminal is as follows. When executing the command it will ask for the root password.
sudo sysctl -w kernel.shmmax=128000000
The above command provided me with a temporary solution to the problem I was facing. After I restarted my machine, if I wanted to open avast, I had to type the command again. To get away with this, there is another way.

Add the line kernel.shmmax = 128000000 to the bottom of the sysctl.conf text file.
How to update the sysctl.conf file:
  1. Go to 'etc' folder, select sysctl.conf file
  2. With the sysctl.conf file selected, press Alt + F2. This will open the 'Run application' dialog
    1. Type gksu gedit
    2. Add kernel.shmmax = 128000000 to the file and save

No comments:

Post a Comment