I had a Linux system that froze everytime it was very busy, but it turned out to be the motherboard. It wasn't the fault of any software.
You can try pressing CTRL-ALT-Backspace
to try to shutdown the X window system, or CTRL-ALT-F1
to try to get to a text console.
Either way if you get to a text prompt and login as root, you may be able to shutdown and restart the display manager like this: