Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Frequent system hangs and freezes in macOS Mojave 10.14: Notes, reproducible errors, and possible workarounds

Like (too) many others, I’ve discovered Mojave to be a source of exasperation, particularly because it seems to lock up periodically, sometimes for minutes at a time, with no identifiable cause.


I’ve been closely watching this behavior, with the result that I’ve been able to reliably reproduce a system hang, make some surmises regarding the cause — at least in my case — and come up with a few suggestions that might work around the problem. Some of these suggestions are for users. Some are suggestions for Apple.


System install on Mac Mini (late 2012), 1TB rotational + 128GB SSD fusion drive. ~120GB free space at time of install. 16 GB RAM.


Symptoms:


• Beachballing. All active apps lock up and beachball. This happens whether there’s a lot of RAM available (50%+), or very little (a few hundred MB).


• Switching to different open app windows works, but any open window remains nonresponsive until the system hang clears. (I do not run anything in fullscreen mode, so I have no idea if task switching in fullscreen works or not.)


• Windows are draggable and refresh as expected while being dragged, but none of their contents respond to user commands (scrollbars are nonresponsive, clicking selectable items results in no state change, etc.) until after the hang clears.


• Switching to another desktop rarely works. If it does, the system remains unresponsive on the new desktop until the hang clears.


• Switching to Mission Control does not work.


• Any new app will not launch until the hang is cleared.


• The tags which typically appear over hovered items in the Dock are slow to respond, or nonexistent.


• Clicking a stack in the Dock doesn’t result in the stack opening.


• Ctrl/right-clicking results in no popup menus, even where they’re expected.


• There is no indication in Activity Monitor of any background process that has run away with the processors, or swamped memory.


• Activity Monitor only reports the beachballed apps as “Not responding”. Force-quitting or getting system info on them is not possible; Activity Monitor’s capability to respond to user commands is just as hosed as everything else.


• User commands are queued, and acted on after the hang clears; so normal commands to switch desktops (as an example) execute in series after the hang is cleared.


• Copy operations on large files sometimes bogs, then freezes, and throws (-36) errors. This was, for me, a significant clue.


Attempted fixes/workarounds:


1. Rebuilding file/folder permissions in Home folder, and at the root volume level.

2. Booting to safe mode.

3. Flushing caches.

4. Resetting PRAM.


None of these had any corrective effect.


Beachballing still occurred in safe mode, but its frequency was noticeably reduced. There were no instances of mdworker running in Activity Monitor while in safe mode.


One thing that did help was disabling Spotlight indexing for the entire volume. This did not correct the system hangs, but it made them less frequent.


Reproducible error:


Large files, which existed on this volume prior to the install, ground to a halt when being copied from the internal HD to an external USB-connected hard drive, and to networked volumes. I have about 110 GB of ripped DVD files originally intended for my media server, which could be copied and purged to free up space. Mostly, these files copied without incident, but occasionally, the copy operation would slow to a crawl, then grind to a halt for anywhere from 15 seconds to a minute or more.


While that happened, all open apps began beachballing.


Eventually Finder would throw an error:


“The Finder can’t complete the operation because some data in ‘the name of the file being copied’ can’t be read or written. (Error code -36)” [OK]


Clicking OK cleared the error dialog, but it was usually upwards of half a minute before the beachballing stopped. Thereafter I could locate the file in Finder, select it, and trash it.


Initially, I just tried re-copying the file, but Finder consistently bogged, halted, and threw the (-36), at the same number of reported MB copied, each time. Clearly the files in question do, indeed, have problems, and something involved in file I/O cannot work past them.


Relevant observations:


• OSX defragments in the background.

• Spotlight goes read/write crazy on any new system install, entirely rebuilding its index.

• Most of the fusion drive is rotational media, and therefore slower, relative to SSD.

• Most of the fusion drive is occupied by data.


Surmise:


Some particularly large files might be nominally incomplete or mildly corrupted. This incompleteness or minor corruption might be unnoticeable to the user or to most apps, but some process in Finder (or APFS) may consider the corruption irreconcilable.


These files may have fragments scattered, in bits and pieces, all over the drive.


It is conceivable these files became corrupted during normal system defragmenting; when I first encountered these system hangs, I toggled the power on more than one occasion to force a reboot.


Non-user-facing processes such as Spotlight indexing or file defragmenting might be encountering these files, and discovering the same errors that surface during file-copy operations, with the result being that the system hangs without any user-visible or user-initiated cause.


These symptoms may manifest on SSD volumes, as well. SSD is much faster than rotational media, but all that would mean is the duration of system hangs would be reduced. They’d still happen.


