appstoreagent is repeatedly, frequently crashing my machine, day two

So 12.3 macOS was released Monday, I think it was, (I was using 12.2.1 through last night, Tuesday, 12.3 today) and as is usual, installd started to update apps yesterday. It always consumes a lot of RAM doing so but yesterday, it suddenly jumped to 6.64 GB before my machine hung up (I keep the Activity Monitor open at all times to watch for memory leaks like that).


Hard reboot.


And then, appstoreagent started crashing my machine (a 2017 iMac with 8 GB RAM, which I know is not the best now) the same way. I basically had little use of my Mac yesterday trying to figure why this was happening. But, long story short, I was able to update to 12.3 this morning (I could not even do that yesterday before the system crashed due to appstoreagent). I hoped that would fix things but appstoreagent is back, though the App Store indicates that there is nothing to update.


I just stepped away to answer the door a moment ago, and appstoreagent crashed my machine again when I wasn't looking - memory usage by it was about 5.56 GB when the system froze and then a kernel-panic-page reboot occurred while I was watching, trying to recover.


And this is where I am now.


I did a quick search and see that appstoreagent has been an issue for a long time. I see people having similar problems, but did not see these questions addressed specifically.


1.) How do I get appstoreagent to stop doing this?

2.) Also, how do I recover the about 25GB of hard drive space that the crashing of installd/appstoreagent (I assume) consumed? [My HDD had about 365GB free before installd started all of this, but now only has 340 after completing the 12.3 install.] I already did one restart.


WRT #1, I have been monitoring Activity Monitor and quitting appstoreagent from there as it arises (I did that again, just now). There is nothing for appstoreagent to update. Why does it keep restarting? I cannot leave the computer alone - as it did a moment when I answered the door, appstoreagent crashed the system again.


WRT #2, consuming HD space is normal during updates and usually the system recovers it afterwards. However, I am wondering if, in all of these crashes, the bookkeeping has lost track and now I have lost 25GB for good.

iMac 21.5″ 4K, macOS 12.3

Posted on Mar 16, 2022 1:33 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 3, 2022 11:49 AM

Well it is not quite 24 hours but close enough that I am going to declare victory.


I have have not seen one appearance of appstoreagent since deleting com.apple.appstoreagent folder in Caches yesterday afternoon - and I have purposely done things, besides time which alone should cause many occurrences, to cause appstoreagent to appear and fight the "good" fight. Nothing.


Memory use is stable now; much more HDD space was recovered - have no clue why. This iMac is sailing along now as it was before 12.3, although Safari is doing some strange things with 12.3.1. Anyway, good enough.


I have only run into these cache folders with Activity Monitor - and that was some time ago and a minor annoyance. These agents (and Apple uses a lot of agents) are not apps in the user sense but I will have to remember to try deleting the relevant cache folder in the future when things go south like this with non-user-controlled elements. Only 2.5 weeks of misery - I have no idea if Apple clears these cache folders when new builds come out but they should. If they do, it was probably the initial installd crash that left this folder untouched. But I bet they do nothing about these cache folders.

Similar questions

27 replies
Question marked as Top-ranking reply

Apr 3, 2022 11:49 AM in response to chuckefus

Well it is not quite 24 hours but close enough that I am going to declare victory.


I have have not seen one appearance of appstoreagent since deleting com.apple.appstoreagent folder in Caches yesterday afternoon - and I have purposely done things, besides time which alone should cause many occurrences, to cause appstoreagent to appear and fight the "good" fight. Nothing.


Memory use is stable now; much more HDD space was recovered - have no clue why. This iMac is sailing along now as it was before 12.3, although Safari is doing some strange things with 12.3.1. Anyway, good enough.


I have only run into these cache folders with Activity Monitor - and that was some time ago and a minor annoyance. These agents (and Apple uses a lot of agents) are not apps in the user sense but I will have to remember to try deleting the relevant cache folder in the future when things go south like this with non-user-controlled elements. Only 2.5 weeks of misery - I have no idea if Apple clears these cache folders when new builds come out but they should. If they do, it was probably the initial installd crash that left this folder untouched. But I bet they do nothing about these cache folders.

Apr 19, 2022 7:09 AM in response to chuckefus

*SOLVED* *SOLVED* *SOLVED*


Today was business as usual, crashing due to memory ramp on appstoreagent and living with Activity Monitor open in background


out of curiosity I doble-cliked appstoreagent process and saw the last file open on the last tab [Memory | Statistics | Open Files and Ports] and there it was, some random path to a file


I pasted the path on a terminal: "cd {command v}" erasing the last part being a file, {enter} on just the system folders path


On that folder route I found and deleted 3 files and rebooted, and that's it, never crashed again, it seems to be a corrupted update file downloaded in background that appstoreagent tried to install again and again leaking on memory


Hope it helps, sorry for the broken English, have a nice day!

Mar 17, 2022 3:46 PM in response to chuckefus

