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
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.
Created attachment 2243 [details]
From an email by: Yuriy Solodkyy
It looks like the ConcurrentStack does not work with big enough
structures anymore. 12 bytes struct is enough to reproduce the
problem occasionally, 16 bytes structure to reproduce it immediately.
It worked fine in mono 2.8. The following code shows that we may pop
inconsistent structure from the stack from time to time.
The sample code is available here: https://github.com/ysw/mono-socket-problem/tree/master/ConcurrentTest
Note, typically if app does not crash in the beginning it doesn't crash at all.
You need to run 8-cores to observe it quite frequently.
Environment: Linux x64
I sometimes get this when running the testcase:
System.IndexOutOfRangeException: Array index is out of range.
at (wrapper stelemref) object:virt_stelemref_class (intptr,object)
at System.Collections.Concurrent.ObjectPool`1[System.Collections.Concurrent.ConcurrentStack`1+Node[CocurrentTest.MainClass+Data]].Release (System.Collections.Concurrent.Node obj) [0x00000] in <filename unknown>:0
at System.Collections.Concurrent.ConcurrentStack`1[CocurrentTest.MainClass+Data].TryPop (CocurrentTest.Data& result) [0x00000] in <filename unknown>:0
at CocurrentTest.MainClass+<Main>c__AnonStorey0.<>m__0 (System.Object v) [0x00000] in <filename unknown>:0
at System.Threading.Thread.StartInternal () [0x00000] in <filename unknown>:0
is this the same problem you are running into ?
I can't reproduce the above issue with mono master any more.
Could have been fixed by either 2ac4d350e21a0551cd66bd1d98f121c135c12e84 or 37c812036b161b7636698ed5256c6e3b2770e063
I'll mark this as fixed since it doesn't seem to happen anymore. Don't hesitate to reopen if you still see the issue.