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

Directoryservices 190% CPU

Hello, hello,

I just installed Leopard, but now every now and then the CPU use goes up to 190% with a process called DirectoryServices. Forgive my ignorance but what's going on? Applications don't work after a few seconds and all I am left to do is force shut down the computer and re-start. Any help is greatly appreciated!
Gabriel

MacBook Pro 2.0 1.5GB RAM., Mac OS X (10.5)

Posted on Nov 1, 2007 4:55 AM

Reply
109 replies

Jan 19, 2008 1:05 PM in response to Gabriel Chavez-Tafur

Although it's hard to have conclusive evidence with an intermittent bug, I can report that I have not seen this problem at all since I changed the networking setup of my Mac Mini. My previous setup was using an airport network with weak reception which would occasionally drop out. My current setup is using wired ethernet to an iBook which then connects to the same wireless network. What is interesting about this is that it's quite possible that the iBook might have lost its connection some time during that time - so the actual contactability of the rest of the world may not be the issue - but the ethernet cable has always been plugged in, so as far as the Mac Mini is concerned, the network connection has always been "there".

Therefore, one of the following three changes appears to have been the solution for me. They may seem to be the same thing, but I'd say there are subtle differences:
1) change from Airport to wired ethernet
2) change from a network connection which occasionally dropped out to one which never does
3) always being able to contact the Internet (this seems least likely)

Jan 19, 2008 1:13 PM in response to Robin Darroch

This problem happens to me, on my MacBook Pro even when connected over wired ethernet. It seems random, but most of the time when I do see the problem is when an application is started and starts looking up an internet address or trying to resolve the uid to an actual username. DirectoryServices seems to handle almost all aspects of name resolution, this is a case where too much functionality was put into one program.

Jan 23, 2008 12:39 PM in response to Robin Darroch

Hi all,

Another call to Apple. Suggestion that this is definitely a problem with some programme trying to access the net but failing, so on advice I've closed most of my widgets - this is what I had open:

- Apple Weather
- BBC Weather
- iCal Events
- MyTube
- iStat Pro
- iStat Nano
- BBC Radio Player
- Amazon Album Artwork
- Wikipedia
I'm keeping iStats and iCal Events open for now, can always kill them later it if persists. I have a hunch that it might be one of my menubar items though - I've got iScrobbler and Gmail Notifier running from startup. If the problem vanishes I can slowly reintroduce stuff I want back until it falls over.

Does any of this tie in with fellow sufferers?

Message was edited by: David Jarman

Jan 23, 2008 2:49 PM in response to David Jarman

Dashboard is completely disabled on my system, and I only have iStat running in the background.

The problem for me appears randomly in that it happens even when I am just using the machine, and I am connected to IRC. Everything appears normal until I hear my fans rev up, at which point if I open up Activity Monitor just in time I might get lucky and be able to force quit DirectoryServices. Otherwise, hard reboot it is.

iStat is not set to check for updates, and only shows fan speed and CPU speed.

Jan 30, 2008 8:06 PM in response to Gabriel Chavez-Tafur

I just purchased a MacBook for my wife and soon after she applied the 10.5.1 update, things started to act really strange. The system is really sluggish and periodically will freeze not letting type anything at all. I reviewed the crash logs and DirectoryService is creating havoc on the system. I'm getting all kinds of crazy entries from the DirectoryService in the system.log as well:

Jan 27 16:43:42 cynthia's-macbook DirectoryService[32]: DirectoryService(32,0xb039e000) malloc: * error for object 0x235e20: incorrect checksum for freed object - object was probably modified after being freed.\n * set a breakpoint in malloc errorbreak to debug
Jan 27 16:43:42 cynthia's-macbook DirectoryService[32]: DirectoryService(32,0xb039e000) malloc: * error for object 0x235fd0: incorrect checksum for freed object - object was probably modified after being freed.\n * set a breakpoint in malloc errorbreak to debug
Jan 27 16:43:42 cynthia's-macbook com.apple.DirectoryServices[32]: DirectoryService(32,0xb039e000) malloc: * error for object 0x235e20: incorrect checksum for freed object - object was probably modified after being freed.

Here is one of the DirectoryService crash logs:

Process: DirectoryService [32]
Path: /usr/sbin/DirectoryService
Identifier: DirectoryService
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: launchd [1]

Date/Time: 2008-01-27 16:59:11.553 -0500
OS Version: Mac OS X 10.5.1 (9B18)
Report Version: 6

Exception Type: EXC BADACCESS (SIGBUS)
Exception Codes: KERN PROTECTIONFAILURE at 0x0000000000000010
Crashed Thread: 2

