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

Directory Service Crashing

I have been testing leopard server and have run into a problem that puzzles me. I hope that somebody can provide some insights on this issue.

Installed 10.5 server, advanced with mobile users and time machine backups. Upgraded mobile accounts from Tiger were less than desirable (sync issues). 10.5 users were fine except that the directory service crashed consistently during home directory syncing.
Did a fresh re-install with upgrade to 10.5.1 before configuration; still the same.

Did even a standard install with standard users only (basic services to make sure that no manual DNS or OD config. caused the problem ) and the Directory Services still go out on me.

This is running on a Xserve G5 dual with 6gig of RAM & 500gb raid1 mirror. That machine ran 10.4 perfectly for the last year plus.

Below are the shortened results form the crash reporter. Any ideas? I was really hoping that I can use leopard server to use iCal server & time machine.

Thanks!

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

Date/Time: 2007-11-25 20:33:56.179 -0600
OS Version: Mac OS X Server 10.5.1 (9B18)
Report Version: 6

Exception Type: EXC BADACCESS (SIGSEGV)
Exception Codes: KERN INVALIDADDRESS at 0x000000004b009698
Crashed Thread: 2

Thread 0:
0 libSystem.B.dylib 0x93f689d8 mach msgtrap + 8
1 libSystem.B.dylib 0x93f6f8fc mach_msg + 56
2 com.apple.CoreFoundation 0x922f9664 CFRunLoopRunSpecific + 1828
3 com.apple.CoreFoundation 0x922f9ef4 CFRunLoopRun + 60
4 DirectoryService 0x000156e4 main + 2356
5 DirectoryService 0x00014d78 start + 64

Thread 1:
0 libSystem.B.dylib 0x93f689d8 mach msgtrap + 8
1 libSystem.B.dylib 0x93f6f8fc mach_msg + 56
2 com.apple.CoreFoundation 0x922f9664 CFRunLoopRunSpecific + 1828
3 com.apple.CoreFoundation 0x922f9ef4 CFRunLoopRun + 60
4 DirectoryService 0x00020eb0 CPluginRunLoopThread::ThreadMain() + 228
5 ...ectoryServiceCore.Framework 0x0015a09c DSCThread::Run() + 52
6 ...ectoryServiceCore.Framework 0x0015a2f4 DSLThread::_RunWrapper(void*) + 96
7 libSystem.B.dylib 0x93faabf8 pthreadstart + 316

Thread 2 Crashed:
0 libsqlite3.0.dylib 0x94ae6850 sqlite3 resultvalue + 33024
1 libsqlite3.0.dylib 0x94ae5728 sqlite3 resultvalue + 28632
2 libsqlite3.0.dylib 0x94af1e5c sqlite3 resultvalue + 79628
3 libsqlite3.0.dylib 0x94af1db4 sqlite3 resultvalue + 79460
4 libsqlite3.0.dylib 0x94b3c3dc sqlite3 gettable + 31548
5 libsqlite3.0.dylib 0x94b3fbf4 sqlite3 gettable + 45908
6 libsqlite3.0.dylib 0x94b3fe64 sqlite3_step + 148
7 DirectoryService 0x0006d31c CDSLocalPluginNode::sqlExecSync(char const*, unsigned long) + 100
8 DirectoryService 0x0006eda4 CDSLocalPluginNode::AddRecordIndex(char const*, char const*) + 512
9 DirectoryService 0x0006f9b0 CDSLocalPluginNode::FlushRecord(__CFString const*, __CFString const*, __CFDictionary const*) + 1308
10 DirectoryService 0x0006972c CDSLocalPlugin::CloseRecord(sCloseRecord*) + 304
11 DirectoryService 0x000a4d80 BaseDirectoryPlugin::ProcessRequest(void*) + 520
12 DirectoryService 0x00069564 CDSLocalPlugin::ProcessRequest(void*) + 600
13 DirectoryService 0x00012874 CHandlerThread::RefDeallocProc(unsigned long, unsigned long, CServerPlugin*) + 240
14 DirectoryService 0x0000a73c CRefTable::RemoveRef(unsigned long, unsigned long, long, unsigned long, bool) + 880
15 DirectoryService 0x0001d6fc CRequestHandler::DoCloseRecord(sComData*, long*) + 220
16 DirectoryService 0x00009ce4 CRequestHandler::GetRequestData(sComData*, long*, bool*) + 808
17 DirectoryService 0x00002360 CRequestHandler::HandlePluginCall(sComData**) + 192
18 DirectoryService 0x00003068 CRequestHandler::HandleRequest(sComData**) + 76
19 DirectoryService 0x0002d4b8 dsmig do_apicall + 380
20 DirectoryService 0x0005de5c Xapicall + 452
21 DirectoryService 0x0005da80 DirectoryServiceMIG_server + 164
22 DirectoryService 0x00024330 dsmig demux_notify(mach_msg_headert*, mach msg_headert*) + 96
23 libSystem.B.dylib 0x93ff209c mach msgserver + 364
24 DirectoryService 0x00021130 CMigHandlerThread::ThreadMain() + 312
25 ...ectoryServiceCore.Framework 0x0015a09c DSCThread::Run() + 52
26 ...ectoryServiceCore.Framework 0x0015a2f4 DSLThread::_RunWrapper(void*) + 96
27 libSystem.B.dylib 0x93faabf8 pthreadstart + 316

Xserve's, misc. Mac models, Mac OS X (10.4.10)

Posted on Nov 25, 2007 6:58 PM

Reply
74 replies

Apr 10, 2008 2:27 AM in response to Harry Nyberg

