[Mono-bugs] [Bug 463323] New: Something around System.Runtime. CompilerServices sometimes fails.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 2 14:34:50 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=463323


           Summary: Something around System.Runtime.CompilerServices
                    sometimes fails.
           Product: Mono: Compilers
           Version: SVN
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jan.oravec at 6com.sk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Sorry for very vague bug report, but it's very hard to get more relevant
information, as the bug appears unpredictably once per ~100 runs (on exactly
same workload) and the application where the bug appears is quite complex. I am
willing to actively help tracking down this bug, just I am not sure where to
look at.

Application:

- ASP.NET application, service-oriented middleware, inversion of control
service binding through System.Activator, huge usage of anonymous functions and
lambda expressions, mostly through LINQ to NHibernate to Npgsql, while
NHibernate uses dynamic proxy over queried objects, no usage of unmanaged code.

The bug exposes itself when doing LINQ query. I have seen 2 kinds of
exceptions:

1. more probable one:

Unable to cast System.Runtime.CompilerServices.ExecutionScope to type of
queried object. (I do not have this exception around now, I will add it when I
encounter it next time).

2.

System.MissingMethodException: No constructor found for
System.Runtime.CompilerServices.StrongBox`1[[Sixcom.Impress.Business.Services.SessionManagement+<SignIn>c__AnonStorey4,
Sixcom.Impress.Business, Version=1.0.3289.35565, Culture=neutral,
PublicKeyToken=null]]::.ctor(Sixcom.Impress.Business.Services.SessionManagement+<SignIn>c__AnonStorey4)
  at System.Activator.CreateInstance (System.Type type, BindingFlags
bindingAttr, System.Reflection.Binder binder, System.Object[] args,
System.Globalization.CultureInfo culture, System.Object[] activationAttributes)
[0x00000] 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args,
System.Object[] activationAttributes) [0x00000] 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args)
[0x00000] 
  at System.Linq.Expressions.EmitContext.CreateStrongBox (System.Object value,
System.Type type) [0x00000] 
  at System.Linq.Expressions.EmitContext.AddGlobal (System.Object value,
System.Type type) [0x00000] 
  at System.Linq.Expressions.EmitContext.EmitReadGlobal (System.Object global,
System.Type type) [0x00000] 
  at System.Linq.Expressions.EmitContext.EmitReadGlobal (System.Object global)
[0x00000] 
  at System.Linq.Expressions.ConstantExpression.<Emit>m__72
(System.Linq.Expressions.EmitContext c) [0x00000] 
  at System.Linq.Expressions.ConstantExpression.EmitIfNotNull
(System.Linq.Expressions.EmitContext ec, System.Action`1 emit) [0x00000] 
  at System.Linq.Expressions.ConstantExpression.Emit
(System.Linq.Expressions.EmitContext ec) [0x00000] 
  at System.Linq.Expressions.EmitContext.Emit
(System.Linq.Expressions.Expression expression) [0x00000] 
  at System.Linq.Expressions.EmitContext.EmitLoadSubject
(System.Linq.Expressions.Expression expression) [0x00000] 
  at System.Linq.Expressions.MemberExpression.EmitFieldAccess
(System.Linq.Expressions.EmitContext ec, System.Reflection.FieldInfo field)
[0x00000] 
  at System.Linq.Expressions.MemberExpression+<Emit>c__AnonStorey44.<>m__77
(System.Reflection.FieldInfo field) [0x00000] 
  at System.Linq.Expressions.Extensions.OnFieldOrProperty
(System.Reflection.MemberInfo self, System.Action`1 onfield, System.Action`1
onprop) [0x00000] 
  at System.Linq.Expressions.MemberExpression.Emit
(System.Linq.Expressions.EmitContext ec) [0x00000] 
  at System.Linq.Expressions.LambdaExpression.EmitBody
(System.Linq.Expressions.EmitContext ec) [0x00000] 
  at System.Linq.Expressions.EmitContext.Emit () [0x00000] 
  at System.Linq.Expressions.CompilationContext.AddCompilationUnit
(System.Linq.Expressions.LambdaExpression lambda) [0x00000] 
  at System.Linq.Expressions.LambdaExpression.Compile () [0x00000] 
  at NHibernate.Linq.Visitors.Evaluator+SubtreeEvaluator.Evaluate
(System.Linq.Expressions.Expression e) [0x00000] 
  at NHibernate.Linq.Visitors.Evaluator+SubtreeEvaluator.Visit
(System.Linq.Expressions.Expression exp) [0x00000] 
  at NHibernate.Linq.Visitors.ExpressionVisitor.VisitBinary
(System.Linq.Expressions.BinaryExpression b) [0x00000] 
  at NHibernate.Linq.Visitors.ExpressionVisitor.Visit
(System.Linq.Expressions.Expression exp) [0x00000] 
  at NHibernate.Linq.Visitors.Evaluator+SubtreeEvaluator.Visit
(System.Linq.Expressions.Expression exp) [0x00000] 


On each application run, it either works completely, or fails when accessing
one type of object in database. Access to other object types is unaffected.

I think either compiler is doing something nasty, something in runtime is not
initialized properly, or something other is wrong in runtime.

If you have anything what should I try to help track it down, please let me
know and I will do so.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list