MacOS X keeps crashing

planet323

Registered
I'm testing a Mac Powerbook G4 as a potential replacement for my linux laptop. At the moment, MacOS X keeps crashing on me.

I can crash it as follows: create a small file test.c containing:
#include <stdio.h>
int main() { printf ("sizeof(int)=%d\n",sizeof(int)); }

and then repeatedly compiling and executing it in a loop:
while (1)
gcc -O2 test.c
./a.out > /dev/null
done

(In my tests an Activity Monitor was also running.)

gcc --version outputs
gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495)
Copyright (C) 2002 Free Software Foundation, Inc.
....

I'm running MacOS 10.3.4 and now 10.3.5 (although the machine froze while "optimizing HD performance" while upgrading to 10.3.5). (uname now says I'm running Darwin kernel version 7.5.0 dated Aug 5 2004).

Machine is a Powerbook G4 with 512 MB memory (only ~200 MB is in use).

After about 15-20 minutes, the machine freezes solid. The display remains unchanged, the mouse doesn't respond, the network doesn't respond, closing the screen does nothing, and I have to hold the power button down to turn the machine off and then reboot.

According to the Activity Monitor main memory is not being leaked and there is plenty of HD space. I've also seen the freeze happen under other circumstances (not involving gcc), but this is the most repeatable.

Does this happen for you, or not, and how might I go about fixing it?

Thanks.
 
I wonder if you are having heat problems. When you run your little compiling stress test I assume that it loops for a number of times and them the system freezes up? Do the fans come on at all during that time? Also do you have it setting on a hard surface, if you are running this test with it setting on a fluffy duvet you could be thwarting the thermal dissipation.

-Eric
 
There is a little fan that kicks on to help cool the processor when it is working really hard. What model of powerbook is it and how fast of a G4? If you are running that little compile loop for 20 minutes like you said you should certainly hear the fan at some point.

If you don't then I bet is that you have some hardware problem where either the fan is dead or the little temp sensor is not working. I think that you can get a little program off of version tracker to tell you the internal temps and fan RPMs on some powerbooks, alas it did not work on mine.
 
First, one of the gcc tests I did last night froze the machine in under a minute after I'd just been clicking around in the UI for a lengthy period of time.

Second, the following test uses 100% CPU and ran for over 5 hours without a problem:
Code:
while (1)
echo blah blah blah > /dev/null
end

However, the following test hangs the machine after a while, just like the gcc test:
Code:
while (1)
(echo blah blah blah > /dev/null)
end

As far as I can see the latter is just doing a lot more forks() and dead process reaping than the former. Also, it would seem to involve only the shell and the kernel, ruling out bugs in other software or the configuration. (The gcc test also involves a lot of process creation, but it only gets about 90% cpu utilization.)

My machine is a 15" Powerbook G4 with 1 GHz processor.

Has anyone been able to run the gcc test or the second test above without problems for over 30 minutes without a problem?
 
No. That's not normal at all. I would suspect RAM or other hardware issues. Have you heard your fan yet?

Doug
 
I was trying out a test machine, and I don't know its history. I will exchange it and try again.

Edit: I haven't *heard* the fan, but my environment is somewhat noisy, and I've never heard anyone else's fan either, compared to the cyclone generator on my hold x86 laptop.

Thanks everyone for your help.
::love::
 
planet323 said:
According to the Activity Monitor main memory is not being leaked and there is plenty of HD space.


what the hell does a memory leak have to do with HD space?!
 
planet323 said:
I'm testing a Mac Powerbook G4 as a potential replacement for my linux laptop. At the moment, MacOS X keeps crashing on me.

I can crash it as follows: create a small file test.c containing:
#include <stdio.h>
int main() { printf ("sizeof(int)=%d\n",sizeof(int)); }

and then repeatedly compiling and executing it in a loop:
while (1)
gcc -O2 test.c
./a.out > /dev/null
done

(In my tests an Activity Monitor was also running.)

gcc --version outputs
gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495)
Copyright (C) 2002 Free Software Foundation, Inc.
....

I'm running MacOS 10.3.4 and now 10.3.5 (although the machine froze while "optimizing HD performance" while upgrading to 10.3.5). (uname now says I'm running Darwin kernel version 7.5.0 dated Aug 5 2004).

Machine is a Powerbook G4 with 512 MB memory (only ~200 MB is in use).

After about 15-20 minutes, the machine freezes solid. The display remains unchanged, the mouse doesn't respond, the network doesn't respond, closing the screen does nothing, and I have to hold the power button down to turn the machine off and then reboot.

According to the Activity Monitor main memory is not being leaked and there is plenty of HD space. I've also seen the freeze happen under other circumstances (not involving gcc), but this is the most repeatable.

Does this happen for you, or not, and how might I go about fixing it?

Thanks.
anyway, this is my first post....don't know if it will make it. A person came over to my house to help me with my new powerbook...he brough four little "feet" from which is just pulled the paper off and stuck them on the bottom, and he said, these things overheat...I don't know why Apple doesn't include them...I don't know where he got them...but my computer never gets hot now.​
 
kendall said:
is it normal to test a machine with stupid little c scripts?

anyone... anyone?

Yep, I do it all the time. The idea it to get the smallest test which will trigger the bug. I am sure that the order of operations was not, "Hey I got a new powerbook lets write a dorky little script to test it!" Rather it was something like "My powerbook keep freezing up while compiling large applications, let's see if we can isolate the problem."
 
planet323 said:
According to the Activity Monitor main memory is not being leaked and there is plenty of HD space.

kendall said:
what the hell does a memory leak have to do with HD space?!

See the and in the original sentence, it does not imply causality. Simply that both these things are happening at the same time.

Kendall you seem to be a bit more irritable than normal, take a deep breath... and relax.
 
Kendall has a right to ask what a memory leak has to do with hard drive space, and he may not even know it's a legitimate question to ask.

If an application has a memory leak, then that means that the application is not releasing memory it doesn't need anymore and is taking on new memory constantly. Since it's not releasing memory, then it's ballooning up and just eating more and more memory up. When it's eaten all the free RAM the system can offer, then the swap files kick in -- and OS X starts paging out RAM to disk to make room for the new RAM that the application is eating. Leave this cycle to run amok for long enough, and swap files will fill the remaining space on your hard drive until a crash occurs, which can be a very, very, very ugly thing in this situation.

So, in essence, a bad memory leak can have a significant impact on hard drive space.
 
That is true that a leaky application can use up disk space. I did not really consider that in this situation because planet323 had said activity monitor had not reported any processes that where bloating in memory which is a necessary initial condition.

Another interesting point in this ares is that a program with a memory leak can usually only leak about 1 gigabyte of memory before it runs out of address space internally. (To pack things tighter takes some conscious effort.) Before this last software update I notices that I had about 4 Gigs of swap space I and never noticed it.* So I wonder if one would even notice it at times?

-Eric

* I had an uptime of about a month at the time and had several things like large word documents open which I just then hid and forgot about. So they got swapped out and never bothered me much.
 
artwearbyalida said:
anyway, this is my first post....don't know if it will make it. A person came over to my house to help me with my new powerbook...he brough four little "feet" from which is just pulled the paper off and stuck them on the bottom, and he said, these things overheat...I don't know why Apple doesn't include them...I don't know where he got them...but my computer never gets hot now.​

Welcome to the forum. :)

No Apple does not include feet because they do not know what set up you would have. Those little feet can be bought almost anywhere. Just do not set it on top of your quilt on your bed.
 
ElDiabloConCaca said:
So, in essence, a bad memory leak can have a significant impact on hard drive space.


os x's swap file is 80MB. the system cant create multiple swap files. if a app was to run amuck, os x wouldnt create multiple swap files because of it. if it did, the app would likely be some sort of virus that has compromised the systems integrity.
 
lurk said:
Yep, I do it all the time. The idea it to get the smallest test which will trigger the bug. I am sure that the order of operations was not, "Hey I got a new powerbook lets write a dorky little script to test it!" Rather it was something like "My powerbook keep freezing up while compiling large applications, let's see if we can isolate the problem."

the way the thread starts out and the comments the user has posted implies that "Hey I got a new powerbook lets write a dorky little script to test it!"

also, what the hell is the point of creating a test script to compile in an infinite loop? of course its going to create some sort of problem. i doubt gcc was ever intended to be used in such a way.

i ran linux for 7 years and it was always possible to freeze a box by running stupid little test scripts such as what the user is attempting.

when i was young and stupid, i would do such things on friends computers.

this is nothing no and certainly no way to test the integrity of a unix based OS.
 
But there is something to this anyway. He said that the PowerBook crashes in this way under other circumstances too. My sisters PB G4 (Alu, 1.5ghz) has been doing these random freezes from day one. The thing is that it isn't a kernel panic, it just freezes. Even after reformatting and reinstalling Mac OS X it crashed during the Software Update that comes after the first restart. I can only imagine that it is some kind of a hardware issue and hopefully she will be able to leave it in for repair soon. As a side note, my PB G4 (Alu 1.25ghz from last december) has crashed like twice ever. It had/has screen issues though.
 
kendall said:
...when i was young and stupid, i would do such things on friends computers just to be a dick.

And we learn from our young stupidity. Before we judge, give the benefit of the doubt that there must be a reason for the action. ;)
 
Back
Top