Thread 0:
0 libSystem.B.dylib 0x920198e6 mach msgtrap + 10
1 libSystem.B.dylib 0x920210dc mach_msg + 72
2 com.apple.CoreFoundation 0x915030fe CFRunLoopRunSpecific + 1806
3 com.apple.CoreFoundation 0x91503d94 CFRunLoopRun + 84
4 DirectoryService 0x00016a8b main + 2583
5 DirectoryService 0x00016056 start + 54

Thread 1:
0 libSystem.B.dylib 0x920198e6 mach msgtrap + 10
1 libSystem.B.dylib 0x920210dc mach_msg + 72
2 com.apple.CoreFoundation 0x915030fe CFRunLoopRunSpecific + 1806
3 com.apple.CoreFoundation 0x91503d94 CFRunLoopRun + 84
4 DirectoryService 0x00022b3e CPluginRunLoopThread::ThreadMain() + 222
5 ...ectoryServiceCore.Framework 0x0015f349 DSCThread::Run() + 39
6 ...ectoryServiceCore.Framework 0x0015f554 DSLThread::_RunWrapper(void*) + 84
7 libSystem.B.dylib 0x9204a075 pthreadstart + 321
8 libSystem.B.dylib 0x92049f32 thread_start + 34

Thread 2 Crashed:
0 libSystem.B.dylib 0x920202b8 szone_free + 2110
1 libSystem.B.dylib 0x9201f9ed free + 106
2 libsqlite3.0.dylib 0x9283f17e sqlite3 resultblob + 190
3 libsqlite3.0.dylib 0x9283f376 sqlite3 resultblob + 694
4 libsqlite3.0.dylib 0x9284a77a sqlite3_finalize + 90
5 DirectoryService 0x000729c3 CDSLocalPluginNode::GetFileAccessIndex(__CFString const*, tDirPatternMatch, __CFString const*, __CFString const*, bool*) + 1215
6 DirectoryService 0x0007588b CDSLocalPluginNode::GetRecords(__CFString const*, __CFArray const*, __CFString const*, tDirPatternMatch, bool, unsigned long, __CFArray*, bool, __CFString const**) + 1387
7 DirectoryService 0x0006c282 CDSLocalPlugin::DoAttributeValueSearchWithData(sDoAttrValueSearchWithData*) + 1082
8 DirectoryService 0x0006d7c1 CDSLocalPlugin::ProcessRequest(void*) + 367
9 DirectoryService 0x00002635 CRequestHandler::HandlePluginCall(sComData**) + 775
10 DirectoryService 0x000033f0 CRequestHandler::HandleRequest(sComData**) + 82
11 DirectoryService 0x0000b039 CMessaging::SendInlineMessage(unsigned long) + 211
12 DirectoryService 0x0000a9b4 dsDoAttributeValueSearchWithData + 1080
13 DirectoryService 0x0000c5c4 CSearchPlugin::AttributeValueSearch(sDoAttrValueSearchWithData*) + 990
14 DirectoryService 0x00011b3b CSearchPlugin::HandleRequest(void*) + 223
15 DirectoryService 0x0000df26 CSearchPlugin::ProcessRequest(void*) + 372
16 DirectoryService 0x00002635 CRequestHandler::HandlePluginCall(sComData**) + 775
17 DirectoryService 0x000033f0 CRequestHandler::HandleRequest(sComData**) + 82
18 DirectoryService 0x0000b039 CMessaging::SendInlineMessage(unsigned long) + 211
19 DirectoryService 0x0000a9b4 dsDoAttributeValueSearchWithData + 1080
20 DirectoryService 0x000a6e35 DoRecordSearch(int, char*, char*, UserGroup*) + 337
21 DirectoryService 0x000a7b47 GetItem(int, char*, void*, ntsid_t*, int, char*) + 725
22 DirectoryService 0x000a8071 GetUserWithUID + 57
23 DirectoryService 0x000ba14b Mbrd_ProcessGetGroups + 67
24 DirectoryService 0x0002f311 memberdDSmig doGetGroups + 337
25 DirectoryService 0x000a5324 _XGetGroups + 184
26 DirectoryService 0x000a5155 DSmemberdMIG_server + 109
27 libSystem.B.dylib 0x9208e7af mach msgserver + 343
28 DirectoryService 0x00022d77 CMigHandlerThread::ThreadMain() + 303
29 ...ectoryServiceCore.Framework 0x0015f349 DSCThread::Run() + 39
30 ...ectoryServiceCore.Framework 0x0015f554 DSLThread::_RunWrapper(void*) + 84
31 libSystem.B.dylib 0x9204a075 pthreadstart + 321
32 libSystem.B.dylib 0x92049f32 thread_start + 34

