Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I have some async/await code that runs well on Mono.Mac and Xamarin.IOS, but consistently crashes on Android. I've attached a piece of sample code that appears to reproduce the bug.
Created attachment 3885 [details]
Some more details I had originally posted to the forums: I have some concurrently network code that makes heavy use of async/await. It runs fine on Xamarin.iOS and Mono.mac. But when I run the code on Xamarin.Android (Version: 4.7.4 (Indie Edition)), I get a SIGSEGV about 7 times out of 10.
Interestingly, there's a particular line of code I've toggled on and off, which should do nothing more than add another network connection into the mix. When the line is enabled, I see the crash frequently, and when it's disabled, I rarely crash at all.
Another curious data point is that right around when the SIGSEGV hits, one of the network tasks faults with a "connection reset by peer". What's interesting is we would be much more likely to encounter this exception on the other network connection, so I was wondering if it was possible for the tasks generated by async/await to be getting their flows mixed up.
I'm unable to easily reproduce on my Nexus 10/Android 4.2.
What target device and Android version are you testing on? Is it armeabi or armeabi-v7a or x86?
> I get a SIGSEGV about 7 times out of 10.
Can you please provide the full logcat output?
> When the line is enabled, I see the crash frequently, and when it's disabled,
> I rarely crash at all.
Which line is this? I don't see anything in the source code that mentions this.
> Another curious data point is that right around when the SIGSEGV hits, one of
> the network tasks faults with a "connection reset by peer".
Is it from the same PID?
The writeup is regarding our app, which is different from the test case I attached. That crash was from the x86 simulator running in non-debug mode. The following is the test case that stably reproduces the crash for us, running on a few devices including Nexus S, under debug mode. We think the debugger has something to do with it, as we can't stably reproduce when running without it.
We've also ruled out async/await as the main culprit here-- we've reduced the test case to run our network connections in tasks and still get the fault.
Created attachment 3903 [details]
Logcat from test case
Created attachment 3904 [details]
Simplified test case
Causes stable crash when the debugger is attached. Test case does not reproduce crash without the debugger.
I"m unable to reproduce the crash in the debugger with 184.108.40.2067139499, so I hope/assume that it will be fixed in the next beta release.
I suspect that this is a dup of Bug #11858 (same assert).