• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Performance issue on macOS 10.15 obtaining display name for ~/Desktop, ~/Documents, and ~/Downloads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance issue on macOS 10.15 obtaining display name for ~/Desktop, ~/Documents, and ~/Downloads


  • Subject: Re: Performance issue on macOS 10.15 obtaining display name for ~/Desktop, ~/Documents, and ~/Downloads
  • From: Allan Odgaard via Cocoa-dev <email@hidden>
  • Date: Mon, 20 Apr 2020 00:11:12 +0700

On 19 Apr 2020, at 22:54, David M. Cotter wrote:

i have discovered it may have to do with permissions / entitlements that have been granted the app by the user, and that resetting all perms to default will "fix" the problem

I think you are right about this being a permission / “sandbox” issue, because the 3 folders in question are all folders that macOS 10.15 now require special permission to read (even though in my case, I just request their display name).

Furthermore, it could explain why there is no delay when launched from terminal, as the process will inherit the entitlements of the terminal, which may have some special entitlements for the full disk access.

Unfortunately though I can’t figure out *what* the problem is; running `tccutil reset All` (and rebooting) did not fix it.

I have tried the code in question in a signed and notarized app that has been granted full disk access, yet it still has the delay.

A spindump does indicate it is a “sandbox” issue:

   *182   getattrlist + 136 (kernel + 3512472) [0xffffff8000559898]
     *182   ??? (kernel + 3512820) [0xffffff80005599f4]
       *181   ??? (kernel + 3501529) [0xffffff8000556dd9]
         *181   ??? (kernel + 3490836) [0xffffff8000554414]
*181 mac_vnode_check_access + 154 (kernel + 9093082) [0xffffff8000aabfda] *181 hook_vnode_check_access + 167 (Sandbox + 39552) [0xffffff7f823a7a80] *181 sb_evaluate + 5004 (Sandbox + 67658) [0xffffff7f823ae84a] *181 approval_response_wait + 142 (Sandbox + 154851) [0xffffff7f823c3ce3] *181 __WAITING_ON_APPROVAL_FROM_SANDBOXD__ + 23 (Sandbox + 155134) [0xffffff7f823c3dfe]
                     *181   ??? (kernel + 6855402) [0xffffff8000889aea]
*181 thread_block_reason + 175 (kernel + 1317935) [0xffffff8000341c2f] *181 ??? (kernel + 1324017) [0xffffff80003433f1] *181 machine_switch_context + 200 (kernel + 2388456) [0xffffff80004471e8]

That’s 181 milliseconds spent __WAITING_ON_APPROVAL_FROM_SANDBOXD__ in a non-sandboxed app obtaining display name for 3 folders in the user’s home directory.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Performance issue on macOS 10.15 obtaining display name for ~/Desktop, ~/Documents, and ~/Downloads
      • From: Allan Odgaard via Cocoa-dev <email@hidden>
    • Re: Performance issue on macOS 10.15 obtaining display name for ~/Desktop, ~/Documents, and ~/Downloads
      • From: Rob Petrovec via Cocoa-dev <email@hidden>
References: 
 >Performance issue on macOS 10.15 obtaining display name for ~/Desktop, ~/Documents, and ~/Downloads (From: Allan Odgaard via Cocoa-dev <email@hidden>)
 >Re: Performance issue on macOS 10.15 obtaining display name for ~/Desktop, ~/Documents, and ~/Downloads (From: "David M. Cotter via Cocoa-dev" <email@hidden>)

  • Prev by Date: Re: Performance issue on macOS 10.15 obtaining display name for ~/Desktop, ~/Documents, and ~/Downloads
  • Next by Date: Re: Performance issue on macOS 10.15 obtaining display name for ~/Desktop, ~/Documents, and ~/Downloads
  • Previous by thread: Re: Performance issue on macOS 10.15 obtaining display name for ~/Desktop, ~/Documents, and ~/Downloads
  • Next by thread: Re: Performance issue on macOS 10.15 obtaining display name for ~/Desktop, ~/Documents, and ~/Downloads
  • Index(es):
    • Date
    • Thread