Thread 3:
0 libSystem.B.dylib 0x920498e6 kevent + 10
1 libSystem.B.dylib 0x9204a075 pthreadstart + 321
2 libSystem.B.dylib 0x92049f32 thread_start + 34

Thread 4:
0 libSystem.B.dylib 0x9205bb45 syscall + 5
1 ...ectoryServiceCore.Framework 0x0015f349 DSCThread::Run() + 39
2 ...ectoryServiceCore.Framework 0x0015f554 DSLThread::_RunWrapper(void*) + 84
3 libSystem.B.dylib 0x9204a075 pthreadstart + 321
4 libSystem.B.dylib 0x92049f32 thread_start + 34

Thread 5:
0 libSystem.B.dylib 0x920198e6 mach msgtrap + 10
1 libSystem.B.dylib 0x920210dc mach_msg + 72
2 libSystem.B.dylib 0x92076731 mach msg_serveronce + 318
3 DirectoryService 0x00022cea CMigHandlerThread::ThreadMain() + 162
4 ...ectoryServiceCore.Framework 0x0015f349 DSCThread::Run() + 39
5 ...ectoryServiceCore.Framework 0x0015f554 DSLThread::_RunWrapper(void*) + 84
6 libSystem.B.dylib 0x9204a075 pthreadstart + 321
7 libSystem.B.dylib 0x92049f32 thread_start + 34

Thread 2 crashed with X86 Thread State (32-bit):
eax: 0x00173000 ebx: 0x9201fa91 ecx: 0x00000001 edx: 0x00000004
edi: 0x00237370 esi: 0x00000010 ebp: 0xb0101ae8 esp: 0xb01019a0
ss: 0x0000001f efl: 0x00010202 eip: 0x920202b8 cs: 0x00000017
ds: 0x0000001f es: 0x0000001f fs: 0x0000001f gs: 0x00000037
cr2: 0x00000010

I ran disk utility and practically every application directory has files with permissions set incorrectly. This is really annoying. I can no longer open 'Activity Monitor' to check out what's going on. I had to open Terminal and use the 'top' command. I'm still waiting on DiskUtility to complete as we speak. Hopefully, this will clear things up. However, judging from responses on the forum, I shouldn't expect much from it. We'll see.

Apr 30, 2008 4:25 AM in response to Gabriel Chavez-Tafur

This problem is still around. I get it perhaps once a week. Just had it with a wired ADSL connection, although my airport is turned on for a Time Capsule. The latter is buggier than Leopard.
I used to have to force powerdown, but find that it will clear itself after 10 minutes or so.
I did force quit the Finder. Mail.app then required force quitting for some reason.
Activity Monitor sometimes displayed Mail's Shared Memory Size: 16,777,216.00 TB
The only strangeness in the log was:
Apr 30 16:43:05 218-165-193-170 Directory[20515]: Directory(20515,0xb0103000) malloc: free_garbage: garbage ptr = 0x10d59e0, has non-zero refcount = 1
Apr 30 16:43:05 218-165-193-170 Directory[20515]: Directory(20515,0xb0103000) malloc: free_garbage: garbage ptr = 0x10d7380, has non-zero refcount = 1
Apr 30 16:43:05 218-165-193-170 Directory[20515]: Directory(20515,0xb0103000) malloc: free_garbage: garbage ptr = 0x10d7ff0, has non-zero refcount = 1
Apr 30 16:43:05 218-165-193-170 Directory[20515]: Directory(20515,0xb0103000) malloc: free_garbage: garbage ptr = 0x10d8b50, has non-zero refcount = 1
Apr 30 16:43:05 218-165-193-170 [0x0-0x785785].com.apple.Directory[20515]: Directory(20515,0xb0103000) malloc: free_garbage: garbage ptr = 0x10d59e0, has non-zero refcount = 1
Apr 30 16:43:05 218-165-193-170 [0x0-0x785785].com.apple.Directory[20515]: Directory(20515,0xb0103000) malloc: free_garbage: garbage ptr = 0x10d7380, has non-zero refcount = 1
Apr 30 16:43:05 218-165-193-170 [0x0-0x785785].com.apple.Directory[20515]: Directory(20515,0xb0103000) malloc: free_garbage: garbage ptr = 0x10d7ff0, has non-zero refcount = 1
Apr 30 16:43:05 218-165-193-170 [0x0-0x785785].com.apple.Directory[20515]: Directory(20515,0xb0103000) malloc: free_garbage: garbage ptr = 0x10d8b50, has non-zero refcount = 1
A

Directoryservices 190% CPU

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