Safari 15 for Mac hangs / freezes on launch

Spread the love


Advertisement

The culprit was a large (over 3,600) number of links stored in Safari’s “Reading List” causing Safari to hit an open thread limit. The solution was to delete my entire reading list. Read on for details:

Advertisements

I could not reproduce the crash when launching Safari with my network connection disabled, suggesting that Safari was hanging on some kind of network request.

Looking at the crash report that I was prompted to send to Apple yielded the answer. I noticed two things in the crash report:

  • An error message saying “Dispatch Thread Hard Limit: 512 reached … too many dispatch threads blocked in synchronous operations”
  • Tons of open threads mentioning com.apple.network.boringssl.metrics_queue

Searching the web for com.apple.network.boringssl.metrics_queue turned up this bug report for NetNewsWire.

My guess: Apple’s doing some kind of metrics report on each feed download. But, if you have 1,000 feeds (or some large number), and Apple’s metric calls are slow to complete, then you could hit that 512 limit

Thinking about what mass group of URLs Safari might be fetching in the background, I thought about Reading List. Even wiping all my Safari data in ~/Library, which I had already tried, might not prevent this, because iCloud could just re-synchronize my Reading List as soon as it had a network connection. The solution was to clear the Reading List for all my devices.

Here’s how I cleared my Reading List while maintaining a backup of my stored links. Instructions are for Safari 15.2 on macOS 10.15.7:

  1. Quit Safari.
  2. Open Finder, then choose “Go -> Go to Folder…” from the menu bar
  3. Type in ~/Library/Safari and click “Go”.
  4. Copy these files to your desktop: ~/Library/Safari/AutomaticBookmarksBackup.html and Bookmarks.plist. These files contain human- and machine-friendly copies of your Safari bookmarks and Reading List links. Keep these files so that you still have a copy of your Reading List links after we delete them from Safari.
  5. Turn off wifi, or otherwise disable your Mac’s network connection.
  6. Launch Safari.
  7. Open Reading List.
  8. Switch to showing all items, both read and unread.
  9. Right click a Reading List item, then click “clear all”.
  10. Turn on wifi. This should cause Reading List to be deleted on all your devices signed into your iCloud account. (Provided they have enabled Safari synchronization in iCloud preferences.)

Note that the AutomaticBookmarksBackup.html file does not preserve the read/unread status of the reading list links, although maybe you could find that information in the .plist file. Or, if you don’t care about preserving already-read links, delete those first, then backup the AutomaticBookmarksBackup.html file, then delete the rest.

Author: Subham

Leave a Reply

Your email address will not be published. Required fields are marked *