Bug 59936 - System.StackOverflowException when using Paket.exe to install some packages
Summary: System.StackOverflowException when using Paket.exe to install some packages
Status: NEEDINFO
Alias: None
Product: Runtime
Classification: Mono
Component: GC (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-10-03 20:42 UTC by Tomas Jansson
Modified: 2017-11-08 23:10 UTC (History)
4 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 for Bug 59936 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEEDINFO

Description Tomas Jansson 2017-10-03 20:42:21 UTC
I have project where I use paket (https://fsprojects.github.io/Paket/) to maintain my nuget packages. The paket.depedencies has the following content:

source https://www.nuget.org/api/v2
nuget Akka 1.2.3
nuget Akka.FSharp 1.2.3
nuget Suave 2.2.1
nuget Akka.Cluster.Sharding 1.3.1-beta51
nuget FsPickler 4.0.0
nuget System.Net.Security 4.3.2
nuget FSharp.Core 4.2.3

running `mono .paket/paket.exe install` yields a StackOverflowException. I first thought it was a paket bug so I filed this issue there: https://github.com/fsprojects/Paket/issues/2790. It turned out that it wasn't reproducible on Windows, so it seems like it is a mono bug. 

The top of the stacktrace:

Unhandled Exception:
StackOverflowException
[ERROR] FATAL UNHANDLED EXCEPTION: System.StackOverflowException: The requested operation caused a stack overflow.
  at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr)
  at (wrapper alloc) System.Object:AllocVector (intptr,intptr)
  at System.Collections.Generic.List`1[T]..cctor () [0x00000] in <48b95f3df5804531818f80e28ec60191>:0
  at System.Threading.CancellationTokenSource.NotifyCancellation (System.Boolean throwOnFirstException) [0x0005f] in <48b95f3df5804531818f80e28ec60191>:0
  at System.Threading.CancellationTokenSource.Cancel (System.Boolean throwOnFirstException) [0x00006] in <48b95f3df5804531818f80e28ec60191>:0
  at System.Threading.CancellationTokenSource.Cancel () [0x00000] in <48b95f3df5804531818f80e28ec60191>:0
  at Paket.PackageResolver.Resolve (Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] getVersionsRaw, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] getPreferredVersionsRaw, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] getPackageDetailsRaw, Paket.Domain+GroupName groupName, Microsoft.FSharp.Core.FSharpOption`1[T] globalStrategyForDirectDependencies, Microsoft.FSharp.Core.FSharpOption`1[T] globalStrategyForTransitives, Paket.Requirements+FrameworkRestrictions globalFrameworkRestrictions, Microsoft.FSharp.Collections.FSharpSet`1[T] rootDependencies, Paket.PackageResolver+UpdateMode updateMode) [0x0049d] in <f278749f76c340298856c7fff08db63e>:0
  at <StartupCode$Paket-Core>.$DependenciesFile+resolveGroup@212-1[b].Invoke (Paket.Domain+GroupName groupName, b _arg1) [0x000b8] in <f278749f76c340298856c7fff08db63e>:0
  at Microsoft.FSharp.Collections.MapTreeModule.mapiOpt[a,b,c] (Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`3[T1,T2,TResult] f, Microsoft.FSharp.Collections.MapTree`2[TKey,TValue] m) [0x0002a] in <f278749f76c340298856c7fff08db63e>:0
  at Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue].Map[b] (Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] f) [0x00014] in <f278749f76c340298856c7fff08db63e>:0
  at Microsoft.FSharp.Collections.MapModule.Map[TKey,T,TResult] (Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] mapping, Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue] table) [0x00001] in <f278749f76c340298856c7fff08db63e>:0
  at Paket.DependenciesFile.Resolve[a] (System.Boolean force, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] getSha1, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] getVersionF, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] getPreferredVersionF, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] getPackageDetailsF, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] getPackageRuntimeGraph, Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue] groupsToResolve, Paket.PackageResolver+UpdateMode updateMode) [0x00013] in <f278749f76c340298856c7fff08db63e>:0
  at Paket.UpdateProcess.selectiveUpdate (System.Boolean force, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] getSha1, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] getVersionsF, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] getPackageDetailsF, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] getRuntimeGraphFromPackage, Paket.LockFile lockFile, Paket.DependenciesFile dependenciesFile, Paket.PackageResolver+UpdateMode updateMode, Paket.SemVerUpdateMode semVerUpdateMode) [0x0020d] in <f278749f76c340298856c7fff08db63e>:0


Let me know if any more information is needed.
Comment 1 Ludovic Henry 2017-11-08 23:10:45 UTC
I couldn't reproduce with Mono 5.8.0.40 (2017-10/ce494e3d152).

The steps I took are:

 - download https://github.com/fsprojects/Paket/archive/5.122.0.zip
 - unzip Paket-5.122.0
 - cd Paket-5.122.0
 - mono .paket/paket.exe install

Can you still reproduce with latest mono?

Thank you