Constant Kernel Panics (after system goes to sleep?) since booting up from power failure

Hi. Running Monterey on a 2017 5K iMac and all was stable until the recent storms caused a power outage. Since then my iMac has been throwing a Kernel Panic every time it goes to sleep. Tried unplugging external devices and using the disk utility in Recovery mode, but to no avail. I -think- there may be a connection to having Chrome open (which was never an issue before) but on the advice of those in this forum downloaded and ran EtreCheck and am copying the output report... All advice gratefully welcome!


Posted on Mar 18, 2023 8:36 PM

Reply
Question marked as Top-ranking reply

Posted on Mar 19, 2023 4:31 PM

A power outage or surge could have damaged the power supply or perhaps even the Logic Board. If you are using a surge power strip, then try plugging the iMac directly into the wall electrical socket instead just in case the power surge strip sustained damage from a surge.


It is most likely a memory problem since the Kernel Panic log snippet in the report references "memcpy" which is "memory copy" and the size check failed. The first suspect would be the memory from the upgrade since Macs are very picky about the memory used. What is the make & model of the memory used for the upgrade?


You can try running the Apple Diagnostics to see if any hardware issues are detected.


You can also try running Memtest86 to see if any issues show up with the memory. If the default settings don't reveal a problem, then change the Memtest86 CPU options to "Round Robin" and "Sequential" to see whether the tests have any problems when using either CPU option. I have been finding that these Memtest86 CPU settings tend to cause the memory test to freeze fairly quickly if there is a hardware issue...this is just as useful as an actual error result because it means you can remove memory modules to see if the issue is resolved.


Similar questions

11 replies
Question marked as Top-ranking reply

Mar 19, 2023 4:31 PM in response to robingo

A power outage or surge could have damaged the power supply or perhaps even the Logic Board. If you are using a surge power strip, then try plugging the iMac directly into the wall electrical socket instead just in case the power surge strip sustained damage from a surge.


It is most likely a memory problem since the Kernel Panic log snippet in the report references "memcpy" which is "memory copy" and the size check failed. The first suspect would be the memory from the upgrade since Macs are very picky about the memory used. What is the make & model of the memory used for the upgrade?


You can try running the Apple Diagnostics to see if any hardware issues are detected.


You can also try running Memtest86 to see if any issues show up with the memory. If the default settings don't reveal a problem, then change the Memtest86 CPU options to "Round Robin" and "Sequential" to see whether the tests have any problems when using either CPU option. I have been finding that these Memtest86 CPU settings tend to cause the memory test to freeze fairly quickly if there is a hardware issue...this is just as useful as an actual error result because it means you can remove memory modules to see if the issue is resolved.


Mar 22, 2023 9:31 AM in response to robingo

I would modify the Memtest86 CPU options as described since I haven't been getting many errors using the defaults, but have had the memory test freeze up regularly usually within a short period of time indicating a hardware issue of some sort (usually memory).


With the larger faster memory, the other timings are a bit slower than the factory ones. Crucial doesn't mention anything about issues mixing the original & upgraded modules, but you may want to remove the Apple modules to see what happens.

https://www.crucial.com/compatible-upgrade-for/apple/imac-(retina-5k--27-inch-3*4ghz-intel-core-i5--2017)-imac18-3


I would first run Memtest86 with the custom CPU options "Round Robin" and "Sequential" first just so you have a baseline on how things are working with the current configuration. Running the tests again after removing the Apple original modules to compare may give you some quick insight (or running the test with just the original Apple memory). This is what I would do in order to understand if I have a bad module or just a compatibility issue.


Mar 19, 2023 2:17 PM in response to robingo

Try booting into Safe Mode and see if it panics after wake from sleep.

If it still panics, it may be a hardware fault.

If it doesn't panic, it is likely one of the many kernel extensions you have installed.

I don't know how any of your kernel extensions would interact with Chrome, but if you can make some connection, that might help rule out some of them.

With a power surge, I would suspect some sort of hardware problem, most likely with an external device, but you seem to have rule those out. Do you have an additional monitor?

If you have a panic log, there is a section named "loaded kexts." If there are third-party kernel extensions listed there, they may be the cause.

