Bug 41208 - Xamarin Studio hangs on iOS Bundle Signing menu when there are a lot of provisioning profiles
Summary: Xamarin Studio hangs on iOS Bundle Signing menu when there are a lot of provi...
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 4.4.0 (C7)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2016-05-20 10:48 UTC by John Miller [MSFT]
Modified: 2017-03-23 13:16 UTC (History)
6 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description John Miller [MSFT] 2016-05-20 10:48:02 UTC

   Clicking on the iOS Bundle Signing menu hangs XS and it has to be force quit. 

**Steps to Reproduce:**

   Unclear, but here is what led to a user having this issue. 

   - Sync'd a Xcode account that had many provisions and downloaded a lot of them 
   - We believe it was somewhere around 30 provisions
   - Then, opening any project and browsing to the iOS Bundle Signing tab woudl cause XS to hang

**Actual Results:**

   XS Hangs.
   See attached backtrace from `lldb monobt`.

**Expected Results:**

   No hanging.

**Build Date & Platform:**

   XS 6.0 and XS 5.10.3
   Xcode 7.3

**Additional Information:**

   To workaround this, the user deleted the provisions from the file system and only downloaded the few they needed to continue working.
Comment 3 Jeffrey Stedfast 2016-05-20 11:50:11 UTC
Even when QA was creating tons and tons of profiles (we had around 1000 at one point), it wouldn't take more than a minute or so on my machine (which is pretty beefy, so maybe 2 minutes for something as weak sauce as my MacBook Air?).

Now, as Vincent stated, perhaps the issue is just hundreds of beefy X.509 certificates listed in each of those profiles to make them super big (bigger than what QA was generating?).

Even so, I have my doubts about an actual *hang*. More like it's just slow because there's so much data to parse.

Once we manage to generate a cache of the profiles, though, it'll be super speedy.
Comment 4 Jeffrey Stedfast 2016-05-20 11:52:19 UTC
Looking at the log, it might just be that the GC is being hit super hard by tons of mallocs.
Comment 6 Jeffrey Stedfast 2016-05-20 11:59:35 UTC
If it's taking more than a few minutes, then I guess it really is a hang (especially if he says he waited hours).

We'll probably need whoever maintains X509Certificate2.cs and/or the Mono runtime team to look into this issue since the hang is lower level than the XS code.

I'll reassign to them since they'll know better as to whether or not they'll need him to get his machine back into that state.
Comment 7 Marek Safar 2016-05-23 08:50:13 UTC
It could be some corrupted certificate however without some way to repro it's hard to tell. How can we reproduce it?

On the other hand this operation can theoretically take unlimited time so XS depending on it in synchronous way is wrong.
Comment 8 Marek Safar 2017-03-23 13:16:27 UTC
No response