How to Deal With Frequent Kernal Panics: 2017 iMac Retina 4K 21.5 Inch

My 2017 iMac running Monterey started having frequent kernel panics just before I installed Mac OS 12.4, about two weeks ago. They continued after installing 12.4. Sometimes there are several in a day in rapid succession (four in the space of 30 minutes) and some days there are none at all.


The iMac is factory clean: No third party RAM or SSD.


What I have done so far:


  • Disconnected an external display and adapter
  • Disconnected a USB hub
  • Did not disconnect three external hard drives
  • Did not disconnect a Logitech USB Keyboard
  • Booted in safe mode and ran DU on the boot drive - no problems reported
  • Booted in safe mode and reinstalled Monterey
  • Booted in Diagnostic Mode - no problems reported
  • Ran EtreCheck numerous times


Most recent EtreCheck report.



The boot args issue noted in the report was as a result of a suggestion in this post:


https://apple.stackexchange.com/questions/441239/macbook-pro-16-inch-2019-restarts-after-sleep-or-locking-the-screen/441383#441383


BTW, the suggestion did not work and did not result in kernel panic reports that are symbolicated.


The 3rd party extensions mentioned in the report are all kexts that have been around a while. They showed up in the EtreCheck reports only yesterday. If anyone has knowledge on whether or not it is safe to remove them, please let me know.


Finally, if this is a hardware problem, is it worth getting an old iMac like this repaired or should I just get a new one? I was planning on replacing it this Fall anyway.


Note that I live in rural Thailand, so no Genius Bar. There is an Apple contracted repair center.



iMac 21.5″ 4K, macOS 12.4

Posted on May 31, 2022 3:16 PM

Reply
Question marked as Top-ranking reply

Posted on Jun 17, 2022 9:27 PM

Well, it wasn't because of the Samsung SSD connected to the USB-C/Thunderbolt port. After I switched to a USB-A port I had another kernel panic.


However, an although I can't be certain, I may have figured out the cause of the kernel panics on my 2017 iMac running Monterey.


After I'd spent nearly a month trying different things and had mostly given up, I recalled that LaunchBar had been behaving oddly. For example, almost every time the machine booted up, LauncBar complained that it was unable to process the Applications indexing rule. I figured that this was a bogus error message as I was able to launch applications with LaunchBar as usual. Then I recalled that if I manually rebooted the machine, it always took a very long time for LaunchBar to quit. It was always the last app to quit.


So, I had a look at LaunchBar's Index. It turns out that there were two indexing rules called "Applications"; one in the General section and one in the Files & Folders section. I had a look at the unusual one and saw that it contained a real mishmash of locations and "Search for". None of it seemed like anything I would set up, so I deleted the rule.


Since doing so I have had not one single kernel panic. It's been nine days. I have written to Objective Development about the issue, but have yet to hear back.


I won't feel comfortable until a few weeks have passed, but this may be it.


Similar questions

27 replies

Jun 2, 2022 4:52 AM in response to hcsitas

There is no reason there should be heavy IO on this computer. Almost nothing I do involves a lot of IO. I mostly just use it for email, web browsing, Messages, some document processing (LibreOffice), photo editing now and then. I dabble with shell scripts, but none of them do much IO.



I should add here that I booted into Safe Mode and a kernel panic ensued a few minutes later when I was trying to do this post in Safari. I've switched to Firefox for the time being.

Jun 2, 2022 2:42 PM in response to hcsitas

I'd never seen Google Drive like that before. When I took that screenshot I had booted into Safe Mode; something I'd never done before, so I didn't know what to expect. What I really didn't expect was what a slug the machine was in Safe Mode. It was barely useable. Instead of moving across the screen smoothly, the pointer moved in fits and starts. In text fields the insertion point simply disappeared now and then. I tried to use the machine that way, but was actually grateful when a kernel panic rebooted the machine in regular mode and the machine returned running normally. So weird. Is Safe Mode always like that?


BTW, I stopped Google Drive from starting up. That didn't stop the kernel panics. So, it's not Google Drive.


I'm unwilling to delete the Safari history as that will also delete all cookies and history across all devices. That's a bit much.

Jun 2, 2022 7:19 PM in response to Allan Jones

Allan Jones wrote:

Before resorting to reinstalling the OS, get rid of the malware which is likely adware. Some may indicate that you overrode system warnings to install them.


You've made the assertion that my machine has "malware", but you haven't provided any examples. As you know, EtreCheck never uses the term "malware", so I'm not sure where you're getting your information. I'd like to act on what you're saying, but I can't do that without more detail.

Jun 2, 2022 10:04 PM in response to padams35

As for DropBox and Google Drive:


DropBox doesn't sync anything. All it does is upload photos from my iPhone to the iMac.

All Google Drive does is sync photos. It doesn't sync any data directories at all.


As for the shell scripts:


Almost all of the shell scripts I edit on the iMac actually run on Raspberry Pies; some local and some remote. I only have a few shell scripts that run on the iMac:


  • There's one that checks the UPS battery and voltage status once a day.
  • There's one that turns the iMac volume down to 1 at 4:00 AM so I won't be blasted by a loud machine early in the morning.
  • There's another that removes old screenshots and scans. It runs once a month.
  • There's another that runs when the iMac boots up. This was originally for those situations when the UPS battery died, the Mac shutdown and booted when power was restored. Unintentionally, it has also proved to be useful during this time of kernel panics. I always know when there's been a kernel panic, even when I'm not home.
  • There's another that checks Internet bandwidth once an hour and sends me a Prowl notice and email if the bandwidth is lower than I'm paying for.
  • There's another that runs a few times an hour in order to update my dynamic DNS service. (Their in-house client sucks.)
  • There's another script that runs on demand which controls an old Canon Line 30 scanner which hangs off of a nearby Pi.
  • And, finally, there's one resource intensive script that runs once a day. It downloads a couple of videos from my web host, adds a sound track and a fade in/fade out and then uploads the new videos to YouTube. The videos are only 45 seconds long, so the whole process is very fast. (The iMac has never had a kernel panic when this script is running.)


So, aside from the video script, there's really nothing that is resource intensive. Very little IO. Very little CPU time.


As for reinstalling or running from an external boot drive:


I may do one or both of these if I can't otherwise figure out what's going on. At the moment I'm running without the two external spinning drives that are USB-A. I haven't had a panic since I removed them, but it's only been four hours. It's not unusual for the iMac to go several days without a panic and then have three or four in 40 minutes.

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.

How to Deal With Frequent Kernal Panics: 2017 iMac Retina 4K 21.5 Inch

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