If my surmise is correct and global system hangs are all down to failed file I/O, creating a new user account would not correct the problem, because the corrupted data would still be present on the drive, and OSX would still be attempting to index it, or defrag it, or both. The new user account wouldn’t see or own any of that data, but the machine would still be working on it in the background, as part of normal global system processes.


Possible user steps to ameliorate (untested as of now; I’m still stuck in [-36] purgatory while trying to copy and trash):


1. Increase free space on the volume to 20% or more.

2. Disable Spotlight indexing of large files (e.g., photos or movies).

3. Disable system sleep and let OSX churn through the data over the course of multiple days/nights.

4. Copy large, relatively unimportant files to an external volume, and remove them from the Mini. (Currently in progress; this was how I discovered the reproducible error.)


Suggestions for Apple:


1. Robustify error-handling in file I/O operations. Finder (or APFS) should not grind to a halt, and bog the entire rest of the machine, when data appears to be missing or damaged during file I/O.


2. Analyze Spotlight indexing relative to background defragmenting, and do not allow both processes to be running at the same time, particularly when there isn’t much free space on the drive. Prioritize defragmenting over Spotlight indexing.


3. Make mdworker and Spotlight a little smarter about disk usage. When a volume is at 90% capacity, Spotlight should not be as prominent a process, and should not be actively reading huge installments of data, then writing out extensive cache files. Free space is far more precious than file indexing, on a largely-full volume. Either have Spotlight limit itself to only a few processes at a time in this case, or provide users with a “slim” option that lets us search by filename, but not content. In fact:


4. Give users an option in Spotlight so it only builds an index of filenames, and does not analyze documents for metadata or any other searchable content at all. When I’m searching for a document, I’m searching by name. I don’t need or want to see a list of every text or Web file on my drive that contains every word in my search parameters. This might be useful in Mail, but it is not useful in Finder. Spotlight does not need to be an exhaustive grep tool with a GUI front end. If I want grep, I have Terminal.


5. Allow error queuing for user-initiated file-copy operations. I should not have to respond to a modal dialog, and re-initiate copy, when one document of 500 or so throws a (-36) error. I’d rather the system kept a running tally of what failed, continue the copying with the next file, and present me with a list of failed files at the end of the entire operation.

macOS Mojave (10.14)

Posted on Oct 6, 2018 10:51 AM

Reply

Similar questions

31 replies

Oct 8, 2018 1:26 PM in response to sepsus

Here's what I can suggest for now, sepsus. (This is based partly on the fact my Mini is now responsive enough for me to use it, most of the time; it's what I'm posting here from right now.)


1. Leave Spotlight off.


2. Log in to your Mac, disable all system sleep functions (Energy Saver, etc), and let it sit, powered up and idling, for a day or two. (Obviously, this won't be palatable if it's your only machine.)


3. See if it's become less laggy, or appears to be functioning normally.


If it is, try reactivating Spotlight system-wide. You may have to let it sit a while again afterward.


With a new system install, a lot of files are copied or overwritten. The new system will start housecleaning right away, and that includes moving pre-existing data from one location to another. This would normally, probably, only take a few hours on a rotational hard drive, a few minutes on an SSD.


But if Mojave is detecting any errors in any files, I think it goes through a couple of steps before giving up on them. I think it tries to repair apparent corruption first, and it might be looking all over the drive to find loose bits that seem to belong to it. While it's doing that, it forget about everything else.


So it's possible that letting the machine do its thing on its own will result in a cleaned-up filesystem and few to no subsequent hangs. It's just getting there that's the problem.


After that, once the computer is more or less happy again, reactivating Spotlight should work. There'll probably be more lagging as the index is rebuilt, but ideally it'll be building an index of cleaned-up and defragmented files, so shouldn't turn into a lethal cycle of system hangs.

Oct 9, 2018 3:31 AM in response to WarrenO

Hi, Warren, it seems like my system is a bit more powerful, but there are still some, or extremely slow react. There is a process that I see over and over again in the console - Unable to load Info.plist exceptions (eGPUOverrides) - sometimes with tccd, sometimes another process, if it tells you something, then I can watch it more closely, it tells me Nothing. I ask myself anyway, which responsible at apple the console revised so that one can not see after a reboot which process was responsible for a crash. Well, that's how it goes with the decline ;-) I've restarted spotlight and the indexing is running, but in the activity monitor I see dozens of mdworker processes, quite a few, and the progress bar is not moving yet. I have about 1.5 TB how long will that take well, the last attempts were completely unsuccessful, I had the feeling the process hangs. I ran all cronjobs manually because I forgot to turn off the sleep state, let's see what happens now. I stay on the ball and give feedback.