Mar 22, 2023 7:45 AM in response to HWTech

Success! After reading in other threads that someone had to go through 4 USB sticks before finding one that worked, I pulled out an old USB 2.0 4GB stick and went through the process described in the Memtest86 docs using the terminal. (Another pilot error I committed: I originally downloaded the older V4 version as I misread their webpage and trying to make that work wasted a bunch of time.)


The USB 2.0 stick was certainly slow to set up but after it did I Option booted and saw my HD and two orange EFI drives (?). I choose the first and the screen went black. Figured it would take time to load off the slow drive I walked away, and when I came back Memtest86 was running with all its default settings! Got up this morning and it completed 4 passes with 100% success. Min RAM temp was 75C and max RAM temp was 130C so I think any possible thermal issue was ruled out (for now.) I did notice from the report that the original Apple 4GB sticks (SK Hynix) were 17-17-17-39 while the two Crucial 16GB sticks I added were 19-19-19-43. I don't think this should be a problem but the potential replacement sticks I ordered are CL17 so I may wind up swapping those and running Memtest86 again. (or not!)


Thanks to all! So far everything has been stable since the upgrade to Ventura. As I add more things back we'll see if I trigger problem again. Fingers crossed!

Mar 21, 2023 12:56 PM in response to robingo

It has been a while since I created my last bootable Memtest86 USB stick. You should be able to use Etcher to create the bootable USB assuming you are able to use the entire USB stick. Use the downloaded Memtest86 .img file as a source for Etcher.


I believe I have also manually created & transferred the contents of the mounted Memtest86 .img file to a drive with GUID partition and used both FAT32 and even HFS+ volumes (they will just show up as orange icons with the "EFI" label when created this way). Creating it this way may not work on all Macs as I seem to recall (or maybe it only affect my ability to put a boot label on the volume when Option Booting).

Mar 21, 2023 9:00 AM in response to Luis Sequeira1

Thanks to everyone (including Luis and HWTech) for the great advice. Here's what I did...


After booting into Safe Mode with no apps running I created a TM backup and also a bootable full disk copy using SuperDuper. I also took out each of the four memory modules, used some compressed air to blow any dust out of the sockets/vents, and then replaced the modules. I then ran Rembr overnight (I will still run Memtest86 but that requires a 512G USB flash drive and I didn't have a large enough one, so one is on order). I know that Rembr is not as comprehensive as Memtest86, but figured it might catch something and let it run over night. It completed 5 full passes of my 40Gb of RAM (2 Apple original 4G sticks and 2 Crucial 16G sticks).


[Edited by Moderator]

Mar 19, 2023 3:55 PM in response to Barney-15E

Thanks so much for the suggestions! It is a puzzlement. I also originally thought it might be a power supply related issue, but running the machine in Recovery mode for almost 48 hours (in order to run the Disk Utility on each of my drives including two TM drives) was crash free! I've tried to see if unloading various non-apple pieces that get loaded on each boot might help, but no success yet. At this point I've (semi) given up. I created a fresh TM backup and am also currently making an image of the entire disk using SuperDuper (which has been running for almost 5 hours straight without a panic... it's the only thing running). I'm then going to try and upgrade to Ventura on the theory that that will clean out some dross that's at the root of this (something old and incompatible that's sticking around.) If that works great and if not then I'll reformat the HD down to the studs, install a clean version of Ventura, and then freshly install only those apps I actually need/use, keep my old file available on the SD clone drive, cross my fingers, and maybe get a small UPS so I can power down in the next storm!

Mar 21, 2023 11:47 AM in response to HWTech

Hi... I'm going to beg your indulgence once again: I downloaded Memtest86 and created a bootable USB drive (little 32G Samsung stick). Looking at the drive it seems to be formatted as FAT32 and has 3 items at the root level, a PDF file, a src folder and a syslinux folder. My iMac is the 2017 5K Retina, so it doesn't have the T2 chip. So I shut my system down and then restarted and held down the Option key and while i see my main HD as a boot option, I don't see the Memtest86 drive. Tried a different USB stick, but no luck.


Any tricks I might try?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Constant Kernel Panics (after system goes to sleep?) since booting up from power failure

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.