Actually, I'm trialling that fix at the moment (see http://curmi.com/blog/2008/04/08/leopard-server-and-directoryservice-crashes/ ). It seems to work, though after a day of crashing and the script automatically doing this, my server completely stopped responding and had to be rebooted manually. Not sure that it is connected or not - I would assume that is just some other stability issue with Leopard server. So I'm continuing the testing and we'll see.

Apr 15, 2008 4:34 AM in response to Jamie Curmi

Hi Jamie,

The server just crashed so I can easily trackback to see what happened.

4/15/08 11:54:03 AM DirectoryService[25] GetGroups couldn't find uid 1027

And then the error messages start flooding in. For example:


4/15/08 11:54:03 AM /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.fra mework/Versions/A/Support/lsregister[4976] FolderManager: Failed looking up user domain root; url='file://localhost/Network/Servers/server.kpslc.com/Volumes/KPSLC/Users/fred apriddy/' path=/Network/Servers/server.kpslc.com/Volumes/KPSLC/Users/fredapriddy/ err=-43 uid=1027 euid=1027

Then I see this

4/15/08 12:00:55 PM com.apple.launchd[1] (0x10f740.mdworker[5052]) Exited with exit code: 1

Soon afterwards the server fails to authenticate anyone even the local root account(!). I can't even run Terminal to try to restart anything. I can only manually restart.

Apr 18, 2008 9:05 AM in response to Jamie Curmi

I had the same issues with directory crashing and not allowing me to log into the root. I tired doing a clean install and it seemed to work until I upgraded to the 10.5.2. Every time I did the upgrade the Directory would crash and I could not login and I would have to reset the root user to even login at restart.

Finally I reinstalled and cleared the drive and did not do any of the upgrades and the directory seems to be working fine.

Apr 22, 2008 5:14 AM in response to Jamie Curmi

Hi !

I had this problem last weekend. I think I solved it by redefining the user Home directory. When I imported the archive from my previous (10.4) OD, every home directory got changed to <nameofserver.local> instead of FQDN.

As soon as I switched them to none, the problem stopped. In the future, I will probably bind the machines to the directory, so I will have to change back the home directory settings. Everyone is going to be local, and I hope this won't cause the problem to surface back.

Apr 30, 2008 9:31 AM in response to Moofo

Hi Moofo,

I tried this but it didn't work for me. I wrote a nice little AppleScript to drive Workgroup Manager, step through the user list, and set each user's home to "(None)". About 10 minutes after it was finished, DS died. So I set the users' homes back to FQDN/Users.

I'm using Curmi's fix for now, though I've modified it to toggle the AFP authentication method, then HUP AppleFileServer (immediately, then 10 seconds later, then 60 seconds later). The multiple HUPs seem to help a little, but even then it's still only effective about half the time.

I have 150 users and have been seeing between 10 and 20 DS crashes per day since I put my server online around the beginning of the month.

And I called Apple. Not because I thought they could help me, but to let them know there was yet another Leopard Server installation experiencing this issue. They told me to HUP AFP once a minute.

By the way, I've begun leaving the server console logged in as my administrator user, with a terminal window open, and su'd to root.

What I've noticed is that when DirectoryServices crashes enough times, +no services+ can authenticate. But since the terminal is already logged in as root, I can find the process ID of DirectoryServices and kill -KILL it.

When it reloads, the non-AFP services can make use of it; then I have to toggle the AFP authentication method and HUP AFP.

But I don't have to restart the server...

--
Bryan

May 9, 2008 11:00 AM in response to Bryan K. Vines

Just to follow up, I ended up going back to 10.4.10 (that's the backup I made just prior to wiping the boot drive and installing Server 10.5.2). Since my shares are on a different set of drives, the rollback was not painful.

I really wanted Leopard Server to work. I had a calendar server project which depended upon it. Maybe Server 10.5.3 will fix it.

--
Bryan

May 9, 2008 3:15 PM in response to Bryan K. Vines

I also had to revert to 10.4. Since I started this thread, I tried 2 others Xserve's with fresh setups to the same effect.

Unlike 10.4, which was a welcome improvement in performance and stability over 10.3, 10.5 server was in a way a huge step backwards.

Since directory services are at the center of providing its services in leopard, this issue is an implementation killer. Unless you have too much time on your hands or don't care about your reputation, that is...

Sorry about the rant. I guess I just expected Apple to resolve a critical issue like this within 6 months.
I will try again as soon as 10.5.3 is out.

Wolfman

May 9, 2008 3:49 PM in response to Wolfman

This is indeed a known bug, and is supposedly fixed in the impending 10.5.3 update. The basic problem is that Directory Services crashes easily, and AppleFileServer fails to reconnect with DS. The workaround that seems to work most reliably is to enable and then disable AFP guest access. This somehow forces AFP to re-establish its connection to DS.

You can enable/disable AFP guest access manually in Server Admin, or you can run a "watchdog" script that will do it automatically whenever the DirectoryService daemon crashes.

This editor stinks for entering shell scripts, so I'm putting together a short web page detailing the process of setting up this watchdog script: http://www.brazoslink.net/support/fixAFP.html

May 10, 2008 3:17 PM in response to Christian Kuehn

I think the problem here is that Apple, generally, only fix things in a big update. So we end up having to wait (and hope) for 10.5.3.

This issue is such a problem that really Apple should have had a "Directory Service Update 1.0" months ago. Assuming they've had a fix in their labs all this time, then yes, this is a big disappointment.

With bugs like this, Apple needs to do better and shouldn't be waiting for a 10.5.3 update to roll the update in to.

Directory Service Crashing

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