MacOS – com.apple.quicklook.satellite problem with CoreData on Networked Home Directories

contactskerberosmacosopen-directoryquicklook

I have a fully controllable test network set up to work this issue I've had each time I set up my SOHO network. The network now consists of a 2010 MacMini server, using RAID0, running 10.9.4 and Server 3.1.2. I have recreated this server several times without improvement to the problems. I've made the configuration very simple. The server is currently providing DNS, DHCP, FileSharing of Users' home directories, and OD. The OD only has two test users added, no other mods have been made except global password policies.

The workstation I am testing from is a 2012 MacMini that I have imaged with Mavericks 10.9.4. This workstation is connected with Cat 6 cable to the server through a DLink Router; the wi-fi is disabled. The problem also exists when using a Linksys router with wi-fi turned on.

Both computers have hardwired keyboards and mice. Bluetooth has been turned off.

The workstation has been bound to the server using both name and ip address, and with and without authentication and SSL.

The problem is that each time a networked user allows a vCard to be processed by Quicklook, the system goes ugly immediately, mostly with com.apple.quicklook.satellite errors. Sample of the log:

8/7/14 8:10:04.523 AM com.apple.quicklook.satellite[310]: CoreData: error: (3) access permission denied
8/7/14 8:10:04.527 AM com.apple.quicklook.satellite[310]: Unknown error reading database file, will attempt reimporting: Error Domain=NSCocoaErrorDomain Code=256 "The file couldn’t be opened." UserInfo=0x7fc7d3c493c0 {NSSQLiteErrorDomain=3, NSUnderlyingException=error during execution of SQL string 'pragma journal_mode=wal' : access permission denied} {
    NSSQLiteErrorDomain = 3;
    NSUnderlyingException = "error during execution of SQL string 'pragma journal_mode=wal' : access permission denied";
}
8/7/14 8:10:04.528 AM com.apple.quicklook.satellite[310]: Move Address Book store at /Network/Servers/server.sub.domain.net/Users/testuser/Library/Application Support/AddressBook/AddressBook-v22.abcddb to /Network/Servers/server.sub.domain.net/Users/testuser/Library/Application Support/AddressBook/AddressBook-v22.abcddb.3496356E-319C-4176-BFB9-19D8BB7D9900.unknown
8/7/14 8:10:04.581 AM com.apple.quicklook.satellite[310]: Could not replace store at file:///Network/Servers/server.sub.domain.net/Users/testuser/Library/Application%20Support/AddressBook/AddressBook-v22.abcddb.3496356E-319C-4176-BFB9-19D8BB7D9900.unknown from file:///Network/Servers/server.sub.domain.net/Users/testuser/Library/Application%20Support/AddressBook/AddressBook-v22.abcddb: Error Domain=NSSQLiteErrorDomain Code=3 "The operation couldn’t be completed. (NSSQLiteErrorDomain error 3.)" UserInfo=0x7fc7d3f00620 {NSFilePath=/Network/Servers/server.sub.domain.net/Users/testuser/Library/Application Support/AddressBook/AddressBook-v22.abcddb.3496356E-319C-4176-BFB9-19D8BB7D9900.unknown, reason=Failed to replace destination database} {
    NSFilePath = "/Network/Servers/server.sub.domain.net/Users/testuser/Library/Application Support/AddressBook/AddressBook-v22.abcddb.3496356E-319C-4176-BFB9-19D8BB7D9900.unknown";
    reason = "Failed to replace destination database";
}
8/7/14 8:10:04.654 AM com.apple.quicklook.satellite[310]: CoreData: error: (3) access permission denied
8/7/14 8:10:04.657 AM com.apple.quicklook.satellite[310]: 0x7fc7d3c278b0: ManagedObjectContext (ABAddressBook) could not create the store at path: </Network/Servers/server.sub.domain.net/Users/testuser/Library/Application Support/AddressBook/AddressBook-v22.abcddb> - creation error: Error Domain=NSCocoaErrorDomain Code=256 "The file couldn’t be opened." UserInfo=0x7fc7d3f0e830 {NSSQLiteErrorDomain=3, NSUnderlyingException=error during prepareSQL for SQL string 'pragma auto_vacuum=2' : access permission denied} {
    NSSQLiteErrorDomain = 3;
    NSUnderlyingException = "error during prepareSQL for SQL string 'pragma auto_vacuum=2' : access permission denied";
}
8/7/14 8:10:04.659 AM com.apple.quicklook.satellite[310]: *** attempt to post distributed notification 'ABWillRestoreFromMetadataPriv' thwarted by sandboxing.

