# System shutting off randomly



## Eponasoft (Jan 21, 2010)

OK so IÂ´ve got FreeBSD 7.2 installed on another system. It running great, but as IÂ´ve been working on the system, it has randomly shut down twice. IÂ´ve been working with this system for a couple of days now. It had never done this when it was infected with Windows XP, so IÂ´m wondering if anyone has any ideas as to what I can check to prevent this from happening any more. Of course, IÂ´ve been building applications since the start, so it always happens during a build, though I donÂ´t know if thatÂ´s got anything to do with it or not. So...ideas?


----------



## volatilevoid (Jan 21, 2010)

If it just shuts down without any warning, I'd say your PSU is defective. Compiling stresses the system more than just running Windows XP, I guess.


----------



## DutchDaemon (Jan 21, 2010)

Any excessive heat development?


----------



## Savagedlight (Jan 21, 2010)

If the aforementioned suggestions are not the case, I'd burn Memtest86+ (memory diagnostic program) to a CD and let it run one or two rounds.  It doesn't sound likely to be faulty memory, though.


----------



## SirDice (Jan 21, 2010)

Eponasoft said:
			
		

> Of course, IÂ´ve been building applications since the start, so it always happens during a build, though I donÂ´t know if thatÂ´s got anything to do with it or not. So...ideas?



+1 on heat. Compiling/building is a CPU intensive task. Most likely is your CPU overheating which causes the system to shutdown in order to protect itself.


----------



## Beastie (Jan 21, 2010)

I agree about the heat.
Check sensors if your MoBo has any and FreeBSD understands them.
Open the case and try again what you were doing.

What type of case do you have? Is the CPU located on the "heat path" that ends at the top-rear (PSU), IOW is the MoBo heat properly extracted through the PSU fan or is most of the MoBo under the PSU?


Savagedlight, freezes and/or reboots are more likely for memory problems. And memtest86+ can be installed as a loadable kernel. No need for a CD.


----------



## DutchDaemon (Jan 21, 2010)

A friend of mine once had a very tiny compact 'server' with cheap-ish parts (like a laptop harddisk and tiny fans). Any prolonged usage (let alone compiling) would make it overheat and shut down. Even a moderate amount of visits to some websites hosted on it would make it fall over at room temperature.


----------



## Graaf_van_Vlaanderen (Jan 21, 2010)

Check the cooler of the CPU. I had this issue a couple of times and the problem was that the cooler had become loose and there was no descent thermal contact anymore between CPU end cooler.

If it's loose, unmount the device, clean the thermal contact surface of both CPU and cooler. Blast away all the dust inside the cooler with an air compressor. Mount the cooler again with thermal compound.

In case of s bad PSU, change it with another to see if you see the issue.


----------



## phoenix (Jan 21, 2010)

Especially if this is a P4 system.  Without adequate cooling (which really means being able to vent the heat out the back, preferably away from a wall or desk), the P4 CPU will auto-throttle itself, and then shutoff.


----------



## Daisuke_Aramaki (Jan 21, 2010)

A friend of mine encountered a similar situation that DD mentioned. His server got hosed because of overheating.


----------



## Eponasoft (Jan 21, 2010)

I was thinking that it was overheating as well...the last time it shut off, I checked the temperature after turning it back on. It was well within normal operating range...in my experience, they donÂ´t cool down THAT fast. The CPU and PSU fans are both fully operational. However, IÂ´d like to have some kind of monitor added so I can check out the temperature while the OS is up. Any good ports for this? The system uses KDE3 like mine does so something that can integrate into KDE would be best...


----------



## Graaf_van_Vlaanderen (Jan 21, 2010)

Eponasoft said:
			
		

> I was thinking that it was overheating as well...the last time it shut off, I checked the temperature after turning it back on. It was well within normal operating range...in my experience, they donÂ´t cool down THAT fast. The CPU and PSU fans are both fully operational. However, IÂ´d like to have some kind of monitor added so I can check out the temperature while the OS is up. Any good ports for this? The system uses KDE3 like mine does so something that can integrate into KDE would be best...



