realMacMark

Q: Corrupted user in 10.8 (server)

My main user on an iMac 2007 is somehow corrupted in 10.8. (server) All other users are fine.

 

Symptoms:

- Accountsd (a per user lauchd daemon) is crashing and revived every 10 seconds, see https://discussions.apple.com/message/19263049#19263049 Every other user has no problem.

- Some applications like iPhoto (click on Sharing in menu bar) and "Security & Privacy" control panel do not work/hang/beachball for only this user. see https://discussions.apple.com/message/19263052#19263052

- "Resetting home permissions and ACLs" (located in boot from recovery partition > utitlities > terminal > resetpassword) does not finish its work after a whole night for this user. For every other user it finishes in seconds

 

What i tried to fix it:

- "reset of home permissions and ACLs" did never finish / hangs with "working"

- everything disk utility offers from recovery partition like repair disk, and repairing disk permissions

- used DiskWarrior (rebuild, ok)

- used DriveGenius (ok)

- used TechTool Pro (no bad blocks)

- New library and rebuild library for iPhoto does not change a thing for this user

- fresh copy of iPhoto did not help (guessed that because only this user is in trouble)

 

Any hint how i can fix this user?

OS X Mountain Lion

Posted on Aug 16, 2012 3:52 AM

Close

Q: Corrupted user in 10.8 (server)

  • All replies
  • Helpful answers

  • by mende1,

    mende1 mende1 Aug 16, 2012 3:56 AM in response to realMacMark
    Level 10 (93,324 points)
    Desktops
    Aug 16, 2012 3:56 AM in response to realMacMark

    It seems like the preferences are corrupted. http://www.reedcorner.net/understanding-upgrade-nightmares/

  • by realMacMark,Helpful

    realMacMark realMacMark Aug 16, 2012 5:32 AM in response to mende1
    Level 1 (95 points)
    Aug 16, 2012 5:32 AM in response to mende1

    I did now additionally:

     

    - SMC reset for iMac (shutdown, power plug 15 secs off, 5 secs in, boot)

    - PRAM reset

    - batch checked the plist files with plutil (i had already removed many of them) sudo plutil -s ~/Library/Preferences/*.plist

    - removed caches for the user rm -rf ~/Library/Caches

    - removed caches in rm -rf /Library/Caches

     

    Maybe this log entry is useful:

     

    16.08.12 14:29:21,743 accountsd[434]: Error while opening database Error Domain=NSCocoaErrorDomain Code=512 "The file couldn’t be saved." UserInfo=0x7fba63443f10 {reason=Failed to create file; code = 2}, {

        reason = "Failed to create file; code = 2";

    }

     

     

    Creating new database...

    16.08.12 14:29:21,745 accountsd[434]: Second Error while creating new database Error Domain=NSCocoaErrorDomain Code=512 "The file couldn’t be saved." UserInfo=0x7fba63457490 {reason=Failed to create file; code = 2}, {

        reason = "Failed to create file; code = 2";

    }

  • by realMacMark,Helpful

    realMacMark realMacMark Aug 21, 2012 4:19 AM in response to realMacMark
    Level 1 (95 points)
    Aug 21, 2012 4:19 AM in response to realMacMark

    Some findings:

     

    • When using "Share" in iPhoto invoking the "Security & Privacy" system preferences pane the per user launchd daemon "accountsd" is invoked as shown in Activity Monitor.
    • Inspecting open files of the accountsd process on a second Mac shows it uses an sqlite3 database located at "~/Library/Accounts/Accounts3.sqlite".

     

    This means i have to check that sqlite file on my troubled Mac why this certain instance cannot be used. Then it should be resolved.

  • by realMacMark,Solvedanswer

    realMacMark realMacMark Aug 21, 2012 10:42 AM in response to realMacMark
    Level 1 (95 points)
    Aug 21, 2012 10:42 AM in response to realMacMark

    My previous post was correct. The problem is that "~/Library/Accounts/Accounts3.sqlite" does not exist for this account. Something must have gone wrong while upgrading to 10.8 which introduced this daemon.

     

    On top of that the user immutable flag is set on ~/Library which prevents the creation of the missing file and directory:

     

    ls -lOd ~/Library

    drwx------@ 76 macmark  staff  uchg,hidden 2584 Jul 20  2011 /Users/macmark/Library

     

    I changed the flag with

    chflags nouchg ~/Library


    Then opened the "Security & Privacy" system preferences pane and also used the "Share" menu in iPhoto to ensure the daemon creates its stuff there. And then i changed the flag back to normal with

     

    chflags uchg ~/Library

     

    And everything was fine, the Accounts directory was created, the database was created.

  • by realMacMark,

    realMacMark realMacMark Jan 10, 2013 1:23 PM in response to realMacMark
    Level 1 (95 points)
    Jan 10, 2013 1:23 PM in response to realMacMark

    There was even more wrong which i fixed here: https://discussions.apple.com/message/20821454#20821454