# What makes a Linux System suddenly reset?

## garythompson

What type of errors causes a linux system to suddenly reboot?

- Segfault?

What can I do to trace this?  I've googled but haven't found anything clear to me.

What in software causes a system to suddenly reboot and there is no error messages in ANY log files?

This is related to another thread I have which I will link to later,

- I've Memtested

- I've stress tested

- I can't force the hardware to fail

- I've tried different drivers

Please help me before I decide 64 bit is just painful (Athlon X2 processor - I've got 32bit compatability libraries but I think I'm about to wipe everything and go straight back to 32 bit)

Thanks for your help.

----------

## platojones

Either hardware or a badly misconfigured kernel.  That's really it.  What kernel are you using...you say you've stress tested, but memtest only tests ram...what other stress tests have you used?  May want to try mprime (linux version of Prime95 from the GIMPS project) or a Linpack interface (if you dual-boot windows),  just to be sure.  Linux kernel crashes are very rare, so it's easy to narrow it down to 2 things.

----------

## Hu

It is unlikely that switching to a 32-bit environment will fix your problem.  You have a hardware issue or a very unusual kernel problem.  A simple kernel panic would leave output on the system console.  Panics do not reboot by default, though the kernel can be configured to reboot automatically on panic.  It is also possible, though very unlikely, that you have CONFIG_DOUBLEFAULT=n and you are experiencing a double fault.

Please post the output of uname -a ; lsmod ; cat /proc/sys/kernel/tainted ; emerge --info ; equery list x11-drivers/.

----------

## garythompson

Thank you for the replies.

Apart from Mem test, I've only stress tested through the use of office applications.  The system happily 7zips 10GB files and I run VirtualBox as well on the machine with a windows guest.  The guest is WindowsXP with 3 GB of RAM allocated and I have disabled all page files.  The application I run is quite cpu intensive as well as using about 1GB of memory in dynamically allocated memory databases (it's a charting application).  None of this causes any problems to the system and has withstood heavy CPU and memory allocation.  Today the system was crashing regularly so I started Virtualbox headless in console and used remote desktop to access the guest - the system performed fine during this.

Normally I would expect a hardware fault to be more repeatable.  If there is a fault, I am more inclined to suspect the video card but I have played Half Life 2 through Wine without any issues.  If the sysytem crashes, it's usually within fifteen minutes of logging into gnome.

Here is the output as requested:

 uname -a ; lsmod ; cat /proc/sys/kernel/tainted ; emerge --info ; equery list x11-drivers/

Linux main-desktop 2.6.25-gentoo-r7 #7 SMP Tue Sep 30 23:25:23 EST 2008 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ AuthenticAMD GNU/Linux

Module                  Size  Used by

vboxdrv              1632832  0

snd_seq_midi            9472  0

snd_seq_midi_event      8832  1 snd_seq_midi

snd_seq                52896  3 snd_seq_midi,snd_seq_midi_event

usbhid                 21252  0

ehci_hcd               32396  0

ohci_hcd               22468  0

usbcore               130136  4 usbhid,ehci_hcd,ohci_hcd

snd_ca0106             35328  0

snd_rawmidi            21760  2 snd_seq_midi,snd_ca0106

snd_seq_device          8272  2 snd_seq_midi,snd_rawmidi

nvidia               8102320  26

snd_ac97_codec        110488  1 snd_ca0106

snd_pcm                75976  2 snd_ca0106,snd_ac97_codec

snd_timer              22480  2 snd_seq,snd_pcm

k8temp                  6912  0

snd                    49288  8 snd_seq,snd_ca0106,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm,snd_timer

soundcore               8608  1 snd

ac97_bus                3968  1 snd_ac97_codec

snd_page_alloc         10448  2 snd_ca0106,snd_pcm

1

Portage 2.1.4.5 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.7-r2, 2.6.25-gentoo-r7 x86_64)

=================================================================

System uname: 2.6.25-gentoo-r7 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+

Timestamp of tree: Thu, 16 Oct 2008 21:16:01 +0000

app-shells/bash:     3.2_p33

dev-java/java-config: 1.3.7, 2.1.6

dev-lang/python:     2.4.4-r15, 2.5.2-r8

dev-python/pycrypto: 2.0.1-r6

dev-util/cmake:      2.4.8

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r3

sys-devel/autoconf:  2.13, 2.61-r2

sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.23-r3

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=athlon64 -O2 -pipe -msse3"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-march=athlon64 -O2 -pipe -msse3"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://mirror.internode.on.net/pub/gentoo/ ftp://ftp.planetmirror.com/pub/gentoo/ ftp://mirror.pacific.net.au/linux/Gentoo ftp://mirror.isp.net.au/pub/gentoo/ ftp://ftp.swin.edu.au/gentoo "

LANG="en_AU.UTF-8"

LC_ALL="en_AU.UTF-8"

LINGUAS="en_AU en_GB"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/portage/local/layman/synce /usr/portage/local/layman/sunrise /usr/portage/local/layman/xwing /usr/portage/local/layman/jokey /usr/local/portage"

SYNC="rsync://mirror.internode.on.net/gentoo-portage"

USE="X acl acpi alsa amd64 apache2 avahi bash-completion berkdb bzip2 cdr cli cracklib crypt cups dbus dga directfb disk-partition dmx dri dvb dvd dvdr dvdread esd flac fortran gdbm gnome gpm gstreamer gtk hal iconv ip4200 ipv6 isdnlog jbig jpeg jpeg2k keyring libnotify lm_sensors midi mmx mozdom mpm-worker mudflap ncurses nls nptl nptlonly nvidia opengl openmp pam pcre pda perl pmu png pppd pulseaudio python readline reflection replytolist samba session smp spell spl sse sse2 ssl symlink tcpd threads tiff truetype unicode usb v4l2 xinerama xinetd xorg xprint zlib" ALSA_CARDS="ca0106 usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon directory template" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_AU en_GB" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

[ Searching for all packages in 'x11-drivers' among: ]

 * installed packages

[I--] [  ] x11-drivers/nvidia-drivers-173.14.09 (0)

[I--] [  ] x11-drivers/xf86-input-evdev-1.1.5-r2 (0)

[I--] [  ] x11-drivers/xf86-input-keyboard-1.1.1-r1 (0)

[I--] [  ] x11-drivers/xf86-input-mouse-1.2.3 (0)

[I--] [  ] x11-drivers/xf86-video-nv-2.1.9 (0)

[I--] [  ] x11-drivers/xf86-video-vesa-1.3.0 (0)

As for my Linux Kernel configuration - I don't usually stray too much from the default guide as per the gentoo handbook.  I may sometimes turn off everything I don't feel I need and wait for an application to complain that it needs it, but that's usually only in the drivers sections.

Thank you again for your assistance.  There may be a hardware glitch, but I'm more inclined to suspect that I have caused a glitch somewhere in software.  Hmmm... both arguments are working for me at the moment now.

----------

## devsk

I know its the first thing people usually refer, and I am surprised nobody has so far, but I will put it out anyway. Resets without a trace also happen if your power supply can't take it anymore. Does your PSU have enough juice in it to serve all the components in your box?

----------

## SeaTiger

I will put in my 2 cents.

Besides power supply, driver bug or improper driver may kill the system too.

 2 days ago I was able to reboot my system by running glxgear, due to misconfiguration/wrong video card driver.

----------

## garythompson

PSU is an excellent point, I remember having PSU issues five years ago and have gone back to taking it for granted...

480W PSU serving 5 x HDD, 1 Mobo (Middle range), AMD X2 4400, 6GB DDRII RAM (Four Boards), Low End GPU (PCI-E), Dual Tv-Tuner (PCI) and Low End Sound Card (PCI) = 324W (http://www.extreme.outervision.com/PSUEngine which is reported as conservative)

PSU doesn't appear so, but a great suggestion.

I'm also suspecting a problem with video drivers, although I've tested a variety of drivers.  The system resets have only been during X-Windows sessions (I've disabled all modules and still have a problem).

I appreciate the suggestions, you guys have been great.

----------

## garythompson

I'm going to rebuild my system.  

The system crashes very reliably when I log into someone elses account, but not so much for mine.  Part of me feels that there is a glitch in my ~/gnome, gconf or gnome2 configuration files somehow.  Because if I delete these, my account crashes immediately 50% of the time but if I restore them from my previous backup, then my system doesn't crash so often or sometimes not at all for weeks.

Perhaps there is a setting there that is enabling a buggy feature of a module or something?  I would really like to find what it is (so I can contribute back and report the bug!).

However, this is a production system.  It will be interesting to see if a rebuild (and clearing all the configuration files in /home/*) will resolve the matter.

----------

## devsk

480W may be fine but amperage is what matters? how do the rails look like on this PSU?

Video driver would be my second line of attack. Try default vesa/vga/nv (if your card is nvidia) driver for some time.

----------

## garythompson

I don't mean to be spamming my own thread, I appologise if this is not good ettiquete.

I use dm (Raid 0) and lvm quite extensively.  Perhaps a faulty disk might be causing system problems?

----------

## garythompson

 *devsk wrote:*   

> 480W may be fine but amperage is what matters? how do the rails look like on this PSU?
> 
> Video driver would be my second line of attack. Try default vesa/vga/nv (if your card is nvidia) driver for some time.

 

I've tried vesa and nv and both crash.

It's a fairly new PSU (six months old) Antec True Power 2.0

Thanks for the input!

New symptom:  System hang and no response from ssh server.

----------

## Dominique_71

My new amd64 box is back to my computer shop for the third time because it just hang or reset.

With an old memtest version from 64studio, all the test was successful. So, the first time, they made a bios update.

I updated memtest to the last memtest86+ from portage, and get a lot of errors. They changed the ram to another brand the second time.

Same problem again. I also noticed a few other things like a very low +12V into the bios (I don't checked with a voltmeter, this box is new and under guaranty), and also some unwanted bios reset. They will check the alim and the motherboard and change the one that is faulty.

I also noticed, but on my old x86 box, a very sure way to reset the pc. I just have to fire a term, login as root into the term with "su -", and run "reboot". I just done a bug report about this.

----------

## Dominique_71

 *garythompson wrote:*   

> 6GB DDRII RAM (Four Boards)

 

I guess that you have 2 x 1GB and 2 x 2GB. Are you 100% sure that your board can handle this?

----------

## garythompson

Hi, 

Sorry for being out of touch on my thread.

I might do some memtests as recommended tonight, however:

I have performed a clean install of gentoo (wiping all configuration files, caches etc... only keeping distfiles) and my system has been running fine.  

I'm also running unstable kernel and nvidia drivers (I had some USB bugs which were fixed by the 2.6.27 kernel) at the moment and all has been smooth.

I didn't consider an odd ram configuration (dual channel support as well), perhaps I'll just have to upgrade to 8GB just to be safe  :Wink: 

Thank you everyone for your input.

----------

## Dominique_71

For the amount ram, all depend of what you want to do. Merging a program like hugin will consume more that 1GB ram during the compilation. Firefox with a lot of open tabs can also consume a huge amount of ram. But I think that 4GB wiill be enough for most desktop users today. But on the long run, 8GB will certainly be better.

About my new pc, my shop send it to its headquarter, they will change both the power and the motherboard, and test it with 8GB ram.

----------