If the cooler is loosely thermally connected to the CPU, it will cool down quite fast and you won't notice the over temperature.
Keep in mind that in case of power off due to CPU over temperature, this is entirely determined by the junction temperature of the die of the chip. Temperature monitors are in my opinion only useful if you see three temperatures: junction, case and ambient.
One of the additional problems I often see, is the amount of dust
inside a machine. If any computer is not working in a dust free room, it should be cleaned regularly. It's sometimes astonishing to see how some peoples' computer have turned into a vacuum cleaner reservoir.


----------



## Eponasoft (Jan 22, 2010)

Unfortunately, overheating is not the problem. I have no idea what else it could be, aside from the motherboard simply on its last legs. As I said though, this never happened when XP was installed...it had plenty of other problems then (between the chair and the keyboard). I hate to think that this is a problem somewhere in FreeBSD itself but thatÂ´s the direction IÂ´m headed in right now so if thereÂ´s anything anyone might know about possible misconfigurations that could cause this...IÂ´m all ears....err, eyes.


----------



## DutchDaemon (Jan 22, 2010)

I realise that it's not cast in stone, but it's usually like this from my POV:

If it's a FreeBSD/application problem, a crash or a freeze will leave _something_ in a log file, or in a core dump, or on the console. There will always be _some_ trace somewhere. If there's none of these, it's _almost_ definitely a hardware issue. Unfortunately, those can be hard to find, because the lack of visual information. I've seen crashes and freezes due to defective video cards that seemed to run perfectly, loose contacts, faulty wiring, dust, the tiniest of short-circuits, power cables hanging on for dear life (on either end), cards touching bare metal ..


----------



## Eponasoft (Jan 22, 2010)

It's a hardware fault in the system...we've managed to verify that part at least. It's not the CPU and it's not the RAM. It appears to be an issue with the power system...might be a loose connector somewhere, or perhaps even a fragile PSU.

EDIT: I believe the problem was discovered. I inspected the machine from top to bottom and found that the main power inlet to the motherboard wasn't entirely seated. I pushed it in all the way and have yet to have any further problems. On a perhaps related but maybe unrelated note. I wiped out 7.2 and installed 8.0 cleanly. If the problem persists, I'm not sure what else it could be...but here's hoping that the power connector was the problem.


----------



## Graaf_van_Vlaanderen (Jan 22, 2010)

Eponasoft said:
			
		

> It's a hardware fault in the system...we've managed to verify that part at least. It's not the CPU and it's not the RAM. It appears to be an issue with the power system...might be a loose connector somewhere, or perhaps even a fragile PSU.
> 
> EDIT: I believe the problem was discovered. I inspected the machine from top to bottom and found that the main power inlet to the motherboard wasn't entirely seated. I pushed it in all the way and have yet to have any further problems. On a perhaps related but maybe unrelated note. I wiped out 7.2 and installed 8.0 cleanly. If the problem persists, I'm not sure what else it could be...but here's hoping that the power connector was the problem.



That could be the cause. Bad connections / contacts create a high contact resistance and hence increase dramatically the impedance of the power supply. As soon as the switching load (CPU) increases the power supply on the motherboard cannot be properly decoupled anymore and hence the system starts to behave unpredictable.
In a nutshell the DC supply of the power supply looks more like an AC signal.   

Bad contacts are one of the main causes for fire in electrical circuits: P=I^2*R
Bad contact means an increase of R (contact resistance), hence an increase in heat over the contact.


----------



## Eponasoft (Jan 22, 2010)

The system has run all day without an issue, even while building apps. I reckon this one can be considered solved. Thanks to everyone who responded.


----------



## Eponasoft (Jan 24, 2010)

EPILOGUE:
The system had been running smoothly under FreeBSD 8.0...the openoffice build was going well, though noticably slower than usual. I had left it to build when I went to work on Saturday. When I came back, X had crashed and bright white text was flying by in the console too fast for me to read. I didn't think to hit Scroll Lock to read it, I just hit the reset button on the machine and let it do its fsck'ing around when it came back up. openoffice make continued...it ran all night last night and into today. Again, I had to go to work and left the machine to continue the build. When I came home, the was off and the hard drive was making nasty clicking noises. I rebooted the system and couldn't get it to post...the clicking turned to knocking. That's when I knew that the hard drive was dead, and the reason the openoffice build was taking so long was that it was on its last legs at the time. Obviously a broken drive head. That also explained the psycho text the day prior. Oh well...time to upgrade anyways.


----------