Date/Time:     Thu Aug  7 08:10:04 2014
OS Version:    13E28
Application:   com.apple.quicklook.satellite

Backtrace:
0   CoreFoundation                      0x00007fff914af312 __CFGenerateReport + 242
1   CoreFoundation                      0x00007fff91322052 _CFXNotificationPost + 882
2   Foundation                          0x00007fff8dfc4804 -[NSDistributedNotificationCenter postNotificationName:object:userInfo:options:] + 73
3   AddressBook                         0x00007fff8bbe090f -[ABAddressBook nts_RestoreFromMetaDataIfNeededAndTriggerSync:] + 209
4   AddressBook                         0x00007fff8bb4aca9 -[ABAddressBook nts_RestoreFromMetaDataIfNeeded] + 22
5   AddressBook                         0x00007fff8bb4ac39 -[ABAddressBook nts_DoInitialImports] + 157
6   AddressBook                         0x00007fff8bb4713f ABRunWithLock + 166
7   AddressBook                         0x00007fff8bb44994 +[ABAddressBook nts_SharedAddressBook] + 129
8   AddressBook                         0x00007fff8bb4486e +[ABAddressBook nts_CreateSharedAddressBook] + 49
9   AddressBook                         0x00007fff8bb446e1 +[ABAddressBook sharedAddressBook] + 69
10  AddressBook                         0x00007fff8bb445f7 +[ABAddressBook addressBookWithDatabaseDirectory:options:] + 56
11  AddressBook                         0x00007fff8bbb436a +[ABAddressBook(ABAddressBookHackery) emptyMemoryBackedAddressBookWithOptions:] + 39
12  AddressBook                         0x00007fff8bc4c0fe +[ABAddressBook(ABAddressBookHackery) provisionalMemoryBackedAddressBook] + 106
13  AddressBook                         0x00007fff8bc14106 -[ABVCardParser people] + 41
14  Contact                             0x00000001045eb69c Contact + 9884
15  QuickLook                           0x00007fff92fbee23 _QLThumbnailRequestCallGenerator + 585
16  QuickLookSatellite                  0x000000010445d249 main + 6233
17  QuickLookSatellite                  0x000000010445e6aa _QLUUIDForRequest + 150
18  QuickLookSatellite                  0x000000010445cfa4 main + 5556
19  QuickLook                           0x00007fff92fef181 _Z18QLTryCatchAndCrashU13block_pointerFvvE + 17
20  libdispatch.dylib                   0x00007fff8deb21bb _dispatch_call_block_and_release + 12
21  libdispatch.dylib                   0x00007fff8deaf28d _dispatch_client_callout + 8
22  libdispatch.dylib                   0x00007fff8deb1673 _dispatch_queue_drain + 451
23  libdispatch.dylib                   0x00007fff8deb29c1 _dispatch_queue_invoke + 110
24  libdispatch.dylib                   0x00007fff8deb0f87 _dispatch_root_queue_drain + 75
25  libdispatch.dylib                   0x00007fff8deb2177 _dispatch_worker_thread2 + 40
26  libsystem_pthread.dylib             0x00007fff92e8aef8 _pthread_wqthread + 314
27  libsystem_pthread.dylib             0x00007fff92e8dfb9 start_wqthread + 13
8/7/14 8:10:04.715 AM com.apple.quicklook.satellite[310]: Restoring DB from MetaData
8/7/14 8:10:04.737 AM com.apple.quicklook.satellite[310]: Error obtaining permanent ID: Error Domain=NSCocoaErrorDomain Code=134020 "The model configuration used to open the store is incompatible with the one that was used to create the store." UserInfo=0x7fc7d3d23360 {NSUnderlyingException=Can't resolve how to assign objects to stores; Coordinator does not have any stores}
8/7/14 8:10:04.737 AM com.apple.quicklook.satellite[310]: Error obtaining permanent ID: Error Domain=NSCocoaErrorDomain Code=134020 "The model configuration used to open the store is incompatible with the one that was used to create the store." UserInfo=0x7fc7d3c2e830 {NSUnderlyingException=Can't resolve how to assign objects to stores; Coordinator does not have any stores}
8/7/14 8:10:04.740 AM com.apple.quicklook.satellite[310]: Error obtaining permanent ID: Error Domain=NSCocoaErrorDomain Code=134020 "The model configuration used to open the store is incompatible with the one that was used to create the store." UserInfo=0x7fc7d3c164a0 {NSUnderlyingException=Can't resolve how to assign objects to stores; Coordinator does not have any stores}
8/7/14 8:10:04.740 AM com.apple.quicklook.satellite[310]: Error obtaining permanent ID: Error Domain=NSCocoaErrorDomain Code=134020 "The model configuration used to open the store is incompatible with the one that was used to create the store." UserInfo=0x7fc7d3c63fd0 {NSUnderlyingException=Can't resolve how to assign objects to stores; Coordinator does not have any stores}
8/7/14 8:10:04.744 AM com.apple.quicklook.satellite[310]: Error obtaining permanent ID: Error Domain=NSCocoaErrorDomain Code=134020 "The model configuration used to open the store is incompatible with the one that was used to create the store." UserInfo=0x7fc7d3c5de60 {NSUnderlyingException=Can't resolve how to assign objects to stores; Coordinator does not have any stores}
8/7/14 8:10:04.744 AM com.apple.quicklook.satellite[310]: Error obtaining permanent ID: Error Domain=NSCocoaErrorDomain Code=134020 "The model configuration used to open the store is incompatible with the one that was used to create the store." UserInfo=0x7fc7d3c5e000 {NSUnderlyingException=Can't resolve how to assign objects to stores; Coordinator does not have any stores}

After several minutes, the vCard may be displayed properly, but the users' address book files have been deleted and all records are lost.

I've had this situation using two different 2010 MacMini servers. I've tried with both external hard drives for data and using the internal drives. The drives pass all tests I have including S.M.A.R.T monitoring.

To be clear, if local home folders are used, the problem does not occur. If the networked user is logged in on the server, the problem does not occur. The problem only seems to occur when the user's home directory is served over either SMB of AFP. If I use a local (or Guest) user on the workstation to view a vCard on a networked drive, it seems to work fine.

Because of this, I'm leaning towards something with binding, kerberos or OD. Something where the default configurations are not satisfactory.

I'm at a loss of what to try next. I've Googled extensively and have not been able to find a solution, or even evidence that other people are experiencing this issue. I find this odd.

Has anyone seen this issue and have you resolved it?

Thanks.

Best Answer

I broke down and called Apple Care tonight and got quickly directed over to the Server team. Shocking to me, but the tech was able to reproduce my issue! This surprised me because no one in the Apple Discussion groups (or really elsewhere) has mentioned the problem. So the tech is elevating the issue and hopefully we'll see a bug fix soon. I haven't tested Yosemite, but may try to do that next week.

For those who are concerned they could see this problem with their network, there is a way to bypass quicklook's processing of vCards on the workstation. I found an obscure mention of similar and perhaps related issue (https://www.biostars.org/p/67388/) which includes a workaround that disables quicklook generator for contacts and the importer.

As root:

cd /System/Library/QuickLook/ ; mv Contact.qlgenerator Contact.qlgenerator.BAD
cd /System/Library/Spotlight/ ; mv vCard.mdimporter vCard.mdimporter.BAD

HTH someone in the future.

Edit: The same behavior exists in Yosemite. I have not tested the workaround as I opted to move home directories to individual workstations. I was experiencing too many problems. However, as Contact.qlgenerator and vCard.mdimporter are present in Yosemite, I suspect the workaround still works.