Intrepid random (but frequent) system freeze

Bug #322563 reported by scott abernethy
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned
Nominated for Intrepid by Joseph Coffland
Nominated for Jaunty by Joseph Coffland

Bug Description

I've been experiencing total system freeze, frequently (say once every 1-4 hours), starting 25th Jan.
This system has been running intrepid since alpha 4 and has been very stable.

When a freeze occurs my X display doesn't update, no response to mouse or keyboard input, audio stops, can't ssh in, can't kill X or change tty. The only fix is to do a power reset.

I can't see anything obvious in the logs (though I'm not sure what I'm looking for). Memtest reports no problems, neither does fsck. I typically update daily, so looking at my apt log I noticed updates to X around that date. I've tried removing the proprietary ATI drivers, using the driver suggested by envyng, reconfiguring xserver-xorg, with no success.

$ uname -a
Linux pc559-ubu 2.6.27-11-generic #1 SMP Thu Jan 22 17:22:40 UTC 2009 i686 GNU/Linux

$ cat /proc/version_signature
Ubuntu 2.6.27-11.25-generic

$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

Revision history for this message
scott abernethy (scott.abernethy) wrote :
Revision history for this message
scott abernethy (scott.abernethy) wrote :
Revision history for this message
scott abernethy (scott.abernethy) wrote :
Revision history for this message
scott abernethy (scott.abernethy) wrote :
Revision history for this message
mujaheddin (mujaheddin) wrote :

exactly the same here

$ uname -a
Linux daniel-desktop 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686 GNU/Linux
$ cat /proc/version_signature
Ubuntu 2.6.27-11.27-generic
$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

have you already got it fixed?

Revision history for this message
scott abernethy (scott.abernethy) wrote :

Yes. As of yesterday, fully updated, I was still getting frequent crashes.

Revision history for this message
Gerard van Drielen (gerard-van-drielen) wrote :

I have the same problem, not as often as described here. My system freezes occasionaly, say once in two or three weeks. I always install updates when available. So far no fix.
My system is a pentium IV (HP Compaq d330 DT).

Revision history for this message
Joseph Coffland (jcoffland) wrote :

I also have the same problem.

uname -a
Linux kenny 2.6.27.7-custom-grsec #14 SMP PREEMPT Fri Mar 6 06:16:17 PST 2009 i686 GNU/Linux

I compiled a new kernel but I had the problem with the sock ubuntu kernel and my custom kernel was compiled from ubnutu sources + grsec anyway. Ever since an upgrade to Intrepid in January. I've been updating my packages regularly too.

I have dual monitors and an Nvida card. I was using the 180 nvidia driver but am trying 173 to see if that helps.

This is a huge problem for me. I am a heavy user and I get this at least once or twice a day lately. I've been evaluating other Distros but don't want to switch because Ubuntu has been so good up until now.

Revision history for this message
Joseph Coffland (jcoffland) wrote :

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.

Revision history for this message
Joseph Coffland (jcoffland) wrote :

Update: This fix really works I'm now at 17 days uptime on both machines.

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi scott,

This bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? Can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/lucid.

If it remains an issue, could you run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 322563

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu release http://www.ubuntu.com/getubuntu/download . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.