I'm having an issue with my iMac (2011, 3.4Ghz i7, 24Gb RAM, 1TB HDD). Every so often screen goes gray and it crashes. Then when I try to reboot, it gets stuck in a cycle of trying to reboot, failing and then trying again. If I then switch off, disconnect, and give it a few hours, it will usually boot up fine. I also ran the boot up diagnostic and I get the error shown. Here are some screenshots.