>> 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). Yes, this is because of iCloud. Log out of iCloud and it should go away as I suggested in my first reply. You could also grant your app full disk access and that might ‘fix’ it for you too. But your users would probably not want to do that.
>> 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. Its actually worse then that. At the top of the spindump file it says was the numbers represent. Something like: Duration: 10.00s Steps: 1001 (10ms sampling interval) So 181 actually represents 1810ms, or 1.81 seconds. So this is a sandbox performance issue. Please file a bug and include a sysdiagnose as I suggested in my first reply. —Rob > On Apr 19, 2020, at 11:11 AM, Allan Odgaard via Cocoa-dev > <cocoa-dev@lists.apple.com> wrote: > > 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 (Cocoa-dev@lists.apple.com) > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/petrock%40mac.com > > This email sent to petr...@mac.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com