Since Mavericks, the goes haywire approximately once a day on my machine (an early 2013 15in Retina MBP), getting stuck in some sort of while (1) loop.

This causes the laptop to heat up and become sluggish. Icons in Finder don't refresh/load anymore, and the OS gradually becomes unusable. At the same time, this process writes megabytes worth of repeated log messages about failures trying to generate icon cache files, like the following:

5/20/14 10:32:28.002 AM[232]: Failed to write file /var/folders/94/rfzxfhbn3hjb4p402lg_yjgw0000gn/T/ to cache.
    1   IconServices                        0x00007fff8efd1b85 ___ZN18IconImageGenerator4mainEv_block_invoke7 + 634
    2   libdispatch.dylib                   0x00007fff88f7e28d _dispatch_client_callout + 8
    3   libdispatch.dylib                   0x00007fff88f84a18 _dispatch_barrier_sync_f_slow + 460
    4   IconServices                        0x00007fff8efd15ba _ZN18IconImageGenerator4mainEv + 734
    5   IconServices                        0x00007fff8efd2ea8 _ZN11WorkManager11processWorkEP4Work + 112
    6   IconServices                        0x00007fff8efd2e1f ___ZN11WorkManager11enqueueWorkEP4WorkU13block_pointerFvS1_E_block_invoke_5 + 26
    7   libdispatch.dylib                   0x00007fff88f811bb _dispatch_call_block_and_release + 12
    8   libdispatch.dylib                   0x00007fff88f7e28d _dispatch_client_callout + 8
    9   libdispatch.dylib                   0x00007fff88f827e3 _dispatch_async_redirect_invoke + 154
    10  libdispatch.dylib                   0x00007fff88f7e28d _dispatch_client_callout + 8
    11  libdispatch.dylib                   0x00007fff88f80082 _dispatch_root_queue_drain + 326
    12  libdispatch.dylib                   0x00007fff88f81177 _dispatch_worker_thread2 + 40
    13  libsystem_pthread.dylib             0x00007fff8480def8 _pthread_wqthread + 314
    14  libsystem_pthread.dylib             0x00007fff84810fb9 start_wqthread + 13

Kieran Healy describes this issue on his blog [1] and proposes a solution, which reliably works for me (with slight adaptations). Running the the following commands allows the IconServicesAgent to recover:

mkdir -p ${TMPDIR}/
chown -R `whoami` ${TMPDIR}/

However, the problem remains a great annoyance because these commands only solve the symptoms in that precise moment; the issue persists and will reoccur some time later. I am looking for a solution that is smarter than having to wait for my laptop to get very hot and sluggish, and then issuing those commands.

I tried to write a cron job that runs these commands every minute but did not have much success because the ${TMPDIR} environment variable was not available to scripts run by cron. Ultimately, it would be great if there was a way to find out what is messing up this directory, causing the issue in the first place. Many people seem to be having this issue, and there is no compelling answer or solution yet.


  • do you have any self made Icons ? – Buscar웃 May 20 '14 at 9:14
  • just for comparison reasons I have a /private/var/folders/95/8zc8kgvx1yj8ls3v9m3vbg100000gr on 10.9.3 thus no 94 and no strange folder name like you – Buscar웃 May 20 '14 at 9:21
  • no, I don't use self made icons – Wenzel Jakob May 20 '14 at 10:27
  • well then someone (a app) has made Icons than make the problems. Try to see if that happens associated with a app you have open. sorry i know this is long painful way of finding out but I do not know another way. – Buscar웃 May 20 '14 at 11:01
  • I doubt that the issue is related to custom icons. Rather, my suspicion is that some application or script is causing that temporary directory to be deleted. But how to find the culprit (and do something about it)? – Wenzel Jakob May 20 '14 at 15:00

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.