Give this a try: boot into Safe Mode according to How to use safe mode on your Mac and test to see if the problem persists. Reboot normally and test again.


NOTE: Safe Mode boot can take up to 3 - 5 minutes as it's doing the following; 

• Verifies your startup disk and attempts to repair directory issues, if needed

• Loads only required kernel extensions (prevents 3rd party kernel/extensions from loading)

• Prevents Startup Items and Login Items from opening automatically

• Disables user-installed fonts 

• Deletes font caches, kernel cache, and other system cache files


Mar 18, 2022 8:30 AM in response to DiegoMaza

I am watching appstoreagent come up on Activity Monitor for the fifth time in about an hour as I type. I am about to kill it from there again. It seems to slow down for a bit, then rapidly accumulate RAM; and with the delay in Activity Monitor display of data, it can hang pretty quickly from there.


I am hoping that at some point it sill stop, that it is trying to finish something that was started during the upgrade [Just killed appstoreagent.] but was interrupted by one of the many crashes. App Store does not indicate anything needs to be upgraded so I have no clue what it is looking for.


One thing that I did was to set the sleep time to the lowest value, 1 min. That way, if I walk away from the machine, the processor goes to sleep before appstoreagent can hang the system while I am away. But it can be close. On trying to log back once yesterday, it had hit 4.54 GB of RAM somehow. But so far, mostly working.


Just keep Activity Monitor open, watch, and quit it from there. That's all I can do for now.



Mar 17, 2022 10:46 AM in response to alma1090

Thanks, yes.


In a long winded sort of way, I thought I was clear but the main problem is appstoreagent (a related problem is loss of HDD available space during the crash of installd - some of that has recovered this morning - this may be what the repeated appearances of appstoreagent is trying to do but it is consuming RAM to the point that my desktop crashes if I do not stop it).


appstoreagent just popped up as I was typing this, rapidly consuming RAM. I just quit it again from Activity Monitor.


How do I get appstoreagent to stop doing this?


Or is this how the lost HDD space is recovered from the installd crash and I just have to wait for appstoreagent to complete this, while avoiding crashes due to RAM consumption?

Mar 20, 2022 12:52 PM in response to OldToad

Well, first of all, that is some good information about the "Magic Keyboard." I was not aware that the lightning port on the keyboard was used for anything other than charging, despite what the Bluetooth menu was telling me. I assumed that the keyboard was still using Bluetooth for communication. I have since seen a few postings indicating that one can use this keyboard in non-Bluetooth systems this way. Interesting.


This time (charging the keyboard), I appear to have gotten into Safe Mode; I had thought the "Safe Mode" indication was shown after boot up. But apparently it is only shown before login. After a very long wait for that login window, I only looked in the upper right after logging in. Oh well. However, it was definitely is a very, very strange set-up. [I obviously have never tried Safe Mode in all my years of Mac usage.]


And thankfully, appstoreagent was well-behaved in this mode. It bounced between 5.1MB and 5.4MB. Generally, by the time Activity Monitor spots it a normal boot-up, it's already in the hundreds of MB and asymptotically increasing from there. Due to display time lags in AM, if it gets to 1GB or 2GB, I have to quit it, the memory leakage can be occurring so rapidly at that point as to hang the machine or make it very difficult to kill appstoreagent. I watched appstoreagent for about 15 minutes in Safe Mode and it stayed within the bounds I mentioned. And so I restarted normally.


Sadly, appstoreagent came back as before, when I returned to a normal boot-up; it started at 50MB and then began its asymptotic increase to 1.3GB when I quit it. It was quite slow this time though, and I am not seeing it as I type. Compressed memory (which is what I usually watch as a danger signal) is very low right now.


And some HDD space did return. I suppose if I feel sporty later, I will let appstoreagent run its course and see if things hang again.


But I will probably have to wait for a new release to wipe the slate clean and continue to deal with this problem as I have been until then.


Thanks for this information though.

Mar 20, 2022 5:14 PM in response to OldToad

Typos typos - drive me nuts.

* ...it was definitely i[n] a very, very strange set-up.

*...by the time Activity Monitor spots it [in] a normal boot-up...




Anyway, thanks for that. I had read about that mode but never tried it. But as I think again, the 12.3 update did finish updating. I suppose another try at it can't hurt except for time. Now I am not sure if another try, even the next release, will fix this if there is some bug in appstoreagent that I have excited. I mentioned previously that the appstoreagent problem crashed my desktop during the first attempt to update. It appeared that the update process started from the beginning, with downloading it, when I tried again after a hard reboot.


When you say "reinstall," is that basically starting from scratch? That might be worthwhile. I will look into that. Maybe these OS updates do not "reinstall" but simply delete/add to what's there. These things take hours already - do you have any idea how long a "reinstall" might take? But I will try during my next slow point.



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.

appstoreagent is repeatedly, frequently crashing my machine, day two

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