1

For some time now I've been having problems with my ubuntu 14.04 installation on my assembled pc. The main component is the motherboard, an ASRock Q1900M Pro3, 4gb ram, and two pci sata controllers.

I use this computer as home server, the main functions are file sharing (samba), local web server (LAMP), bittorrent downloader (Tixati) and "muxing station" (because I need it, don't ask). On top of that I use for web browsing whenever I don't feel like I need to power on my main pc, which uses 3 time more electricity while idle.

I can't install the server version of ubuntu because Tixati would not work and browsing the internet and muxing would be an hard task. Also a desktop environment in general is way more usable than the command line.

I have 2 kinds of problems:

  • the machine randomly stops working after a quite considerable time lapse being powered on and running (problems occur after about 24+ hours of uptime, sometimes even sooner). The freeze occurs most of the times when I'm not using directly the pc, but 2-3 time it froze while I was giving input. The effect is that the screen freezes to the last frame it processes (I guess) and ANY type of input is ignored. I also observed that it disconnects from the local network but the Ethernet LEDs still work, with the link green LED always on and the orange activity one blinking a few without any specific frequency (one may say randomly). From the dd-wrt router I can see that the host is disconnected and if I try to ping the pc I get 100% packet loss (on top of the samba share being down). The hard disk activity led also doesn't blink at all in this state. The only way I'm able to reboot the machine is the hard way (keeping the power button pressed). When I go to check the dmesg log file I can't find any suspicious entry before the freeze, last time it happened the last entry was crontab running an automatic job, but other times it was doing something else, like ufw blocking. The screen does never deactivate so I can see the last thing before it freezes; I've never seen any error messages of any kind, the only odd thing I noticed was that one time the screen was entirely grey, and I didn't leave it that way.
  • To solve this problem I thought that maybe if I made it automatically reboot once a day using crontab would solve the problem, but it is here that I encountered the second problem I want to tell you about. The second problem is that most of the times crontab reboots the pc, it would shut it down successfully but it would fail the consequential boot, leaving the system hanging in a limbo between the end of the grub and the start of loading from hard disk to ram. It just stays there with a purple screen, not showing any messages, even if I use the "text" option (or deleting quiet splash) in the grub (yes, doing update grub after the changes to the file). The fun part is that from that state I have to shutdown the hard way, and when I turn it on again the boot sequence works just fine, the grub comes up, enters the selected option after 10 secs (start ubuntu normally) and the system boots with all the kernel messaged showing correctly and fast. I tried the repair boot tool automatic fix option, it worked for 4-5 automatic reboots but for some reason it won't work any more even if I run it again.

here is the boot repair initial analysis http://paste.ubuntu.com/12589606/

here is the dmesg log file http://paste.ubuntu.com/12632375/

  • line 1192: system freeze forced reboot -> no errors logged
  • line 2399: automatic reboot fail, system hangs between grub and loading files into ram -> no errors logged
  • line 5423: manual reboot to install updates, system hangs between grub and loading files into ram -> no errors logged

gallery of my bios settings: working on it

video of the pc behaviour when in freeze state: working on it

video of the pc failing automatic reboot: working on it

let me know if you need additional informations. Thanks for your help.

  • Have you run a memtest, out of curiosity? – Daniel Oct 1 '15 at 16:55
  • @Daniel means "Have you booted memtest86+ and let it run through at least 2 complete passes?" – waltinator Oct 1 '15 at 17:34
  • ^ Yes that's a more complete sentence. – Daniel Oct 1 '15 at 18:20
  • here is the result, no errors – Alduin NDC Oct 1 '15 at 19:46
0

This is not a complete answer. Since you have a home-built system, I read through the dmesg dump with Paranoia set to High, and Confusion filter set to Low (Very paranoid, Easily confused in the virtual me), and found several items of interest:

This could be problematic, You should investigate.

623 Sep 30 07:43:26 ubuntu-server kernel: [    0.907105] hpet: number irqs doesn't agree with number of timers

Consider installing thermald.

672 Sep 30 07:43:26 ubuntu-server kernel: [    0.998865] Consider also installing thermald for improved thermal control.

This is the one I really suspect. Which processes are you running in "Real Time"? If a Real Time process loses it mind, it can consume ALL CPU, and look like your reported problem. (so would a sudden H/W spaz). Could you run for a while without rtkit?

1086 Sep 30 07:43:41 ubuntu-server rtkit-daemon[2012]: Successfully called chroot.
1087 Sep 30 07:43:41 ubuntu-server rtkit-daemon[2012]: Successfully dropped privileges.
1088 Sep 30 07:43:41 ubuntu-server rtkit-daemon[2012]: Successfully limited resources.
1089 Sep 30 07:43:41 ubuntu-server rtkit-daemon[2012]: Running.
1090 Sep 30 07:43:41 ubuntu-server rtkit-daemon[2012]: Watchdog thread running.
1091 Sep 30 07:43:41 ubuntu-server rtkit-daemon[2012]: Canary thread running.

1093 Sep 30 07:43:41 ubuntu-server rtkit-daemon[2012]: Successfully made thread 2010 of process 2010 (n/a) owned by '1000' high priority at nice level -11.
1094 Sep 30 07:43:41 ubuntu-server rtkit-daemon[2012]: Supervising 1 threads of 1 processes of 1 users.

1097 Sep 30 07:43:42 ubuntu-server rtkit-daemon[2012]: Successfully made thread 2083 of process 2010 (n/a) owned by '1000' RT at priority 5.
1098 Sep 30 07:43:42 ubuntu-server rtkit-daemon[2012]: Supervising 2 threads of 1 processes of 1 users.
1099 Sep 30 07:43:42 ubuntu-server rtkit-daemon[2012]: Successfully made thread 2084 of process 2010 (n/a) owned by '1000' RT at priority 5.
1100 Sep 30 07:43:42 ubuntu-server rtkit-daemon[2012]: Supervising 3 threads of 1 processes of 1 users.

Problem in the logging system? Fix this on general principles.

3293 Oct  1 08:02:11 ubuntu-server rsyslogd-2039: Could no open output pipe '/dev/xconsole': No such file or directory [try http://www.rsyslog.com/e/2039 ]

And this is a normal shutdown:

3935 Oct  1 08:10:42 ubuntu-server rsyslogd: [origin software="rsyslogd" swVersion="7.4.4" x-pid="967" x-info="http://www.rsyslog.com"] exiting on signal 15.

To get closer to seeing the last pre-crash log entry, start this in a shell (so it will NOT automatically restart):

# set nap to sleep time (GNU sleep takes floating point values)
nap=2.5
# forever, or until the world ends
while [[ : ]] ; do
    dmesg -T >logfile
    sleep $nap
done

After the crash, check the modification date and contents of logfile. Increase the value of $nap to decrease load on the system by this, decrease the value to store dmesg closer to the time of the crash (at the cost of more load). But this is temporary debugging, so you don't care much about load. Be a ware that between the dmesg -T >logfile and the data being preserved on disk, there's overhead, buffering, etc. If the system crashes before the data gets all the way to disk it will be lost, but debugging hardware and/or Real Time is hard.

  • thanks for the time you put into this, I really appreciate it. As of now I installed thermald, even if I'm pretty sure is not a problem of temperature. I also stopped the rtkit demon and make that script running with the settings you suggested. Now the pc won't reboot automatically, let's see how much time it can stay up until next crash. thanks again for your help. – Alduin NDC Oct 1 '15 at 20:30
  • update: This morning the pc froze at 8.37 but The script you provided wasn't able to create the log file properly, it created a file of 0kb, maybe it's my fault because I didn't pay attention yesterday when I run it. Anyway the interesting fact is the Tixati auto-closed normally at 7:43 but the system froze at 8:37 with cpu usage at 0% and only one terminal window open. – Alduin NDC Oct 2 '15 at 11:25
  • Wait, you fired off some stranger's script and didn't see if it did anything? It should have created the logfile every $nap seconds! You're either sleep-deprived, very new at debugging hardware/software Heisenbugs, or management. Do you keep a log of your changes? – waltinator Oct 4 '15 at 3:42
  • I knew what that script does, and when I tried It it created the file correctly with all the system log entries, but somehow upon rebooting maybe the file was corrupted or something and it ended up being 0k. And yes, I'm sleep-deprived and very new at debugging hardware/software, but you gotta start somewhere. thanks for your help. – Alduin NDC Oct 4 '15 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.