LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Ubuntu 9.04 (64 bits) hangs in random moments (https://www.linuxquestions.org/questions/ubuntu-63/ubuntu-9-04-64-bits-hangs-in-random-moments-725286/)

luiz 55 05-11-2009 05:42 PM

Ubuntu 9.04 (64 bits) hangs in random moments
 
I've recently upgraded to Ubuntu 9.04 64 bits (my previous 8.10 was 32 bits). The new version often freezes, and I can't use the mouse, neighter the keyboard (except the Alt+SysRq+B combination), which does the same as pressing "Reset" at the cpu.

I have a Core 2 Duo 2.66 GHz, 2 GB of RAM, GeForce 7200 Gs. I also have 2 HDs (dual boot), the one with Ubuntu is a IDE of 80 GB.

I suspected it could be the Hard Disk (Power was cut during the installation and I had to reinstall), but it hangs randonly, so it doesn't seems to be it. I've also made a few tests with some programs (testdisk for example) as well as I did the fsck and memory test and found nothing wrong. If anyone knows a reliable program to test HD physical integrity, please let me know.

I also don't know where I can get a log, since Ctrl+Alt+F1 doesn't work when it happens. I've searched about this problem, but most results had no solution. One of them suggested to enable the option noMTRR at xorg.conf, but it didn't work neighter.

At last, I thought it could be Firefox (some people complained of it, and in fact it happened twice while watching a video). However, it also happened once at the login screen and another time when I was using opera. So it shouldn't be a program, I think. Anyway it happens usually when a browser is opened.

If anyone can help me...

tommcd 05-12-2009 01:10 AM

Did you install and enable the nvidia driver? Check: system > administration > hardware drivers to see if the driver is enabled.
Is anything hogging the CPU? Try running the top program in the terminal to see how your CPU usage is.
Since you have an IDE drive, run hdparm -i in the terminal to see if DMA is enabled.

luiz 55 05-12-2009 10:38 AM

Well, the Nvidia driver (version 180) is enabled, as it was in my previous Ubuntu. In fact I enabled it just after I installed the new version.

About the cpu usage, I have a system monitor in the upper bar, and it's usually at low usage. Anyway, I checked the top program and there was nothing getting more than 15% (and that's generally because of the compiz effects when I minimize a window).

DMA appears to be enabled. Here is the output of my hdparm -i:

Code:

/dev/sdb:

 Model=MAXTOR STM380215A                      , FwRev=3.AAD  , SerialNo=            9QZ8W7G6
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=?16?
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode


tommcd 05-12-2009 06:47 PM

Just to confirm that the nvidia driver is working ok run:
Quote:

glxinfo | grep -i direct
It should report:
Quote:

bash-3.1$ glxinfo | grep -i direct
direct rendering: Yes
bash-3.1$
It looks like DMA is not the problem either.
Have you tried disabling compiz to see if the hanging goes away?

luiz 55 05-12-2009 08:33 PM

The driver appears to be ok, since I got the expected result ("yes"). I've disabled compiz to check if it's the problem, but it was running fine in my Ubuntu 8.10 (32 bits).

luiz 55 05-13-2009 11:37 AM

Ok, the system still hangs without compiz. What could it be then?

tommcd 05-13-2009 08:37 PM

Quote:

Originally Posted by luiz 55 (Post 3537514)
I've recently upgraded to Ubuntu 9.04 64 bits (my previous 8.10 was 32 bits).

How did you do this? Was it a dist-upgrade over the internet, or did you do a clean install?
I'm not sure what else to try at this point. Your setup seems to be ok as far as anything I can think of.

luiz 55 05-14-2009 10:28 AM

It was a clean install, I had to format the disk. As I mentioned, I had a problem during the first installation (at around 70%), so I had to format again and start over.

Is there a place where I can find the logs of the last crash?

tommcd 05-14-2009 07:19 PM

All I can suggest at this point would be to do a clean install of Ubuntu 9.04 32 bit. Since you report that the 32 bit version of 8.10 was ok, perhaps it is a problem with the 64 bit OS or some app running on it that is giving you these problems.

tur third 05-15-2009 07:20 AM

I have been struggling with random freezes for a while, and had IDE and SATA drives in my pc. There is some mention of problems with different kernels being able to handle sata drives.

If you have a sata drive in the pc, this is something you can try that may help. I ended up installing 64 bit 9.04 and the freeze got worse. This change seems to have helped my system (early days yet), but immediately seems to have had an affect.

In Grub when you start the machine try adding this to the boot line

pci=nomsi

If this works make it permanent by adding it to menu.lst in /boot/grub

coal-fire-ice 05-15-2009 08:54 AM

I think i have a similar problem. i recently did a clean install of 9.04 32bit on one of my machines.
the machine is headless, and i use it mostly via ssh. it would be fine while i was working on it for several hours at a time, but my intention was to make it on all the time, but if for instance i leave it powered up overnight it no longer responds to my login attempts.

the machine has 2 sata hdd's and 1 ide cdrom.

when i set the system up i disabled the automatic startup of gdm and thus the x windowing system. so i was pretty sure it wasn't a graphics driver / graphical issue.

i'm going to try the above solution and leave the system on overnight to see what happens, i'll post back.

------

ok so it hung as i was typing vim /boo...
trying again now.

coal-fire-ice 05-15-2009 09:20 AM

It's hung already.

some more details

my main drive is formatted into 3 ext4 partitions, the root filesystem, var and home
the secondary drive is formatted with a singl ntfs partition which contains only photos.
the secondary drive does not get mounted on boot, but was mounted at the time when the system hung. it has made no difference whether it was mounted or not to the system hanging.

if anyone has any questions, pointers or suggestions...

PTrenholme 05-15-2009 11:58 AM

If been running 9.0 64bit for a few months now with no "hang" problems, but, in my "vast" experience, system "hangs" as you describe are often not real "hangs." What is happening is that the kernel is executing some non-preemptable code that is waiting for a device "process completed" interrupt. (E.g., a drive to report "DMA finished," or a COM port to report "data transferred.")

How long did you wait before you decided that the system was "hung?" An I/O problem on a disk drive can take as long as five minutes before the wait "time-out" branches the code to the "I/O problem" exception handler, and the handler may just retry the I/O several times before giving up, so the total "apparent hang" time may be on the order of 30 minutes.

coal-fire-ice 05-15-2009 05:07 PM

After the first time it happened, where i retryed my ssh connection occasionally (read every ~20 minutes) for a couple of hours i guess i've only been waiting a couple of minutes before declaring the system "hung".

but even if this isn't an unrecoverable hang, and the problem is solved after some minutes, it shouldn't happen.

Not that my system is, but what if it were a server hosting services for clients. a freeze for a couple of minutes is not something you would expect to occur, unless of course the software had bugs or the hardware was faulty.

If the issue is an I/O problem, how can one tell, and does that mean that in all likelyhood the drive is faulty?

PTrenholme 05-15-2009 07:30 PM

Well, if your drive(s) are S.M.A.R.T., your BIOS or the smart tools may let you run a full drive test (which can take several hours on a large drive) and identify some problems.

But, as a first step, run fsck on each of the drive partitions. (Or just do a touch /forcefsck and reboot.) It's possible that the power failure did some drive damage that the system can "work around," but which slows drive response. Running fsck might resolve the problem - if it is a file system problem.

Also, look in dmesg (or /var/log/messages) to see if there's any "suggestive" comments from the kernel.


All times are GMT -5. The time now is 05:16 PM.