Bug 1349 - Random socket errors since Monotouch 4.2.2
Summary: Random socket errors since Monotouch 4.2.2
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 4.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-10-07 17:15 UTC by René Ruppert
Modified: 2013-12-05 18:35 UTC (History)
5 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 Developer Community or GitHub 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:

Comment 2 René Ruppert 2011-10-07 17:38:31 UTC
Like I already wrote: I start my app several houndred times a day. Two times it crashes. If I was to reproduce this with a simple test app, I'd sit there for ages. I would just like you to make sure that there hasn't been a small change that could cause the issue.
Comment 3 Jeffrey Stedfast 2011-10-07 18:03:04 UTC
Yes, I know, and the very first thing I did was review the 2 pages of diffs between 4.2.1 and 4.2.2 and there was absolutely nothing that changed in the networking stack or anything that the networking stack depends on.

The only changes were to crypto, UIKit, AVFoundation, and the pdf API.
Comment 4 Gonzalo Paniagua Javier 2011-10-07 18:12:03 UTC
Jeff, crypto might be involved here. René will have to confirm whether he is using "https" or just "http".
Comment 5 Sebastien Pouliot 2011-10-07 18:56:27 UTC
There's a single 'mono' revision change between monotouch 4.2.1 and 4.2.2 and it's not related to crypto.
Comment 6 Jeffrey Stedfast 2011-10-07 19:50:28 UTC
Sebastien, the single change to Mono is a Makefile change that defines FULL_AOT_RUNTIME which X509ExtensionCollection.cs does use...

However, looking at the code, it looks like the purpose of the #if FULL_AOT_RUNTIME block is to avoid reflection (assuming I read that correctly?)

We could build a monotouch.dll with that #define disabled and see if that fixes it for Rene if he is using https .
Comment 7 Jeffrey Stedfast 2011-10-07 19:51:46 UTC
Oh, I also missed that this #define does change a fair bit of System.Linq code paths.
Comment 8 Jeffrey Stedfast 2011-10-07 19:53:13 UTC
well, I should say, disables a lot of Linq.
Comment 9 Sebastien Pouliot 2011-10-07 20:09:19 UTC
Right, that X509ExtensionCollection.cs avoid reflection/cryptoconfig and helps the linker.

Other LINQ removal are related to code generation and were the cause for another regression (bug #587) unless the linker was used (because it would remove most of the code that the define avoids).

I don't see how that could interact with to cause the stack trace. René could you confirm:

a) if you're using HTTP or HTTPS ? and 

b) if the behavior seems identical depending on your linker settings (e.g. comparing "Don't link", the default on the simulator, with "Link SDK assemblies", the default on the devices). 

Comment 10 René Ruppert 2011-10-08 04:05:21 UTC
I am indeed using SSL/HTTPS. I have seen it on the simulator only so far but I think its just that chances are higher because of the many testruns I do on the simulator.
Comment 11 Sebastien Pouliot 2011-10-08 22:43:31 UTC
René, as we don't have a test case to duplicate your issue we'll need your help to try with only HTTP (i.e. without SSL) and also test for (b). Thanks.

note: bug #587 only occured on devices when "Don't link" was used so I don't think this is the same issue
Comment 12 PJ 2013-11-19 17:05:09 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 13 PJ 2013-12-05 18:35:31 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.