Tutorial: Fixes for system-wide freezes when Web browsing [avoiding lookupd bug]

Tutorial: Fixes for system-wide freezes when Web browsing [avoiding lookupd bug]


Under Mac OS X 10.3.x and Mac OS X 10.4.x there exists an issue where some users experience a stall in Safari or other Web browsers when accessing certain Web sites that usually leads to a complete system freeze accompanied by the unending "spinning beach ball" progress indicator.

The typical chain of events is as follows:

  1. Web pages suddenly stop loading - sometimes halfway through a page
  2. Applications (apparently all of them) then refuse to launch, first bouncing in the dock for up to a minute and then simply having a stationary, inactive icon in the dock
  3. After that, the system becomes completely unresponsive; switching between open applications works, but finder functions are unavailable (the dock doesn't work, menus are inaccessible, force quit key command does not respond).
  4. Eventually, I am left with a spinning cursor and must shut down the machine using the power button.

We've attributed this issue to Apple's recently released Java Update 1.3.1 and 1.4.2 release 2, and it certainly seems that this release has caused an increase in prevalence of this issue. However, the root cause appears to be a long-standing bug in the Mac OS X lookupd process. As such, the problem is also appearing on systems that have not yet received this update.

It seems that the reason why this issue has increased in frequency since the Java update is an increase in, or change to the networking routines that are routed through lookupd. In other words, though there is a potential for this bug to manifest on systems without the update, the changes made by the update seem to make some systems more susceptible.

That being said, we've identified several fixes for this issue -- many published yesterday under the Java 1.3.1 and 1.4.2 release 2 heading. Since the cause of the problem may be varied, it's best to take a "shotgun"-type approach, trying one workaround after another then checking for persistence of the issue -- which unfortunately, in most cases, requires several minutes or hours of routine Web browsing until the crash re-occurs.


Interrupt your network (disconnect cables, turn off AirPort) The quick and dirty workaround for this issue involves power cycling your network adapter (router, Cable/DSL modem, etc.) or disconnecting an active Ethernet cable.

Doing so will temporarily free up lookupd from active network processes and allow normal system operation to resume. After doing this the first time this issue develops, move onto the following workarounds.

Restart lookupd The following Terminal command will cause lookupd to automatically restart, usually ceasing the unresponsive system state. However, this requires that the freeze has not progressed to the point where you can no longer access the Terminal. The command is as follows (note that the lookupd process has to be active for this command to work):

  • sudo kill -HUP `cat /var/run/lookupd.pid`

As noted by MacFixIt reader Brent Gulanowski:

"(After entering this command) lookupd will be restarted immediately (by launchd on Tiger), at which point it will re-read its configuration files etc. Also anything stalling on waiting for lookupd to return should then return immediately."

Killing the "crashdump" process Failing the above workaround, you may have success using the following process if you can still open the Terminal:

  1. Use ps -ax to get a list of currently running processes
  2. Look for the "crashdump" process and note its PID (process ID, the first number in its listing)
  3. Enter the command kill PID where PID is replaced by the process ID for crashdump.

Another Terminal workaround Another Terminal-based workaround, previously published on MacFixIt for a similar issue, has proven successful in this case. It involves setting a higher timeout for the lookupd process. Open the Terminal, and enter the following commands, pressing return after each one.

  1. sudo mkdir /etc/lookupd
  2. sudo sh -c "echo TimeToLive 300 > /etc/lookupd/hosts"
  3. sudo sh -c "echo ValidateCache NO >> /etc/lookupd/hosts"

After entering these commands, restart your Mac and power cycle any network adapters (Cable/DSL modems), AirPort base stations, other routers, etc.

Delete the lookupd cache Apparently, the lookupd process and associated files can become corrupt when applying incremental Mac OS X updates, or other modifications. The Terminal command:

  • lookupd -flushcache

flashes the lookupd installation and can resolve these issues in some cases.

Use unlockupd You may also want to try using the utility Unlockupd, which periodically checks lookupd's status and forces it to restart should it fail.

Turn off Java Some users have reported that simply turning off Java in Safari or your chosen browser resolves this issue, though this obviously does not represent a long-term fix.

In Safari this can be accomplished by opening the application's preferences, clicking the "Security" tab, then unchecking the "Enable Java" option.

Feedback? Late-breakers@macfixit.com.

Like what you've found in this tutorial? Get more troubleshooting guidance (updated daily) by subscribing to MacFixIt Pro.

  • Unlockupd
  • Late-breakers@macfixit.com
  • subscribing to MacFixIt Pr...
  • More from Tutorials
  • Close
    Autoplay: ON Autoplay: OFF