As I mentioned above, I was plagued by this problem but I've found a
solution that has worked on two different machines with very different
usage patterns. Both started having this problem after upgrade to
Intrepid.
A solution occurred to me while watching a process through top that I
knew was getting out of control and using up too much memory. I decided
to see what would happen when it ran out rather than stop it. Once it
hit about 2GiB the system froze hard. The kernel should have killed the
process at some point or at least behaved in a graceful manner but
instead I got the familiar lockup. I have 3GiB installed so including
other processes that was probably the exact point when all my system
memory ran out.
One of the two machines that had this problem had swap enabled the other
did not so swap space does not seem to matter. One ran firefox all the
time. The other never. and so on.
So the solution or work around. I've added two lines to the end of
/etc/security/limits.conf:
* hard nproc 1000
* soft as 1500000 # 1.5GiB (depends on your total RAM)
After adding these lines you should reboot to get the change propagated
to all running processes.
The first line limits the number of processes that can be created by a
single user. This protects you against fork-bombs which I think do
occur in some applications. Without this line your system will totally
lock up if fork-bombed. Try running this example fork-bomb in your
shell: ':(){ :|:& };:' without the quotes. WARNING: be prepared for a
reboot if you don't have nproc limited in limits.conf. I believe some
applications accidentally cause fork bombs and the OS should be able to
handle them.
The second line limits the maximum amount of memory any single process
can use. The number is in KiB and will depend no how much memory you
have installed in your system. I would recommend setting it to about
75% of your total system memory.
I was getting crashes all the time on both machines. Since I added
these lines both machines have been up for 9 days with no problems.
I suspect that firefox 3.0, pulseaudio, possibly gnome-panel and others
have problems that trigger this but the OS has to be able to handle
poorly behaved processes without crashing. I would be very interested
to know what change caused this to start occurring. I suspect it is
kernel related but xorg could also be involved.
FYI, when the crash did occur there was no relevant info in
/var/log/syslog.
--
Intrepid random (but frequent) system freeze
https://bugs.launchpad.net/bugs/322563
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs