Complete System Freeze

I have had this happen a couple of times now, working on my latest app, running in IDE Debug. Everything freezes except the mouse cursor. I can move the mouse cursor around the screen. Clicking does nothing. Trying to switch between apps does nothing. The entire computer becomes totally useless, and I have to force a system reboot with the power key. When I check the console after reboot, I see this message just before the boot log:

I’m not doing anything special in any MouseDown events. This has happened twice now, and both times seemed to be (I say seemed because I can get no debugger verification) just after a shell call takes place. What could be happening with a shell call to cause this, and how do I avoid a resulting total system freeze?

Thanks.

USB Mouse?
is your app (or any other running apps) capable of blocking any/all USB ports?
is there a loose wire/cracked cable? loose usb plug?

Bluetooth/Wireless Mouse?
Anything disrupting the signal?

I’m just using a cheap USB mouse (plugged in, not wireless). Hmm, are you saying this could be a mouse hardware failure? I guess that could make sense. A stuck mouse-down button…

but actually that doesn’t explain the total freeze. I just checked and I can hold the mouse button down and also switch between apps and do other things with the keyboard. I forgot to mention, keyboard is also totally unresponsive.

My app doesn’t do anything special with serial ports, nor anything else I’m running as far as I know.

I saw that this morning in the latest build of Windows 10. Seems for some reason the disk access was frozen.

Nothing worked, not even the Start menu. Yet I could still move the mouse cursor. This seems fairly frequent according to a quick google search on “Windows freeze”.

Interesting, seems exactly the same behavior. I forgot to mention, I’m working on Mac.

Just a hunch, but it does seem related to some kind of total freeze to disk access, because both times it happened just after I know a shell call takes place in my app. What’s going on?

… after more Google searching …

I wonder if this is an Out Of Memory issue.

Mavericks is horrible at memory management. I have 8GB RAM and consistently it uses up all the RAM, I have to clear out RAM cache using a 3rd party tool. This never ever happened under Snow Leopard – I always had 3-4 GB completely free. Unbelievable what Apple has done to their OS.

Free RAM is wasted RAM. RAM usage is only a problem when it’s causing things to page and from disk.

Well, when the system gets down to 8MB (that’s MEGAbytes) free RAM, that causes paging and everything crawls to near halt. Memory tool shows me that full 30% of the RAM is being used as a #$%^ CACHE. That is utterly absurd. Free the cache and, susprise, suddenly my computer works again.

Now someone always pipes up and says “but RAM caching makes your system faster and clearing it will make your system slower”. Sorry, not in this case. Once you have no free RAM, that’s just plain wrong. The system NEEDS headroom of empty RAM in order to function as expected. The cache should never be as large as OSX allows it to be when there is next to nothing else available.

I bet what I’m running into is a total out of memory instance. No way out.

[quote=231328:@Aaron Hunt]Well, when the system gets down to 8MB (that’s MEGAbytes) free RAM, that causes paging and everything crawls to near halt. Memory tool shows me that full 30% of the RAM is being used as a #$%^ CACHE. That is utterly absurd. Free the cache and, susprise, suddenly my computer works again.

I bet what I’m running into is a total out of memory instance. No way out.[/quote]

The issue seems indeed of the same nature as in Windows : the system starts paginating, and if the disk for some reason is not quite ready, everything freezes.

Not long ago when I was using an antique 2007 White MacBook, I had simply turned off pagination altogether, and the machine got a speed boost. On the other hand, I was confined to the 8 MB RAM. But I did hate pagination on the hard drive.

Now that my 2011 iMac has got an SSD drive, everything is faster. El Capitan starts in about 30 seconds, VM are fast as can be, just by the magic of a fast disk. I no longer hate pagination :wink:

I’ve had similar problems which went away after I upgraded my computer from 6 GB to 16. This is also why I curse the fruit company for making such a simple hardware upgrade impossible nowadays. If I hadn’t been able to use more RAM I would have needed a new computer. But most likely this is the intent anyways for soldiering the RAM in.

Space
Sockets for DRAM take more space and so you can’t make the computer quite as thin etc
Soldered you can get right down to the height of the DRAM chip
Been there. Worked for a company that made its own boards & space was at premium.
We skipped dram sockets as well - when you needed more you swapped the entire board

Try a different mouse, incase it’s crashing the USB bus. I had a cheap USB hub once, which would crash and then so would the system. Once I removed the hub, the crashes stopped. Remember even the internal keyboards, trackpads and cameras are on USB.

I also have a 27" Thunderbolt display, that until last year would suddenly no longer work, until both the display and machine were restarted. A firmware update for the display solved it.

[quote=231325:@Aaron Hunt]@Michel Bujardet I saw that this morning in the latest build of Windows 10.
Interesting, seems exactly the same behavior. I forgot to mention, I’m working on Mac.[/quote]
Mac is the new Windows, the amount of times I have to restart my Mac to get things to work again. Since El Capitan we now have a really annoying issue where it disconnects from the file server (in Finder) and refuses to re-connect until I’ve rebooted Windows, I mean OS X.

With Snow Leopard, I very rarely rebooted my Mac, only to install system and security updates. Now it’s almost on a daily basis. My wife who’s still using Mavericks almost never reboots.