Oct 9, 2018 7:03 AM in response to sepsus

One of the things I did here, as part of installing a system profile for Apple to capture diagnostics, was reboot. I ended up in the same beachball purgatory for about 7 hours before the machine was responsive enough to be functional. (I was sleeping during 5 of those 7 hours, so I don't know when its state changed.)


I'm not seeing that plist error myself.


A lot of mdworker instances running will be normal, for initial indexing (or re-indexing) of your drive, I think.

Oct 10, 2018 12:31 AM in response to WarrenO

Hi Warren, Spotlight was running through, success!

Did not before, it freezes after 25%, now over one day and night it works.

And the machine freezes are still not that often anymore, the ways to get fixed behind the scenes was successfull, thank you very much.

I will start the TM backup today and give feedback how its goes.

Buyed a new one for that, because i will save my old ones waiting for 14.1, hope it works then.

Will give feedback then.

What i see is, the machine freezes alway in the file browser, ( save dialog, choose dialog, etc.), then all prozesses stopped and i have to wait, then in one second all come to work back and i can do what in wanna do,

Even if i start another choice via filebrowser it works normal only the first one.

Oct 11, 2018 3:36 PM in response to sepsus

Hey, that's fantastic! And you even got your Spotlight index back! Right on.


I wish I could report the same, but alas. I needed to do a couple of hard resets after the entire Mac locked up (Finder, all open apps, everything) for half an hour or more. It failed its shutdown sanity check, which suggested the HD partitions were no longer stable. Booting in recovery mode got me nowhere; it never loaded. The Mac went over to internet recovery, but never got past 5% downloaded.


Fortunately I had the bootable thumb drive from the other day.


Disk Utility told me there was nothing wrong with the disk, but installing Mojave wasn't possible, because it was still decrypting. The Terminal diskutil commands showed me the same — decrypting, 10%, paused. No way to resume it, no way to cancel it.


So for the last three days, I've been copying user files from internal to external HD in a Terminal session. It's been running for all three days, steadily (I had to use the command caffeinate to keep the system from sleeping or timing out), and judging by the progress I see from time to time, maybe 10% of my files are corrupted to the extent they throw I/O errors. They were not before this install; they must've become damaged during one of the many freeze-and-reboot cycles.


Also, there is no way it should take three days (and counting) to copy a few hundred GB of user files. So several things have clearly gone wrong here.


Once the copying is done and I've verified what's left of the data, I'll be using Mojave's Terminal diskutil resetFusion command to restore the fusion drive to its factory state, then verify the volume, then format and install from the ground up, and finally copy all my files back over to it again.


In eighteen years of OSX, I have never had to do this before. I have data on that drive that I first wrote to it in 2002, handed down from Mac to Mac by migration assistant.


Dang, you know?

Oct 18, 2018 10:51 AM in response to WarrenO

Impressive recapitulation of things! Well done.

I really hope this somehow gets to Apple!

I had the exact same behaviour with my Mac Pro. I have 4 drives in there: 1 boot SSD, 2 1TB Hard Drives in RAID mirror for my data and 1 1TB HD with Bootcamp. I also have Time Machine set up to backup the SSD and the RAID volumes.


I dragged all of the drives to Spotlight’s privacy section to cut off indexing. Turned off Time Machine and the whole nightmare stopped.


I erased my Time Capsule drive and started Time Machine again. Waited for it to finish the first backup (it was like 2 days).

Still no hangs.


I then one-by-one dragged the drives out of privacy to allow indexing.

I waited for one to finish before allowing the next.


Everything seems fine now. Spotlight is fine, Time Machine is fine and haven’t had a single hang or slowdown for a week now.


Hope this helps!


Cheers,


Andreaux

Oct 19, 2018 10:04 AM in response to WarrenO

Thank you WarrenO, we'll try running without Spotlight and see if that helps, but I'm thinking that's not it, or at least is only part of the problem. This macOS freezing has been particularly annoying to my boss, a CPA, who is using things like Acrobat and MS Office all day long. The crash manifests itself in various ways.


One example, after working on a document, SaveAs fails to bring up a dialog box. We get the beachball, wait a few minutes (I never timed it), then Word pops-up a short dialog briefly (presumably telling us that something went wrong, but we can't read it before it closes itself), and the beachball returns to a normal cursor. Attempts to launch Console result in the console icon bouncing in the dock, but no display. Same problem with Terminal. Then, after closing all open applications, shutdown gets to a dark screen with nothing but a cursor, then sits there. Power button reset is required.


In my own example, on my iMac, I was using Screen Sharing to check on Time Machine backups on all of our Macs. I hit GO to connect, and nothing happened. I then couldn't launch anything in my dock, (bouncing icon, no display), and doing a shut down resulted in the same symptoms as above. First conclusion: Not Microsoft Office for Mac. (Thank god for that at least.) I told my boss to a) shut down every night, and b) restart before going to lunch every day. Since then, my boss has suffered NO hangs! My first thought? Memory Leak. I spent what feels like half of my career finding them in other people's code.


So I shut down Spotlight search on my iMac, and I ran Activity Monitor for ~3 days, with Console open and a Terminal window running top. (Second desktop). Occasionally, I'd use a WEB browser (Firefox) to check on the news and weather, glance at my (Mac) mail, but other that that, the computer was just sitting there idle (and presumably sleeping when I wasn't using it). This morning, I came into my office to shut down SpotLight on my boss's computer. After doing so, I launched System Preferences to double check my own Spotlight settings and System Preferences failed to launch, bouncing up and down in the dock. Switching quickly to my second Desktop display, I looked for processes that had grown significantly since I started this test.


The only process that seemed to be growing at all was WindowServer, and it grew from approximately 110 MB to 480 MB. That doesn't sound excessive to me, and for all I know, that's normal. I didn't see anything that looked relevant in the Console display (but there is so much there, I doubt that anyone but an engineer at Apple could tell). Top was the only thing running in the terminal window, everything else was sleeping, nothing in stuck State. I closed all Applications, force quit System Preferences, then shut down, where it hung with a black screen and a cursor again, requiring power-button reset.


When we ran Windows, I had a policy of waiting a few months before upgrading to the latest release. Company policy was to shut down every computer, every night. Looks like I'm going to have to re-adopt those policies.


In case anyone is interested, I'm running 27-inch iMac, Retina 5K (2017), 8GB, 4.2 GHz i7, 512 GB SSD, File Vault enabled, Time Machine running to a NAS storage device, and Avast Free. My boss is also running 27-inch iMac (2017), about 6 months older than mine, but with 1TB fusion drive.

Oct 19, 2018 10:33 AM in response to Gabriel (Andreaux)

Gabriel (Andreaux) — thanks. I know Apple does browse these fora, at least, so I'm sure they're aware both of problems, and of various solutions, and of what didn't work out at all. I filed a bug with Apple Developer, too, on the file-copy hangs, but since then have learned a few more things about my specific issue. I'll post the full details in my next reply here, to avoid duplication, since some of it may be relevant to NotUncleAl, as well.


There do seem to be some issues with Spotlight going wild in this release. It's happened before. You jump into Activity Monitor after a full OS upgrade, and see two dozen or more instances of mdworker chugging away. Spotlight could do with some minor addressing there, maybe limiting itself to ten or a dozen spawns, to prevent exactly this thing from happening.


I'd also like to see it assess the machine architecture with a bit of intelligence, maybe launching fewer instances of mdworker when the drive is rotational or fusion, maybe more instances when it's SSD. All those mdworker instances are trying to read data, and that takes longer on rotational (or fusion, which is at least half rotational) than it does on SSD, due to simple mechanical limitations.

Oct 24, 2018 9:19 AM in response to WarrenO

OKAY. And now I cannot re-create the failure I experienced on my iMac, after leaving it running 5 days. What's different? Setup is simple. In a second desktop, Activity Monitor running, sorting on Memory, top running in a terminal window, Console running. Spotlight completely disabled. Anything else? I've been using my iMac more. (Open Office, Firefox, Mac mail, Screen Sharing to user's iMacs). I'm monitoring only the syslog.log instead of the entire Device. Around 3 days in, I re-enabled Spotlight for Mail & Messages only (a feature I need). I'm wondering if I forgot to reboot after disabling Spotlight last week...


For my boss, I had turned Spotlight off by unchecking everything, adding her boot disk into the Privacy locations. I've since reenabled Spotlight for Documents, Folders, Mail & Messages, PDF Documents, and Spreadsheets. Last Friday, she came in late (9am) and figured she didn't need to reboot before lunch. About 3pm, she experienced the missing dialog box problem again, (indicating the beginning of a hung system). This time, we were able to quit, (or force quit) everything, and restart was successful (w/o using the power-button). Huh?


Boss is out of town this week, so I'm going to leave her Mac running, and prevent it from sleeping. If the problem is Spotlight related, maybe it will have resolved itself before she gets back. If not, I guess rebooting twice a day is the work around. Meantime, nobody else will be allowed to install Mojave. (And I'm getting too old for this...)

Oct 25, 2018 8:24 AM in response to NotUncleAl

The recurrent hangs could be a conflict with an outdated program or extension, I suppose … though I'm not sure how you'd go about isolating it in a nondestructive way.


One way to force a reboot from software is to get into a Terminal window (might not be a bad idea to keep Terminal running until it's all sorted out) and enter this command:


sudo shutdown -r now


You'll be prompted to enter the password for that machine, after which it should terminate everything and restart immediately. I've seen that command work wonders for a stuck system, when the GUI reboot tools fail.

Nov 27, 2018 5:40 PM in response to WarrenO

i have been using the disable spotlight since early oct (when we all met on the other thread where you posted your link....😉 ) anyway been using that fix and its been a 100% solution for the freezing but a bit of a drag not to be able to search my stuff --- so after i did the update to 10.14.1 i tried dragging my hard drive back out but only selecting a few places to allow spotlight to search per a suggestion on that thread -----but for me even with only the few files selected -it caused immediate loooooooooooooong (hrs) freezing again so i went back to totally disabling spotlight and back to ok for freezing .... drag for being limited.
so i dropped in here to see if there was news and saw your update -- i tend to run disc utility fairly often and always look fine on it so i went ahead and ran it again and also just used that smartreporter too per your suggestion and i am totally healthy..... sooooooo now what? arrrrrgh! thoughts?

Nov 28, 2018 12:00 AM in response to WarrenO

After being mostly without beach balls for about a month now, as long as I did not reboot, they returned with a vengeance. It's hard to type now, because the system stalls mid-sentence frequently.


It's been okay (almost fine, even) for a month! With Spotlight enabled! And now suddenly it's back?!?


Almost as if this is related to the phase of the moon... Is my Mini undead?

Nov 30, 2018 2:46 PM in response to Dalroi123

I hear you Dalroi123. If Apple knows what is happening, they're sure not saying anything.


Some days I'll run activity monitor and there are probably 30 mdworker processes. Just now, I see only 7. I can go about 11 or 12 days before I suffer a failure now, so I'm shutting down on weekends and beginning with a fresh boot Monday mornings, and just letting my iMac Power Nap overnight during the week. Oh, and my iMac is brand new, purchased 7/17/2018, with SSD drive. I don't believe it is disk related either, at least not in our case.


The only category I have enabled for Spotlight search results, is Mail and Messages. However, I suspect that the operative word in in the Spotlight/Privacy dialog within System Preferences is the term results. So, is Spotlight Search still indexing everything on my hard drive, even though I'm only allowing results from Mail & Messages? I should also add that I moved 28 years of old documents and source code to an external USB disk. So, has that been a factor with Spotlight Search?


At this point, I don't think the problem is Spotlight search. I believe the failure is a function of the number of windows and/or dialog boxes you bring up, in between reboots.


Our new company policy is: No new Apple hardware for at least 6 months, no major macOS or iOS upgrades for at least 6 months, and no automatic updates. (Same policy we had in the old days, when we were using Windows.) And at home, I'm also having problems with a brand new model of a MacBook Air, and a brand new Apple TV 4K 64GB.


I copied and pasted something below that I posted in a different thread. It goes into a little more detail about what's happening to us with 10.14.1. Bottom line: Apple still has work to do.


<snip>

Mojave 10.14.1 has apparently resolved the crash problems we were having with Mojave. I've now been up for 11 days 5 hours, and have not experienced the failure we were seeing with 10.14, after a mere 3 days worth of use. I've given others permission to upgrade to Mojave.


My boss did suffer one crash, with symptoms similar to what I tried to describe in my original post. She was opening and reviewing a lot of files that day. (again indicating that failure might be related to the number of windows and dialog boxes you bring up). She was also importing an audio book into iTunes when the failure occurred, but mostly she had been using MS Word and Adobe Acrobat Pro DC to examine documents, and forgotten to reboot before going to lunch. I don't know what that failure is, but will continue to investigate, and for now, Apple is off the hook for my crashes at least, with the release of 10.14.1. Thank you, Apple. [Wrong! What the heck was I thinking here?]


Until further notice, however, the boss has been instructed to continue to shutdown completely every evening, and reboot before going to lunch. [Just like when we were using Windows.]

</snip>

Frequent system hangs and freezes in macOS Mojave 10.14: Notes, reproducible errors, and possible workarounds

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