Bug 43493 - "How did we get to sweep a block that's being marked or being checked?" crash when launching XM app with MONO_GC_DEBUG=verify-before-collections
Summary: "How did we get to sweep a block that's being marked or being checked?" crash...
Status: RESOLVED FIXED
Alias: None
Product: Installers
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Jon Purdy
URL:
Depends on:
Blocks:
 
Reported: 2016-08-17 21:50 UTC by Chris Hamons
Modified: 2016-09-12 21:05 UTC (History)
6 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description Chris Hamons 2016-08-17 21:50:31 UTC
While sorting out an internal customer issue, I tried launching a XM app with MONO_GC_DEBUG=verify-before-collections as suggested. 

It crashed right away, so I tried a "hello world" XM app and get the same thing:

https://gist.github.com/chamons/6e6ae4bdbb1ae0c104ca0d8b1f3e5eeb

Steps to reproduce:

- Install XM
- Xamarin Studio -> New Solution
- Mac -> App -> Cocoa App
- Build
- Launch from command line with MONO_GC_DEBUG=verify-before-collections for example:

MONO_GC_DEBUG=verify-before-collections /Users/donblas/Projects/XMTestApp/XMTestApp/bin/Debug/XMTestApp.app/Contents/MacOS/XMTestApp

- Crash and burn.

XM 2.8 gives a different crash than above (without the funny how did we get message).

https://gist.github.com/chamons/6fc95420281b29b398b18b634c3bf12f
Comment 1 Vlad Brezae 2016-09-12 20:39:35 UTC
This should be fixed on master
Comment 2 Andi McClure 2016-09-12 20:45:54 UTC
Do we need to backport it to 4.6?
Comment 3 Vlad Brezae 2016-09-12 20:53:21 UTC
My fixes weren't applying cleanly on 4.6 due to other previous changes/fixes so I didn't backport them to avoid too many changes. The bug would pop only when using these non-standard debug flags (most of which weren't even working for some time), or when using the profiler with the concurrent collector.

I'm not sure how critical these fixes are. kumpera ?
Comment 4 Rodrigo Kumpera 2016-09-12 21:05:12 UTC
They don't affect correctness of regular runs. All they do is make our lives easier when debugging sgen issues.