Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackOverflow in FSC running in Rider 2019.1 (EAP 4 or later) #6543

Closed
object opened this issue Apr 15, 2019 · 12 comments

Comments

Projects
None yet
5 participants
@object
Copy link

commented Apr 15, 2019

JetBrains Rider upgraded FCS (used internally) in 2019.1 EAP4, they build it using branch dev16.1. After that loading certain solutions cause StackOverflow exception.

Repro steps

Provide the steps required to reproduce the problem

  1. Update Rider to a version 2019.1 EAP4 or later.
  2. Fetch a project https://github.com/object/FcsStackOverflow
  3. Load the solution
  4. After the solution is loaded, JetBrains.ResharperHost crashes with StackOverlow (as written in .Rider2019.1\system\log\host1.backend-err.log).

Known workarounds

Downgrade Rider to EAP3 or earlier that uses older version of FCS.

Related information

StackDump:
https://gist.github.com/object/ed213fcb6695471879f52b643964a819

000000002d059eb0 00007ff81cc1b3a1 clr!RtlVirtualUnwind_Wrapper+0x81
000000002d059f40 00007ff7c3b0d74c (MethodDesc 00007ff7c2db29b8 +0x4c FSharp.Compiler.TypeChecker.TcExpr(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db29c8 +0 FSharp.Compiler.TypeChecker.TcExprNoRecover(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr))
000000002d059fd0 00007ff7c3ba0d3f (MethodDesc 00007ff7c2db29a8 +0xdf FSharp.Compiler.TypeChecker.TcExprFlex(cenv, Boolean, Boolean, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db29b8 +0 FSharp.Compiler.TypeChecker.TcExpr(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr))
000000002d05a070 00007ff7c46020ee (MethodDesc 00007ff7c49c6578 +0x3e FSharp.Compiler.TypeChecker+TcRecordConstruction@6400-1.Invoke(SyntacticUnscopedTyparEnv, System.Tuple`4)), calling (MethodDesc 00007ff7c2db29a8 +0 FSharp.Compiler.TypeChecker.TcExprFlex(cenv, Boolean, Boolean, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr))
000000002d05a090 00007ff7c296103c (MethodDesc 00007ff7c08924d0 +0x1c Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`3[[System.__Canon, mscorlib],[System.__Canon, mscorlib],[System.__Canon, mscorlib]].Adapt(Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,System.__Canon>>)), calling clr!JIT_IsInstanceOfClass
000000002d05a0d0 00007ff7c3ae8cd7 (MethodDesc 00007ff7c41dc148 +0x157 Microsoft.FSharp.Primitives.Basics.List.mapFold[[System.__Canon, mscorlib],[System.__Canon, mscorlib],[System.__Canon, mscorlib]](Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,System.Tuple`2<System.__Canon,System.__Canon>>>, System.__Canon, Microsoft.FSharp.Collections.FSharpList`1<System.__Canon>))
000000002d05a0e0 00007ff7c082b05d (MethodDesc 00007ff7c08ff9c8 +0xdd Microsoft.FSharp.Primitives.Basics.List.filter[[System.__Canon, mscorlib]](Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,Boolean>, Microsoft.FSharp.Collections.FSharpList`1<System.__Canon>)), calling (MethodDesc 00007ff7c0ddee20 +0 Microsoft.FSharp.Primitives.Basics.List.filterToFreshConsTail[[System.__Canon, mscorlib]](Microsoft.FSharp.Collections.FSharpList`1<System.__Canon>, Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,Boolean>, Microsoft.FSharp.Collections.FSharpList`1<System.__Canon>))
000000002d05a140 00007ff7c4600372 (MethodDesc 00007ff7c2db2b28 +0x3e2 FSharp.Compiler.TypeChecker.TcRecordConstruction(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, Microsoft.FSharp.Core.FSharpOption`1>, TType, System.Collections.Generic.IEnumerable`1>, range)), calling (MethodDesc 00007ff7c41dc148 +0 Microsoft.FSharp.Primitives.Basics.List.mapFold[[System.__Canon, mscorlib],[System.__Canon, mscorlib],[System.__Canon, mscorlib]](Microsoft.FSharp.Core.FSharpFunc`2>>, System.__Canon, Microsoft.FSharp.Collections.FSharpList`1))
000000002d05a150 00007ff7c3b6a45e (MethodDesc 00007ff7c2a6b2c8 +0x39e FSharp.Compiler.Tast.NewVal(System.String, range, Microsoft.FSharp.Core.FSharpOption`1, TType, ValMutability, Boolean, Microsoft.FSharp.Core.FSharpOption`1, Accessibility, ValRecursiveScopeInfo, Microsoft.FSharp.Core.FSharpOption`1, ValBaseOrThisInfo, Microsoft.FSharp.Collections.FSharpList`1, ValInline, XmlDoc, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Microsoft.FSharp.Core.FSharpOption`1, ParentRef)), calling clr!JIT_WriteBarrier
000000002d05a210 00007ff7c3a9be9b (MethodDesc 00007ff7c2a6ad28 +0x6b FSharp.Compiler.Tast.ccuEq(CcuThunk, CcuThunk)), calling (MethodDesc 00007ff7c35ac838 +0 FSharp.Compiler.Tast+CcuThunk.get_Deref())
000000002d05a230 00007ff7c3a9b858 (MethodDesc 00007ff7c2a60560 +0xa8 FSharp.Compiler.Tastops.stripTyEqnsA(TcGlobals, Boolean, TType)), calling (MethodDesc 00007ff7c2a6b028 +0 FSharp.Compiler.Tast.primEntityRefEq(Boolean, CcuThunk, EntityRef, EntityRef))
000000002d05a290 00007ff7c3a9bcf2 (MethodDesc 00007ff7c2a6b028 +0xb2 FSharp.Compiler.Tast.primEntityRefEq(Boolean, CcuThunk, EntityRef, EntityRef)), calling (MethodDesc 00007ff7c2a6afb8 +0 FSharp.Compiler.Tast.arrayPathEq(System.String[], System.String[]))
000000002d05a310 00007ff7c3b27835 (MethodDesc 00007ff7c2a6a388 +0x15 FSharp.Compiler.Tast+EntityRef.get_IsExceptionDecl()), calling (MethodDesc 00007ff7c2a6f4f0 +0 FSharp.Compiler.Tast+Entity.get_ExceptionInfo())
000000002d05a3b0 00007ff7c45fb6d6 (MethodDesc 00007ff7c2db2c58 +0xa06 FSharp.Compiler.TypeChecker.TcRecdExpr(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, Microsoft.FSharp.Core.FSharpOption`1>>,range>>, Microsoft.FSharp.Core.FSharpOption`1>>>, Microsoft.FSharp.Collections.FSharpList`1,Microsoft.FSharp.Core.FSharpOption`1,Microsoft.FSharp.Core.FSharpOption`1>>>>, range)), calling (MethodDesc 00007ff7c2db2b28 +0 FSharp.Compiler.TypeChecker.TcRecordConstruction(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, Microsoft.FSharp.Core.FSharpOption`1>, TType, System.Collections.Generic.IEnumerable`1>, range))
000000002d05a440 00007ff7c3b147dd (MethodDesc 00007ff7c4114770 +0x9d FSharp.Compiler.NameResolution+TcResultsSinkImpl.FSharp-Compiler-NameResolution-ITypecheckResultsSink-NotifyExprHasType(pos, TType, DisplayEnv, NameResolutionEnv, AccessorDomain, range)), calling clr!JIT_WriteBarrier
000000002d05a560 00007ff7c3b10c76 (MethodDesc 00007ff7c2db2a98 +0x2176 FSharp.Compiler.TypeChecker.TcExprUndelayed(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db2c58 +0 FSharp.Compiler.TypeChecker.TcRecdExpr(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, Microsoft.FSharp.Core.FSharpOption`1>>,range>>, Microsoft.FSharp.Core.FSharpOption`1>>>, Microsoft.FSharp.Collections.FSharpList`1,Microsoft.FSharp.Core.FSharpOption`1,Microsoft.FSharp.Core.FSharpOption`1>>>>, range))
000000002d05a570 00007ff81cfff621 clr!DoCopy+0xea, calling ntdll!RtlGuardRestoreContext
000000002d05b420 00007ff81cc1b3a1 clr!RtlVirtualUnwind_Wrapper+0x81
000000002d05b4b0 00007ff7c3b0d74c (MethodDesc 00007ff7c2db29b8 +0x4c FSharp.Compiler.TypeChecker.TcExpr(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db29c8 +0 FSharp.Compiler.TypeChecker.TcExprNoRecover(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr))
000000002d05b500 00007ff7c297fde6 (MethodDesc 00007ff7c2a97918 +0x26 Microsoft.FSharp.Primitives.Basics.List.exists[[System.__Canon, mscorlib]](Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,Boolean>, Microsoft.FSharp.Collections.FSharpList`1<System.__Canon>))
000000002d05b540 00007ff7c3b91e83 (MethodDesc 00007ff7c2db2aa8 +0x4d3 FSharp.Compiler.TypeChecker.TcIteratedLambdas(cenv, Boolean, TcEnv, TType, Microsoft.FSharp.Collections.FSharpSet`1, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db29b8 +0 FSharp.Compiler.TypeChecker.TcExpr(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr))
000000002d05b580 00007ff7c3b2c039 (MethodDesc 00007ff7c42eabc8 +0xe9 Microsoft.FSharp.Collections.MapTreeModule.mapiOpt[[System.__Canon, mscorlib],[System.__Canon, mscorlib],[System.__Canon, mscorlib]](FSharpFunc`3<System.__Canon,System.__Canon,System.__Canon>, Microsoft.FSharp.Collections.MapTree`2<System.__Canon,System.__Canon>))
000000002d05b5b0 00007ff7c080fcd4 (MethodDesc 00007ff7c08b6b10 +0x54 Microsoft.FSharp.Collections.MapTree`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].NewMapOne(System.__Canon, System.__Canon)), calling clr!JIT_WriteBarrier
000000002d05b600 00007ff7c3b2bb14 (MethodDesc 00007ff7c42e9730 +0xb4 Microsoft.FSharp.Collections.FSharpMap`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].Map[[System.__Canon, mscorlib]](Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,System.__Canon>>)), calling clr!JIT_WriteBarrier
000000002d05b660 00007ff7c3b91ca4 (MethodDesc 00007ff7c2db2aa8 +0x2f4 FSharp.Compiler.TypeChecker.TcIteratedLambdas(cenv, Boolean, TcEnv, TType, Microsoft.FSharp.Collections.FSharpSet`1, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db2aa8 +0 FSharp.Compiler.TypeChecker.TcIteratedLambdas(cenv, Boolean, TcEnv, TType, Microsoft.FSharp.Collections.FSharpSet`1, SyntacticUnscopedTyparEnv, SynExpr))
000000002d05b780 00007ff7c3b0ee74 (MethodDesc 00007ff7c2db2a98 +0x374 FSharp.Compiler.TypeChecker.TcExprUndelayed(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db2aa8 +0 FSharp.Compiler.TypeChecker.TcIteratedLambdas(cenv, Boolean, TcEnv, TType, Microsoft.FSharp.Collections.FSharpSet`1, SyntacticUnscopedTyparEnv, SynExpr))
000000002d05b840 00007ff81bb2b994 (MethodDesc 00007ff81b0620e0 +0x74 System.Tuple`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].System.Collections.IStructuralComparable.CompareTo(System.Object, System.Collections.IComparer))
000000002d05b878 00007ff7c08102d6 (MethodDesc 00007ff7c0871398 +0xd6 Microsoft.FSharp.Core.LanguagePrimitives+HashCompare.GenericCompare(GenericComparer, System.Object, System.Object)), calling clr!JIT_TailCall
000000002d05b8d0 00007ff81cfff621 clr!DoCopy+0xea, calling ntdll!RtlGuardRestoreContext000000002d059eb0 00007ff81cc1b3a1 clr!RtlVirtualUnwind_Wrapper+0x81
000000002d059f40 00007ff7c3b0d74c (MethodDesc 00007ff7c2db29b8 +0x4c FSharp.Compiler.TypeChecker.TcExpr(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db29c8 +0 FSharp.Compiler.TypeChecker.TcExprNoRecover(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr))
000000002d059fd0 00007ff7c3ba0d3f (MethodDesc 00007ff7c2db29a8 +0xdf FSharp.Compiler.TypeChecker.TcExprFlex(cenv, Boolean, Boolean, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db29b8 +0 FSharp.Compiler.TypeChecker.TcExpr(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr))
000000002d05a070 00007ff7c46020ee (MethodDesc 00007ff7c49c6578 +0x3e FSharp.Compiler.TypeChecker+TcRecordConstruction@6400-1.Invoke(SyntacticUnscopedTyparEnv, System.Tuple`4)), calling (MethodDesc 00007ff7c2db29a8 +0 FSharp.Compiler.TypeChecker.TcExprFlex(cenv, Boolean, Boolean, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr))
000000002d05a090 00007ff7c296103c (MethodDesc 00007ff7c08924d0 +0x1c Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`3[[System.__Canon, mscorlib],[System.__Canon, mscorlib],[System.__Canon, mscorlib]].Adapt(Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,System.__Canon>>)), calling clr!JIT_IsInstanceOfClass
000000002d05a0d0 00007ff7c3ae8cd7 (MethodDesc 00007ff7c41dc148 +0x157 Microsoft.FSharp.Primitives.Basics.List.mapFold[[System.__Canon, mscorlib],[System.__Canon, mscorlib],[System.__Canon, mscorlib]](Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,System.Tuple`2<System.__Canon,System.__Canon>>>, System.__Canon, Microsoft.FSharp.Collections.FSharpList`1<System.__Canon>))
000000002d05a0e0 00007ff7c082b05d (MethodDesc 00007ff7c08ff9c8 +0xdd Microsoft.FSharp.Primitives.Basics.List.filter[[System.__Canon, mscorlib]](Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,Boolean>, Microsoft.FSharp.Collections.FSharpList`1<System.__Canon>)), calling (MethodDesc 00007ff7c0ddee20 +0 Microsoft.FSharp.Primitives.Basics.List.filterToFreshConsTail[[System.__Canon, mscorlib]](Microsoft.FSharp.Collections.FSharpList`1<System.__Canon>, Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,Boolean>, Microsoft.FSharp.Collections.FSharpList`1<System.__Canon>))
000000002d05a140 00007ff7c4600372 (MethodDesc 00007ff7c2db2b28 +0x3e2 FSharp.Compiler.TypeChecker.TcRecordConstruction(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, Microsoft.FSharp.Core.FSharpOption`1>, TType, System.Collections.Generic.IEnumerable`1>, range)), calling (MethodDesc 00007ff7c41dc148 +0 Microsoft.FSharp.Primitives.Basics.List.mapFold[[System.__Canon, mscorlib],[System.__Canon, mscorlib],[System.__Canon, mscorlib]](Microsoft.FSharp.Core.FSharpFunc`2>>, System.__Canon, Microsoft.FSharp.Collections.FSharpList`1))
000000002d05a150 00007ff7c3b6a45e (MethodDesc 00007ff7c2a6b2c8 +0x39e FSharp.Compiler.Tast.NewVal(System.String, range, Microsoft.FSharp.Core.FSharpOption`1, TType, ValMutability, Boolean, Microsoft.FSharp.Core.FSharpOption`1, Accessibility, ValRecursiveScopeInfo, Microsoft.FSharp.Core.FSharpOption`1, ValBaseOrThisInfo, Microsoft.FSharp.Collections.FSharpList`1, ValInline, XmlDoc, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Microsoft.FSharp.Core.FSharpOption`1, ParentRef)), calling clr!JIT_WriteBarrier
000000002d05a210 00007ff7c3a9be9b (MethodDesc 00007ff7c2a6ad28 +0x6b FSharp.Compiler.Tast.ccuEq(CcuThunk, CcuThunk)), calling (MethodDesc 00007ff7c35ac838 +0 FSharp.Compiler.Tast+CcuThunk.get_Deref())
000000002d05a230 00007ff7c3a9b858 (MethodDesc 00007ff7c2a60560 +0xa8 FSharp.Compiler.Tastops.stripTyEqnsA(TcGlobals, Boolean, TType)), calling (MethodDesc 00007ff7c2a6b028 +0 FSharp.Compiler.Tast.primEntityRefEq(Boolean, CcuThunk, EntityRef, EntityRef))
000000002d05a290 00007ff7c3a9bcf2 (MethodDesc 00007ff7c2a6b028 +0xb2 FSharp.Compiler.Tast.primEntityRefEq(Boolean, CcuThunk, EntityRef, EntityRef)), calling (MethodDesc 00007ff7c2a6afb8 +0 FSharp.Compiler.Tast.arrayPathEq(System.String[], System.String[]))
000000002d05a310 00007ff7c3b27835 (MethodDesc 00007ff7c2a6a388 +0x15 FSharp.Compiler.Tast+EntityRef.get_IsExceptionDecl()), calling (MethodDesc 00007ff7c2a6f4f0 +0 FSharp.Compiler.Tast+Entity.get_ExceptionInfo())
000000002d05a3b0 00007ff7c45fb6d6 (MethodDesc 00007ff7c2db2c58 +0xa06 FSharp.Compiler.TypeChecker.TcRecdExpr(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, Microsoft.FSharp.Core.FSharpOption`1>>,range>>, Microsoft.FSharp.Core.FSharpOption`1>>>, Microsoft.FSharp.Collections.FSharpList`1,Microsoft.FSharp.Core.FSharpOption`1,Microsoft.FSharp.Core.FSharpOption`1>>>>, range)), calling (MethodDesc 00007ff7c2db2b28 +0 FSharp.Compiler.TypeChecker.TcRecordConstruction(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, Microsoft.FSharp.Core.FSharpOption`1>, TType, System.Collections.Generic.IEnumerable`1>, range))
000000002d05a440 00007ff7c3b147dd (MethodDesc 00007ff7c4114770 +0x9d FSharp.Compiler.NameResolution+TcResultsSinkImpl.FSharp-Compiler-NameResolution-ITypecheckResultsSink-NotifyExprHasType(pos, TType, DisplayEnv, NameResolutionEnv, AccessorDomain, range)), calling clr!JIT_WriteBarrier
000000002d05a560 00007ff7c3b10c76 (MethodDesc 00007ff7c2db2a98 +0x2176 FSharp.Compiler.TypeChecker.TcExprUndelayed(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db2c58 +0 FSharp.Compiler.TypeChecker.TcRecdExpr(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, Microsoft.FSharp.Core.FSharpOption`1>>,range>>, Microsoft.FSharp.Core.FSharpOption`1>>>, Microsoft.FSharp.Collections.FSharpList`1,Microsoft.FSharp.Core.FSharpOption`1,Microsoft.FSharp.Core.FSharpOption`1>>>>, range))
000000002d05a570 00007ff81cfff621 clr!DoCopy+0xea, calling ntdll!RtlGuardRestoreContext
000000002d05b420 00007ff81cc1b3a1 clr!RtlVirtualUnwind_Wrapper+0x81
000000002d05b4b0 00007ff7c3b0d74c (MethodDesc 00007ff7c2db29b8 +0x4c FSharp.Compiler.TypeChecker.TcExpr(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db29c8 +0 FSharp.Compiler.TypeChecker.TcExprNoRecover(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr))
000000002d05b500 00007ff7c297fde6 (MethodDesc 00007ff7c2a97918 +0x26 Microsoft.FSharp.Primitives.Basics.List.exists[[System.__Canon, mscorlib]](Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,Boolean>, Microsoft.FSharp.Collections.FSharpList`1<System.__Canon>))
000000002d05b540 00007ff7c3b91e83 (MethodDesc 00007ff7c2db2aa8 +0x4d3 FSharp.Compiler.TypeChecker.TcIteratedLambdas(cenv, Boolean, TcEnv, TType, Microsoft.FSharp.Collections.FSharpSet`1, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db29b8 +0 FSharp.Compiler.TypeChecker.TcExpr(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr))
000000002d05b580 00007ff7c3b2c039 (MethodDesc 00007ff7c42eabc8 +0xe9 Microsoft.FSharp.Collections.MapTreeModule.mapiOpt[[System.__Canon, mscorlib],[System.__Canon, mscorlib],[System.__Canon, mscorlib]](FSharpFunc`3<System.__Canon,System.__Canon,System.__Canon>, Microsoft.FSharp.Collections.MapTree`2<System.__Canon,System.__Canon>))
000000002d05b5b0 00007ff7c080fcd4 (MethodDesc 00007ff7c08b6b10 +0x54 Microsoft.FSharp.Collections.MapTree`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].NewMapOne(System.__Canon, System.__Canon)), calling clr!JIT_WriteBarrier
000000002d05b600 00007ff7c3b2bb14 (MethodDesc 00007ff7c42e9730 +0xb4 Microsoft.FSharp.Collections.FSharpMap`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].Map[[System.__Canon, mscorlib]](Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,Microsoft.FSharp.Core.FSharpFunc`2<System.__Canon,System.__Canon>>)), calling clr!JIT_WriteBarrier
000000002d05b660 00007ff7c3b91ca4 (MethodDesc 00007ff7c2db2aa8 +0x2f4 FSharp.Compiler.TypeChecker.TcIteratedLambdas(cenv, Boolean, TcEnv, TType, Microsoft.FSharp.Collections.FSharpSet`1, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db2aa8 +0 FSharp.Compiler.TypeChecker.TcIteratedLambdas(cenv, Boolean, TcEnv, TType, Microsoft.FSharp.Collections.FSharpSet`1, SyntacticUnscopedTyparEnv, SynExpr))
000000002d05b780 00007ff7c3b0ee74 (MethodDesc 00007ff7c2db2a98 +0x374 FSharp.Compiler.TypeChecker.TcExprUndelayed(cenv, TType, TcEnv, SyntacticUnscopedTyparEnv, SynExpr)), calling (MethodDesc 00007ff7c2db2aa8 +0 FSharp.Compiler.TypeChecker.TcIteratedLambdas(cenv, Boolean, TcEnv, TType, Microsoft.FSharp.Collections.FSharpSet`1, SyntacticUnscopedTyparEnv, SynExpr))
000000002d05b840 00007ff81bb2b994 (MethodDesc 00007ff81b0620e0 +0x74 System.Tuple`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].System.Collections.IStructuralComparable.CompareTo(System.Object, System.Collections.IComparer))
000000002d05b878 00007ff7c08102d6 (MethodDesc 00007ff7c0871398 +0xd6 Microsoft.FSharp.Core.LanguagePrimitives+HashCompare.GenericCompare(GenericComparer, System.Object, System.Object)), calling clr!JIT_TailCall
000000002d05b8d0 00007ff81cfff621 clr!DoCopy+0xea, calling ntdll!RtlGuardRestoreContext

etc...

@auduchinok

This comment has been minimized.

Copy link
Contributor

commented Apr 15, 2019

EAP1 to EAP3 used an FCS build from dev15.9 with some of our patches applied, built at the end of 2018.
EAP4 to EAP6 use an FCS build from dev16.1 with the same modifications (except for ones that were merged as PRs to this repo in meanwhile).

Our patches are needed to make all bundled assemblies reference the same FSharp.Core and to provide some additional info in FCS APIs (e.g. few additions in Symbols API). These patches currently do not modify type checking process, thus, I assume they should not be the source of the STOFL.

@cartermp

This comment has been minimized.

Copy link
Collaborator

commented Apr 15, 2019

@object Two questions:

  • Does the solution also do this in VS? i.e., load -> crash
  • Is the solution all .NET SDK, all non-.NET SDK, or a mix?
@pmbanka

This comment has been minimized.

Copy link

commented Apr 15, 2019

@cartermp I'm working on the same solution

  1. Yes it could not load for me in latest VS 2019 as well
  2. all projects are .NET SDK
@cartermp

This comment has been minimized.

Copy link
Collaborator

commented Apr 15, 2019

@pmbanka Thanks, that helps. Unfortunately, we'll need a reproduction to continue. If you have an extracted subset that demonstrates this and it can be shared openly that's preferred, but if that doesn't seem feasible you can share it with me over email (phcart at microsoft). I'm under NDA when communicating over email. You may also want to double check with your legal about sharing source. Though I'm under NDA, some organizations want additional assurances that Microsoft will not steal IP or use the source code for anything other than identifying the cause of a bug.

@object

This comment has been minimized.

Copy link
Author

commented Apr 15, 2019

@cartermp we checked earlier with our legal folks and it's OK for us to send the code to tools vendors. If we manage to extract a small failing subset we can also share it publicly (need to double check). Hope to send or share here something tomorrow.

@cartermp

This comment has been minimized.

Copy link
Collaborator

commented Apr 15, 2019

@object Thanks!

@object

This comment has been minimized.

Copy link
Author

commented Apr 16, 2019

@cartermp I believe I have a small project that reproduces the issue: https://github.com/object/FcsStackOverflow

I managed to reduce it to a very small repo, so there is no need for NDA etc. It's Suave Swagger computational expression that causes stack overflow in FCS. What is weird is that SO occurs after certain number of expressions are specified in the "swagger" block. Removing some (arbitrary chosen) expressions fixes the problem.

@dsyme

This comment has been minimized.

Copy link
Collaborator

commented Apr 16, 2019

I hadn't seen the swagger computation expression before. Impressive - and that's an impressive bit of code using it too! :)

@object

This comment has been minimized.

Copy link
Author

commented Apr 16, 2019

Even though we are using it, I have somewhat mixed feeling about it because it replaces original Suave API with its own. Syntax becomes quite different. But it does its job and it's quick to add it. And if it helps catching SO, then our choice was justified :-)

@cartermp cartermp removed the needs repro label Apr 16, 2019

@cartermp

This comment has been minimized.

Copy link
Collaborator

commented Apr 16, 2019

I could repro in VS 2019 by loading the solution and then building.

I believe this is the same problem as #6258 and #6426

The fix is in the compiler already, set for the 16.1 update, and available for VS in the nightly feed. I installed the latest nightly and built the project again and no longer see a StackOverflow.

I'll close this as a dupe of those two issues.

@cartermp cartermp closed this Apr 16, 2019

@object

This comment has been minimized.

Copy link
Author

commented Apr 17, 2019

Great! Thanks for finding out.

@auduchinok

This comment has been minimized.

Copy link
Contributor

commented Apr 20, 2019

@cartermp Thank you, I can confirm it's fixed in current master when FCS is used in Rider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.