8

EDIT: I solved this, so see below for my own answer. While the bounty asks for a fix to the problem, I'd like to award it to someone who can explain why a cron process that ran for 6 years over multiple MacOS versions suddenly became a problem in Catalina.

First note, this is not a duplicate of "cron" processes piling up because I don't have active crontabs on my computer. Cron processes spawn, but they never finish, so they just keep piling up. I'm running MacOS Catalina 10.15.1

Cron jobs are spawning every couple of minutes and never dying. The oldest cron process always has a parent process "launchd", and I've searched for populated crontabs and can't find any. If I let this go on long enough, eventually I run into a scenario where I have hundreds of running cron processes and everything on my computer grinds to a halt, and I can't even open new apps (I get cryptic messages like ".app cannot be opened" when I try to open an app). My only solution at this point has been to keep activity monitor open and periodically killing off all active cron processes.

I've been able to create a new user account that seems to be immune from this issue. However, as soon as I logged into my apple ID on that account to set up iCloud drive, the problem started with that account, too. I logged out of my Apple ID and attempted uninstall iCloud drive, but the problem persisted. Clean installs of Catalina don't clear up the problem, I've reset SMC and PRAM multiple times, and repairing permissions (via this https://support.apple.com/en-us/HT203538). I've also ensured that cron has full disk access (via this https://blog.bejarano.io/fixing-cron-jobs-in-mojave/). I'm at a dead end with trying to troubleshoot this problem.

I'm not sure it's related, but my "system.log" file seems to get spammed the following few lines:

<redacted> AMPDeviceDiscoveryAgent[2132]: Entered:_AMMuxedDeviceDisconnected, mux-device:63
<redacted> AMPDeviceDiscoveryAgent[2132]: Entered:__thr_AMMuxedDeviceDisconnected, mux-device:63
<redacted> AMPDeviceDiscoveryAgent[2132]: tid:9a27 - Mux ID not found in mapping dictionary

ANY help is appreciated.

2
  • Can you clarify whether you're talking about multiple instances of the cron daemon itself (/usr/sbin/cron), or multiple cron jobs launched by a single cron daemon? Commented Nov 1, 2019 at 22:04
  • This is solved, and it's unclear that I can determine this fully now. I believe the scenario resulted in multiple cron jobs launched by a single daemon, and the jobs just never quit.
    – alex keil
    Commented Nov 2, 2019 at 15:30

3 Answers 3

5

So I found a relevant answer here:

Cron job keeps running, not in any crontabs

I don't think this question should be removed because this seems to be relevant to Catalina, even though it seems to be user error.

Explanation:

The root crontab had been edited at some point, with cron jobs that I created 6 years ago on my computer (I may have done this before learning that was a bad idea). This crontab had two lines that each referenced a script that was supposed to run every minute. Neither one of these referenced existing locations on my drive, and for whatever reason cron wouldn't exit after attempting to run them.

This problem never manifested before upgrading to Catalina, but I don't know why that is - either cron was running every minute for the last 6 years and the Catalina update semi-broke cron, or something got copied to the root cron file. Probably the former problem, which would be a PIBCAK scenario combined with typical Catalina issues.

The solution was to edit the root-owned crontab to remove the two offending lines, and boom, the problem is gone!

I created a new user crontab for testing, and this leaves one persistent cron job (with parent = launchd), but the rest of the cron jobs that I run will exit predictably and not suck up resources. Cron itself doesn't seem to be broken, but root-run cron jobs may be problematic. (EDIT: I deleted the root crontab and now activity monitor doesn't show any cron processes running - I'm mystified as to why this happened with only certain user accounts, since none of this happened at the user level)

2
  • i love you!!!!! this has been crashing my mac for months now and you've saved me from throwing it out of the window!
    – Shiv
    Commented Jan 1, 2020 at 12:20
  • My root user does not have any crontabs, so not sure what is going on... All of my co-workers have the same issue. I do have 2 crontabs for my own user, but there are fine.
    – Wouter
    Commented Mar 28, 2020 at 8:56
0

This happened to me as well right after after upgrading to macOS Catalina. It took me a while to figure out why this was happening, and I am still not completely sure. I had three cronjobs in the root crontab that would wget some scripts. While they did exist, this still lead too an excessive amount of unterminated cron processes. I am now using LaunchDaemons along with curl to call the same HTTP urls, and this works without any issue. But, and that we have in common, those cron jobs did work on Mojave and all previous versions without driving my Macbook to the process limit.

0

On Catalina it created so much cron processes it did hit the limit. I deleted root crontab, but it did not solved the problem. Than I realised I had crontab under my normal user. So I deleted that one too (crontab -r) and it did solve the problem. Now I have only one cron process runing... Notice this problem started only after Catalina ugrade.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .