Bug 11322 - unmanaged crash in object.__icall_wrapper_mono_gc_alloc_vector: "no object of size 1077429032"
Summary: unmanaged crash in object.__icall_wrapper_mono_gc_alloc_vector: "no object of...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: GC ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-03-21 11:54 UTC by Andres G. Aragoneses
Modified: 2016-11-28 15:34 UTC (History)
6 users (show)

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


Attachments
gc_alloc_vector Stacktrace (16.76 KB, text/plain)
2016-11-25 08:45 UTC, Hieu Nhu
Details


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 Andres G. Aragoneses 2013-03-21 11:54:16 UTC
I guess this is not going to be 100% reproducible, but filing a bug is better than nothing.

I was using: MonoDevelop master (as of yesterday), Mono JIT compiler version 3.0.8 (master/0d3d43f Thu Mar 14 12:58:38 GMT 2013).

The error:

no object of size 1077429032

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr) <IL 0x0000f, 0xffffffff>
  at (wrapper alloc) object.AllocVector (intptr,intptr) <IL 0x0007a, 0xffffffff>
  at ICSharpCode.NRefactory.CSharp.Resolver.OverloadResolution/Candidate..ctor (ICSharpCode.NRefactory.TypeSystem.IParameterizedMember,bool) [0x00059] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs:113
  at ICSharpCode.NRefactory.CSharp.Resolver.OverloadResolution.AddCandidate (ICSharpCode.NRefactory.TypeSystem.IParameterizedMember,ICSharpCode.NRefactory.CSharp.Resolver.OverloadResolutionErrors) [0x00012] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs:224
  at ICSharpCode.NRefactory.CSharp.Resolver.OverloadResolution.AddCandidate (ICSharpCode.NRefactory.TypeSystem.IParameterizedMember) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs:207
  at ICSharpCode.NRefactory.CSharp.Resolver.OverloadResolution.AddMethodLists (System.Collections.Generic.IList`1<ICSharpCode.NRefactory.CSharp.Resolver.MethodListWithDeclaringType>) [0x00086] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/OverloadResolution.cs:314
  at ICSharpCode.NRefactory.CSharp.Resolver.MethodGroupResolveResult.PerformOverloadResolution (ICSharpCode.NRefactory.TypeSystem.ICompilation,ICSharpCode.NRefactory.Semantics.ResolveResult[],string[],bool,bool,bool,bool,ICSharpCode.NRefactory.CSharp.Resolver.CSharpConversions) [0x0004c] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/MethodGroupResolveResult.cs:238
  at ICSharpCode.NRefactory.CSharp.Resolver.CSharpResolver.ResolveInvocation (ICSharpCode.NRefactory.Semantics.ResolveResult,ICSharpCode.NRefactory.Semantics.ResolveResult[],string[],bool) [0x00207] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs:1961
  at ICSharpCode.NRefactory.CSharp.Resolver.CSharpResolver.ResolveInvocation (ICSharpCode.NRefactory.Semantics.ResolveResult,ICSharpCode.NRefactory.Semantics.ResolveResult[],string[]) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpResolver.cs:2011
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.ResolveInvocationOnGivenTarget (ICSharpCode.NRefactory.Semantics.ResolveResult,ICSharpCode.NRefactory.CSharp.InvocationExpression) [0x00010] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:1919
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<ICSharpCode.NRefactory.Semantics.ResolveResult>.VisitInvocationExpression (ICSharpCode.NRefactory.CSharp.InvocationExpression) [0x00113] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:1901
  at ICSharpCode.NRefactory.CSharp.InvocationExpression.AcceptVisitor<T> (ICSharpCode.NRefactory.CSharp.IAstVisitor`1<T>) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/InvocationExpression.cs:60
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.Scan (ICSharpCode.NRefactory.CSharp.AstNode) [0x000d0] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:176
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.ScanChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x0000e] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:270
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.HandleConditionStatement (ICSharpCode.NRefactory.CSharp.Statement) [0x00086] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:3002
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.ICSharpCode.NRefactory.CSharp.IAstVisitor<ICSharpCode.NRefactory.Semantics.ResolveResult>.VisitIfElseStatement (ICSharpCode.NRefactory.CSharp.IfElseStatement) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:2973
  at ICSharpCode.NRefactory.CSharp.IfElseStatement.AcceptVisitor<T> (ICSharpCode.NRefactory.CSharp.IAstVisitor`1<T>) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/IfElseStatement.cs:78
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.Scan (ICSharpCode.NRefactory.CSharp.AstNode) [0x000d0] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:176
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor/<GetResolveResult>c__AnonStoreyDC.<>m__1B3 () [0x00033] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:454
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.ResetContext (ICSharpCode.NRefactory.CSharp.Resolver.CSharpResolver,System.Action) [0x0002c] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:131
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.GetResolveResult (ICSharpCode.NRefactory.CSharp.AstNode) [0x00060] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:449
  at ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver.Resolve (ICSharpCode.NRefactory.CSharp.AstNode,System.Threading.CancellationToken) [0x0004d] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpAstResolver.cs:167
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitIdentifierExpression (ICSharpCode.NRefactory.CSharp.IdentifierExpression) [0x00008] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:290
  at ICSharpCode.NRefactory.CSharp.IdentifierExpression.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IdentifierExpression.cs:74
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00015] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00019] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:284
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitMemberReferenceExpression (ICSharpCode.NRefactory.CSharp.MemberReferenceExpression) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:454
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitMemberReferenceExpression (ICSharpCode.NRefactory.CSharp.MemberReferenceExpression) <0x00027>
  at ICSharpCode.NRefactory.CSharp.MemberReferenceExpression.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/MemberReferenceExpression.cs:100
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00015] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00019] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:284
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitInvocationExpression (ICSharpCode.NRefactory.CSharp.InvocationExpression) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:444
  at ICSharpCode.NRefactory.CSharp.InvocationExpression.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/InvocationExpression.cs:55
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00015] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00019] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:284
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitIfElseStatement (ICSharpCode.NRefactory.CSharp.IfElseStatement) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:309
  at ICSharpCode.NRefactory.CSharp.IfElseStatement.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/IfElseStatement.cs:73
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00015] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00019] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:284
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitIfElseStatement (ICSharpCode.NRefactory.CSharp.IfElseStatement) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:309
  at ICSharpCode.NRefactory.CSharp.IfElseStatement.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/IfElseStatement.cs:73
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00015] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00019] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:284
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitIfElseStatement (ICSharpCode.NRefactory.CSharp.IfElseStatement) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:309
  at ICSharpCode.NRefactory.CSharp.IfElseStatement.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/IfElseStatement.cs:73
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00015] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00019] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:284
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitIfElseStatement (ICSharpCode.NRefactory.CSharp.IfElseStatement) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:309
  at ICSharpCode.NRefactory.CSharp.IfElseStatement.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/IfElseStatement.cs:73
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00015] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00019] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:284
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:244
  at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs:129
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00015] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00019] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:284
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitMethodDeclaration (ICSharpCode.NRefactory.CSharp.MethodDeclaration) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:209
  at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/MethodDeclaration.cs:80
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00015] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00019] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:284
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:134
  at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs:107
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00015] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00019] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:284
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:129
  at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs:118
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00015] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode) [0x00019] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:284
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:49
  at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor) [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs:140
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode/<HandleDocumentParsed>c__AnonStorey1A.<>m__0 () [0x00032] in /home/andres1210/Code/system_mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:151
  at System.Threading.Tasks.TaskActionInvoker/ActionInvoke.Invoke (System.Threading.Tasks.Task,object,System.Threading.Tasks.Task) [0x00000] in /home/andres1210/Code/system_mono/mono/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:70
  at System.Threading.Tasks.Task.InnerInvoke () [0x00028] in /home/andres1210/Code/system_mono/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:519
  at System.Threading.Tasks.Task.ThreadStart () [0x00097] in /home/andres1210/Code/system_mono/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:418
  at System.Threading.Tasks.Task.Execute () [0x00000] in /home/andres1210/Code/system_mono/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:483
  at System.Threading.Tasks.TpScheduler.TaskExecuterCallback (object) [0x00000] in /home/andres1210/Code/system_mono/mono/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs:58
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <IL 0x00052, 0xffffffff>

Native stacktrace:

	monodevelop() [0x4a7ba1]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x2b66e13f6cb0]
	/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x2b66e163a425]
	/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x2b66e163db8b]
	monodevelop() [0x624f3d]
	monodevelop() [0x624fd2]
	monodevelop() [0x5ccd2b]
	monodevelop() [0x5d0544]
	monodevelop() [0x5e7938]
	monodevelop() [0x5e8aa9]
	monodevelop() [0x5c5c97]
	monodevelop() [0x5cb636]
	monodevelop() [0x5cbbf8]
	monodevelop() [0x5e1caa]
	monodevelop() [0x5e1dab]
	[0x4038d2e0]

Debug info from gdb:

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No threads.

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

make[1]: *** [runmd-sgen] Aborted (core dumped)
make[1]: Leaving directory `/home/andres1210/Code/system_mono/monodevelop/main'
make: *** [run] Error 2
Comment 1 Andres G. Aragoneses 2013-03-21 11:56:45 UTC
Oh, maybe this is a dupe of bug 8668
Comment 2 Mark Probst 2013-03-21 17:01:30 UTC
These are almost certainly unrelated.  How do you reproduce the bug?
Comment 3 Andres G. Aragoneses 2013-03-21 18:10:28 UTC
I don't remember how I reproduced it, was at an insane refactoring spree... maybe I just hit "Build", or double-clicked on a build error, etc. Been using MonoDevelop for about 4 hours after this crash and didn't happen again. Sorry that I cannot be of much help :(
Comment 4 Andres G. Aragoneses 2013-04-03 10:19:32 UTC
Had this crash again, and this time I know what MonoDevelop was doing when it happened: it was simply loading the solution after I told it to open Banshee SLN file (https://git.gnome.org/browse/banshee/tree/Banshee.sln?h=gtk3).

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr) <IL 0x0000f, 0xffffffff>
  at (wrapper alloc) object.AllocVector (intptr,intptr) <IL 0x0007a, 0xffffffff>
  at ICSharpCode.NRefactory.Utils.FastSerializer.Deserialize (System.IO.BinaryReader) [0x00029] in /home/andres1210/Code/system_mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory/Utils/FastSerializer.cs:865
  at MonoDevelop.Ide.TypeSystem.TypeSystemService.DeserializeObject<T> (string) [0x00031] in /home/andres1210/Code/system_mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs:578
  at MonoDevelop.Ide.TypeSystem.TypeSystemService/ProjectContentWrapper/LazyProjectLoader.LoadProjectCache (MonoDevelop.Projects.Project) [0x00026] in /home/andres1210/Code/system_mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs:1033
  at MonoDevelop.Ide.TypeSystem.TypeSystemService/ProjectContentWrapper/LazyProjectLoader/<LazyProjectLoader>c__AnonStoreyF5.<>m__21A () [0x00001] in /home/andres1210/Code/system_mono/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs:1011
  at System.Threading.Tasks.TaskActionInvoker/FuncInvoke`1.Invoke (System.Threading.Tasks.Task,object,System.Threading.Tasks.Task) [0x00000] in /home/andres1210/Code/system_mono/mono/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:241
  at System.Threading.Tasks.Task.InnerInvoke () [0x00028] in /home/andres1210/Code/system_mono/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:519
  at System.Threading.Tasks.Task.ThreadStart () [0x00097] in /home/andres1210/Code/system_mono/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:418
  at System.Threading.Tasks.Task.Execute () [0x00000] in /home/andres1210/Code/system_mono/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:483
  at System.Threading.Tasks.TpScheduler.TaskExecuterCallback (object) [0x00000] in /home/andres1210/Code/system_mono/mono/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs:58
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <IL 0x00052, 0xffffffff>

Native stacktrace:

	monodevelop() [0x4a7ba1]
	monodevelop() [0x4fd60f]
	monodevelop() [0x41ea17]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x2b4432532cb0]
	monodevelop() [0x5dde49]
	monodevelop() [0x5c75e9]
	monodevelop() [0x5c84c4]
	monodevelop() [0x5cbed9]
	monodevelop() [0x5da673]
	monodevelop() [0x5e1a43]
	monodevelop() [0x5e1dab]
	[0x40f9e2e0]

Debug info from gdb:

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No threads.

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

make[1]: *** [runmd-sgen] Aborted (core dumped)
make[1]: Leaving directory `/home/andres1210/Code/system_mono/monodevelop/main'
make: *** [run] Error 2
Comment 5 Andres G. Aragoneses 2013-09-18 17:34:58 UTC
(In reply to comment #2)
> These are almost certainly unrelated.  How do you reproduce the bug?

Hey Mark, sorry that I didn't yet find a way to reproduce this with MonoDevelop.

However I opened a new bug which this time I can reproduce reliably, not with MonoDevelop but Banshee. I reported it as bug 14834 and added info about the crash inside GDB, hope it is enough info! (And maybe, let's hope, it is the same bug as this?)
Comment 6 Behrooz Amoozad 2015-01-14 01:24:33 UTC
Well, I've managed to reproduce this 100%

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr) <0xffffffff>
  at (wrapper alloc) object.AllocVector (intptr,intptr) <0xffffffff>
  at Mono.Math.BigInteger..ctor (Mono.Math.BigInteger/Sign,uint) <0x0003f>
  at Mono.Math.BigInteger/ModulusRing.BarrettReduction (Mono.Math.BigInteger) <0x00097>
  at Mono.Math.BigInteger/ModulusRing.Multiply (Mono.Math.BigInteger,Mono.Math.BigInteger) <0x000ab>
  at Mono.Math.BigInteger/ModulusRing.Pow (Mono.Math.BigInteger,Mono.Math.BigInteger) <0x0009f>
  at Mono.Math.BigInteger/ModulusRing.Pow (uint,Mono.Math.BigInteger) <0x00043>
  at Mono.Math.Prime.PrimalityTests.RabinMillerTest (Mono.Math.BigInteger,Mono.Math.Prime.ConfidenceFactor) <0x000df>
  at Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase.GenerateNewPrime (int,object) <0x001ce>
  at Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase.GenerateNewPrime (int) <0x00022>
  at Mono.Math.BigInteger.GeneratePseudoPrime (int) <0x00020>
  at Mono.Security.Cryptography.RSAManaged.GenerateKeyPair () <0x00097>
  at Mono.Security.Cryptography.RSAManaged.ExportParameters (bool) <0x00057>
  at System.Security.Cryptography.RSACryptoServiceProvider.ExportParameters (bool) <0x00041>
  at System.Security.Cryptography.RSA.ToXmlString (bool) <0x00079>
  at BD2.Core.UserRepository.CreateUser (string,string,string,byte[]) <0x00428>
  at BD2.UserManagement.CLI.MainClass.Main (string[]) <0x004a3>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	/usr/bin/cli() [0x4b5ca0]
	/usr/bin/cli() [0x50edab]
	/usr/bin/cli() [0x424183]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0) [0x7fe94b1e38d0]
	/usr/bin/cli() [0x63a1e9]
	/usr/bin/cli() [0x5e44ad]
	/usr/bin/cli() [0x5f8e58]
	/usr/bin/cli() [0x607485]
	/usr/bin/cli() [0x5e239d]
	/usr/bin/cli() [0x5e2fd1]
	/usr/bin/cli() [0x5f9f44]
	/usr/bin/cli() [0x5fa154]
	[0x40ed9259]

Debug info from gdb:

Mono support loaded.
Mono support loaded.
[New LWP 4433]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fe94b1e34c9 in __libc_waitpid (pid=pid@entry=4440, stat_loc=stat_loc@entry=0x7fff3c33e24c, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
40	../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
  Id   Target Id         Frame 
  2    Thread 0x7fe948d25700 (LWP 4433) "cli" 0x00007fe94ae60482 in do_sigsuspend (set=0x98ac80 <suspend_signal_mask>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31
* 1    Thread 0x7fe94bce1780 (LWP 4431) "cli" 0x00007fe94b1e34c9 in __libc_waitpid (pid=pid@entry=4440, stat_loc=stat_loc@entry=0x7fff3c33e24c, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40

Thread 2 (Thread 0x7fe948d25700 (LWP 4433)):
#0  0x00007fe94ae60482 in do_sigsuspend (set=0x98ac80 <suspend_signal_mask>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31
#1  __GI___sigsuspend (set=set@entry=0x98ac80 <suspend_signal_mask>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:45
#2  0x00000000005d8c5c in suspend_thread (context=0x7fe948d24840, info=0x7fe9440008c0) at sgen-os-posix.c:113
#3  suspend_handler (sig=<optimized out>, siginfo=<optimized out>, context=0x7fe948d24840) at sgen-os-posix.c:131
#4  <signal handler called>
#5  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:84
#6  0x00000000006371d6 in mono_sem_wait (sem=sem@entry=0x98a680 <finalizer_sem>, alertable=alertable@entry=1) at mono-semaphore.c:119
#7  0x00000000005af5d4 in finalizer_thread (unused=unused@entry=0x0) at gc.c:1073
#8  0x000000000059178b in start_wrapper_internal (data=0x163f860) at threads.c:643
#9  start_wrapper (data=0x163f860) at threads.c:688
#10 0x000000000062ba1d in thread_start_routine (args=args@entry=0x15c2448) at wthreads.c:294
#11 0x000000000063bd93 in inner_start_thread (arg=0x163f700) at mono-threads-posix.c:49
#12 0x00007fe94b1dc0a4 in start_thread (arg=0x7fe948d25700) at pthread_create.c:309
#13 0x00007fe94af10ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7fe94bce1780 (LWP 4431)):
#0  0x00007fe94b1e34c9 in __libc_waitpid (pid=pid@entry=4440, stat_loc=stat_loc@entry=0x7fff3c33e24c, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
#1  0x00000000004b5d3d in mono_handle_native_sigsegv (signal=signal@entry=11, ctx=ctx@entry=0x7fff3c33eb80) at mini-exceptions.c:2299
#2  0x000000000050edab in mono_arch_handle_altstack_exception (sigctx=sigctx@entry=0x7fff3c33eb80, fault_addr=<optimized out>, stack_ovf=stack_ovf@entry=0) at exceptions-amd64.c:908
#3  0x0000000000424183 in mono_sigsegv_signal_handler (_dummy=7, info=0x7fff3c33ecb0, context=0x7fff3c33eb80) at mini.c:6769
#4  <signal handler called>
#5  alloc_from_active_or_partial (heap=0x98b850 <allocators+16>) at lock-free-alloc.c:390
#6  mono_lock_free_alloc (heap=0x98b850 <allocators+16>) at lock-free-alloc.c:455
#7  0x00000000005e44ad in sgen_alloc_internal (type=<optimized out>) at sgen-internal.c:163
#8  0x00000000005f8e58 in sgen_hash_table_replace (hash_table=0x9803c0 <minor_finalizable_hash>, key=0x7fe94a1befa8, new_value=0x0, old_value=0x0) at sgen-hash-table.c:115
#9  0x0000000000607485 in process_stage_entries (next_entry=0x99ba80 <next_fin_stage_entry>, entries=<optimized out>, process_func=0x6072d0 <process_fin_stage_entry>, num_entries=1024) at sgen-fin-weak-hash.c:374
#10 0x00000000005e239d in collect_nursery (unpin_queue=0x98b850 <allocators+16>, unpin_queue@entry=0x0, finish_up_concurrent_mark=4121, finish_up_concurrent_mark@entry=0) at sgen-gc.c:2578
#11 0x00000000005e2fd1 in collect_nursery (finish_up_concurrent_mark=0, unpin_queue=0x0) at sgen-gc.c:3528
#12 sgen_perform_collection (requested_size=4096, generation_to_collect=0, reason=0x713cdc "Nursery full", wait_to_finish=0) at sgen-gc.c:3483
#13 0x00000000005f9f44 in mono_gc_alloc_obj_nolock (vtable=vtable@entry=vtable("System.UInt32[]"), size=size@entry=296) at sgen-alloc.c:288
#14 0x00000000005fa154 in mono_gc_alloc_vector (vtable=vtable("System.UInt32[]"), size=296, max_length=66) at sgen-alloc.c:491
#15 0x0000000040ed9259 in ?? ()
#16 0x00000000016358c0 in ?? ()
#17 0x00007fff3c33f4a0 in ?? ()
#18 0x00007fe94a019188 in ?? ()
#19 0x00007fff3c33f470 in ?? ()
#20 0x00007fff3c33f3d0 in ?? ()
#21 0x00007fe94bce1770 in ?? ()
#22 0x0000000000000128 in ?? ()
#23 0x00000000018f4908 in ?? ()
#24 0x0000000000000042 in ?? ()
#25 0x0000000040ed10e8 in ?? ()
#26 0x00007fe94a0192b0 in ?? ()
#27 0x00007fe94bce1770 in ?? ()
#28 0x0000000000000120 in ?? ()
#29 0x00000000018f4908 in ?? ()
#30 0x0000000000000020 in ?? ()
#31 0x00000000000002f5 in ?? ()
#32 0x00007fe94a3ecbf0 in ?? ()
#33 0x00007fe94a30ed30 in ?? ()
#34 0x00007fe94a019168 in ?? ()
#35 0x0000000000000042 in ?? ()
#36 0x00007fff3c33f520 in ?? ()
#37 0x00000000409cce30 in ?? ()
#38 0x00007fe94a30ed30 in ?? ()
#39 0x00007fe94a3ecbf0 in ?? ()
#40 0x00007fe94a30ed30 in ?? ()
#41 0x00007fe94a30ed30 in ?? ()
#42 0x00007fe94a3ecbf0 in ?? ()
#43 0x00000000409cf568 in ?? ()
#44 0x00007fe94a3e9b38 in ?? ()
#45 0x00007fe94a3ecbf0 in ?? ()
#46 0x00007fe94a3e9b38 in ?? ()
#47 0x00007fe94a3e9b38 in ?? ()
#48 0x0000000000000042 in ?? ()
#49 0x00007fe94a019168 in ?? ()
#50 0x000000210000001f in ?? ()
#51 0x00007fe94a1c44e0 in ?? ()
#52 0x00007fe94a30ed30 in ?? ()
#53 0x0000000000000040 in ?? ()
#54 0x00000000000002f5 in ?? ()
#55 0x00007fe94a30ed30 in ?? ()
#56 0x00007fe94a3e9b38 in ?? ()
#57 0x00007fe94a3e9b38 in ?? ()
#58 0x00007fe94a3d46d8 in ?? ()
#59 0x00000000409cf0cc in ?? ()
#60 0x00007fe94a3e9b38 in ?? ()
#61 0x00007fe94a30ed30 in ?? ()
#62 0x00007fe94a30f1a0 in ?? ()
#63 0x00007fe94a30ec68 in ?? ()
#64 0x0000000000000000 in ?? ()

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

It happens with unrelated memory allocations after I open a memory mapped file for the second time.

Source code is available @ https://github.com/Behrooz-Amoozad/BD2
To reproduce:
Use the BD2.UserManagement.CLI to create 2 users
the second user requires the files to be expanded which in turn closes the memory mapped file, resizes it and reopens it. and then the bug triggers.
Comment 7 Behrooz Amoozad 2015-01-14 02:08:08 UTC
sorry I forgot to put the exact commands required to reproduce the bug:

behrooz@bz:/Projects/Behrooz/bin$ ./BD2.UserManagement.CLI.exe 
Command> Open       
path /mnt/Behrooz/Users
Reading KeyValueStores
Done
Command> CreateAdmin
name Behrooz Amoozad
Password 1234
Pepper Rp5scGko9WJHWIcCd38Qj0r30qX40RD7sDFkFCqW0Dg=                                                   
User ID: 75 E7 53 8E F5 2E A9 94 1F 4A 62 DC 55 C8 44 3A 14 FE 9E 88 FE 83 22 A6 77 C9 9E 2B 4F 6D 8B 3D
Command> Create
name Test
Password 1234
Pepper Rp5scGko9WJHWIcCd38Qj0r30qX40RD7sDFkFCqW0Dg=
Parent 75 E7 53 8E F5 2E A9 94 1F 4A 62 DC 55 C8 44 3A 14 FE 9E 88 FE 83 22 A6 77 C9 9E 2B 4F 6D 8B 3D
User ID: B1 51 6F 61 BC F5 05 CF 48 BB 5D 0D 46 BB EE 03 BE BD 92 34 4E 4F 24 5E B5 DA 43 48 62 4C 30 75
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr) <0xffffffff>
  at (wrapper alloc) object.AllocVector (intptr,intptr) <0xffffffff>
  at Mono.Math.BigInteger..ctor (Mono.Math.BigInteger/Sign,uint) <0x0003f>
Comment 8 Andres G. Aragoneses 2015-01-14 07:10:59 UTC
Behrooz, what version of mono are you using?
Comment 9 Behrooz Amoozad 2015-01-14 21:37:24 UTC
Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-9)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen

Linux bz 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt2-1 (2014-12-08) x86_64 GNU/Linux
Comment 10 Behrooz Amoozad 2015-01-15 01:23:43 UTC
Finally found the reason, it was a bug in my code, but still I think it can be avoided with a few tweaks in mono.

There was something in the code that stopped the file from getting resized.
Which means I would still have a 16KiB block instead of the 24KiB I thought I had and when I tried to write on it, I was writing on GC internal stuff. kaboom.
Can't we have the option to specify the offset to allocate unmanaged memory from?
or shouldn't GC allocate it's memory on a far far away offset?

The same code works just fine under windows with either .net framework 4/4.5
I know it shouldn't, but it does
Comment 11 Behrooz Amoozad 2015-01-15 01:38:47 UTC
or alternatively, can't the CreateViewStream Method simply check file length? 
If there's anything or any test I can run just ask, I'd like to see this fixed.

anyway, I gave up memory mapped files, can't trust it for database backend, at least for now.
Comment 12 Andres G. Aragoneses 2015-01-15 04:03:20 UTC
>The same code works just fine under windows with either .net framework 4/4.5

If it works in .NET, it should work in Mono. Please attach a minimal testcase that reproduces the problem.
Comment 13 Behrooz Amoozad 2015-01-15 04:37:02 UTC
This is almost the same as my original code.
It still corrupts the memory, makes the program go kaboom but doesn't raise the flag in the memory allocator.

using System.IO;

namespace MonoBug11322
{
	public static class Program
	{
		const string fileName = "MonoBug11322.TestFile";

		static void Test ()
		{
			System.IO.MemoryMappedFiles.MemoryMappedFile mmf;
			mmf = System.IO.MemoryMappedFiles.MemoryMappedFile.CreateFromFile (fileName);
			var va = mmf.CreateViewAccessor (8192, 8192);
			for (int n = 0; n != 8192; n++) {
				va.Write (n, (byte)255);
			}
			va.Flush ();
			mmf.Dispose ();
		}

		public static void Main ()
		{
			FileStream fileStream;
			fileStream = File.Open (fileName, FileMode.OpenOrCreate);
			fileStream.SetLength (8192);
			fileStream.Close ();
			while (true)
				Test ();
		}
	}
}


Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal.StructureToPtr (object,intptr,bool) <IL 0x0000f, 0xffffffff>
  at System.Runtime.InteropServices.Marshal.StructureToPtr<byte> (byte,intptr,bool) [0x00000] in /tmp/buildd/mono-3.2.8+dfsg/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs:1139
  at System.Runtime.InteropServices.SafeBuffer.Write<byte> (ulong,byte) [0x00053] in /tmp/buildd/mono-3.2.8+dfsg/mcs/class/corlib/System.Runtime.InteropServices/SafeBuffer.cs:143
  at System.IO.UnmanagedMemoryAccessor.Write (long,byte) [0x00035] in /tmp/buildd/mono-3.2.8+dfsg/mcs/class/corlib/System.IO/UnmanagedMemoryAccessor.cs:305
  at MonoBug11322.Program.Test () [0x0002f] in /home/behrooz/MonoBug11322/MonoBug11322/Program.cs:17
  at MonoBug11322.Program.Main () [0x00020] in /home/behrooz/MonoBug11322/MonoBug11322/Program.cs:30
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <IL 0x0004c, 0xffffffff>

Native stacktrace:

	/usr/bin/mono() [0x4b5ca0]
	/usr/bin/mono() [0x50edab]
	/usr/bin/mono() [0x424183]
	/lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0) [0x7f872f7b88d0]
	/usr/bin/mono() [0x50dd50]
	[0x4022bdae]

Debug info from gdb:

Mono support loaded.
Mono support loaded.
[New LWP 14467]
[New LWP 14466]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f872f7b84c9 in __libc_waitpid (pid=pid@entry=14471, stat_loc=stat_loc@entry=0x7f87302cf18c, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
40	../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
  Id   Target Id         Frame 
  3    Thread 0x7f872d273700 (LWP 14466) "mono" sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
  2    Thread 0x7f872d072700 (LWP 14467) "mono" 0x00007f872f7b7ddb in __libc_recv (fd=fd@entry=3, buf=buf@entry=0x7f872d071d30, n=n@entry=11, flags=-1, flags@entry=0) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:33
* 1    Thread 0x7f87302b6780 (LWP 14464) "mono" 0x00007f872f7b84c9 in __libc_waitpid (pid=pid@entry=14471, stat_loc=stat_loc@entry=0x7f87302cf18c, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40

Thread 3 (Thread 0x7f872d273700 (LWP 14466)):
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1  0x00000000006371d6 in mono_sem_wait (sem=sem@entry=0x98a680 <finalizer_sem>, alertable=alertable@entry=1) at mono-semaphore.c:119
#2  0x00000000005af5d4 in finalizer_thread (unused=unused@entry=0x0) at gc.c:1073
#3  0x000000000059178b in start_wrapper_internal (data=0xb41280) at threads.c:643
#4  start_wrapper (data=0xb41280) at threads.c:688
#5  0x000000000062ba1d in thread_start_routine (args=args@entry=0xabc5e8) at wthreads.c:294
#6  0x000000000063bd93 in inner_start_thread (arg=0xb41390) at mono-threads-posix.c:49
#7  0x00007f872f7b10a4 in start_thread (arg=0x7f872d273700) at pthread_create.c:309
#8  0x00007f872f4e5ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f872d072700 (LWP 14467)):
#0  0x00007f872f7b7ddb in __libc_recv (fd=fd@entry=3, buf=buf@entry=0x7f872d071d30, n=n@entry=11, flags=-1, flags@entry=0) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:33
#1  0x00000000004e00d6 in recv (__flags=0, __n=11, __buf=0x7f872d071d30, __fd=3) at /usr/include/x86_64-linux-gnu/bits/socket2.h:44
#2  socket_transport_recv (buf=0x7f872d071d30, len=11) at debugger-agent.c:1085
#3  0x00000000004e3026 in transport_recv (len=11, buf=0x7f872d071d30) at debugger-agent.c:1475
#4  debugger_thread (arg=<optimized out>) at debugger-agent.c:9139
#5  0x000000000062ba1d in thread_start_routine (args=args@entry=0xabc6b0) at wthreads.c:294
#6  0x000000000063bd93 in inner_start_thread (arg=0xb42d00) at mono-threads-posix.c:49
#7  0x00007f872f7b10a4 in start_thread (arg=0x7f872d072700) at pthread_create.c:309
#8  0x00007f872f4e5ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f87302b6780 (LWP 14464)):
#0  0x00007f872f7b84c9 in __libc_waitpid (pid=pid@entry=14471, stat_loc=stat_loc@entry=0x7f87302cf18c, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
#1  0x00000000004b5d3d in mono_handle_native_sigsegv (signal=signal@entry=11, ctx=ctx@entry=0x7f87302cfac0) at mini-exceptions.c:2299
#2  0x000000000050edab in mono_arch_handle_altstack_exception (sigctx=sigctx@entry=0x7f87302cfac0, fault_addr=<optimized out>, stack_ovf=stack_ovf@entry=0) at exceptions-amd64.c:908
#3  0x0000000000424183 in mono_sigsegv_signal_handler (_dummy=11, info=0x7f87302cfbf0, context=0x7f87302cfac0) at mini.c:6769
#4  <signal handler called>
#5  altstack_handle_and_restore (sigctx=0x7fffae250dc0, obj=0x0, stack_ovf=0) at exceptions-amd64.c:883
#6  0x000000004022bdae in ?? ()
#7  0x0000000000000004 in ?? ()
#8  0x0000000000000034 in ?? ()
#9  0x0000000000000000 in ?? ()

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Comment 14 Behrooz Amoozad 2015-01-15 05:11:19 UTC
I searched around and turns out .net resizes the file "on demand".
Comment 15 Andres G. Aragoneses 2015-01-15 05:13:59 UTC
> This is almost the same as my original code.

But this sample doesn't throw the same error message as the title of this bug, so maybe it's another bug?

> I searched around and turns out .net resizes the file "on demand".

I know that MemoryMappedFiles have received many changes recently, so do you mind testing with mono 3.12 instead?
Comment 16 Behrooz Amoozad 2015-01-15 08:31:45 UTC
It could be the same bug since I got the same stack trace a few times while debugging the original bug a couple weeks ago.
the bounds checking is so broken/missing, I read the source code for every class remotely related to memory mapped files or memory access and couldn't find a single 'if(offset+count<length)', not one.

I'm downloading mono 3.12 source code, will report back in a few hours.
Comment 17 Behrooz Amoozad 2015-01-17 10:32:36 UTC
I downloaded the git repository, tried with a few versions, no difference in the minimal sample which means without a doubt the original code with the bug will fail too.
Comment 18 Vlad Brezae 2015-01-20 13:56:40 UTC
Hello Behrooz

Thanks for the effort put into investigating this issue. I've addressed this problem with a pull request a few days ago, although it hasn't been merged yet. You can check it out on this link [1] and feel free to test it out if you want.

https://github.com/mono/mono/pull/1510
Comment 19 Behrooz Amoozad 2015-01-22 09:49:37 UTC
Thank you, I'll check again in a few days to see how it works.
Comment 20 Hieu Nhu 2016-11-25 08:45:11 UTC
Created attachment 18666 [details]
gc_alloc_vector Stacktrace

Hi, I just updated XF to 2.3.3.168
Once in a while when calling ModernHttp component, this bug occurred. Meanwhile if it was built with Cycle 7 Visual Studio then this bug never occur. Only happens on android.

Please help me look into this as I cannot update the app with this bug to my stable releases.
Thank you in advance for the support.
Comment 21 Vlad Brezae 2016-11-28 15:34:37 UTC
Hello, Hieu

Does this crash happen on different types of devices ? Does it matter if it is arm/arm64 ? Unfortunately the managed stack trace is not useful since the app seems to crash inside unmanaged code, probably within the GC. Is it possible to provide a repro for the crash ?

This crash doesn't seem related to the original bug report which seems to have been fixed. I'm closing this bug report. Please open a separate bug report for the android crash and assign it to me.