Skip to content

StackOverflow exception in fuseConflicts function #4056

Closed

Description

@vshapenko

Description

Hello!
We receive StackOverflow exception on updating packages in our environment(lots of Xamarin.Android packages). Looking into verbose logs we get alot of following records:

20 requirements left
- Xamarin.Android.Glide.DiskLruCache, >= 4.11.0.1 (from Xamarin.Android.Glide 4.11.0.1)
- Xamarin.Android.Glide.GifDecoder, >= 4.11.0.1 (from Xamarin.Android.Glide 4.11.0.1)
- Xamarin.AndroidX.Navigation.Common, >= 2.3.5.1 (from Xamarin.AndroidX.Navigation.Runtime 2.3.5.1)
- Xamarin.AndroidX.Lifecycle.ViewModel, >= 2.3.1.1 (from Xamarin.AndroidX.Navigation.Runtime 2.3.5.1)
- Xamarin.AndroidX.Lifecycle.ViewModelSavedState, >= 2.3.1.1 (from Xamarin.AndroidX.Navigation.Runtime 2.3.5.1)
- Xamarin.AndroidX.Lifecycle.Common, >= 2.3.1 (from Xamarin.AndroidX.Lifecycle.Runtime 2.3.1.1)
- Xamarin.AndroidX.Lifecycle.LiveData.Core, >= 2.3.0.1 (from Xamarin.AndroidX.Loader 1.1.0.7)
- Xamarin.AndroidX.Arch.Core.Runtime, >= 2.1.0.8 (from Xamarin.AndroidX.Lifecycle.Runtime 2.3.1.1)
- SQLitePCLRaw.core, >= 2.0.4 (from Microsoft.Data.Sqlite.Core 5.0.8)
- SQLitePCLRaw.lib.e_sqlite3.android, >= 2.0.4 (from SQLitePCLRaw.bundle_e_sqlite3 2.0.4)
- SQLitePCLRaw.provider.e_sqlite3, >= 2.0.4 (from SQLitePCLRaw.bundle_e_sqlite3 2.0.4)
- Xamarin.AndroidX.Core, >= 1.5 (from Xamarin.AndroidX.RecyclerView 1.2.1)
- Xamarin.AndroidX.Activity, >= 1.2.4.1 (from Xamarin.AndroidX.Navigation.Runtime 2.3.5.1)
- Xamarin.AndroidX.Annotation, >= 1.2.0.1 (from Xamarin.AndroidX.Arch.Core.Common 2.1.0.9)
- Xamarin.AndroidX.VectorDrawable, >= 1.1.0.7 (from Xamarin.AndroidX.AppCompat.AppCompatResources 1.2.0.7)
- Xamarin.AndroidX.VectorDrawable.Animated, >= 1.1.0.7 (from Xamarin.AndroidX.AppCompat.AppCompatResources 1.2.0.7)
- Xamarin.AndroidX.CustomView, >= 1.1.0.6 (from Xamarin.AndroidX.DrawerLayout 1.1.1.2)
- Xamarin.AndroidX.ExifInterface, >= 1.1.0.1 (from Xamarin.Android.Glide 4.11.0.1)
- Xamarin.AndroidX.Legacy.Support.Core.Utils, >= 1.0.0.7 (from Xamarin.GooglePlayServices.Stats 117.0.1)
- Xamarin.Javax.Inject, >= 1.0 (from Xamarin.Google.Dagger 2.37.0)
and so on... (i.e. 21 req left above).

Looking into the code i have discovered, that possible source of this error is lack of tail recursion in fuseConflicts:
PackegeResolver:1115.

So, the question is - Could somebody guide through this complex piece of code in my tries to fix this issue?

Repro steps

running paket update causes stack overflow

Expected behavior

No SO exception

Actual behavior

SO thrown

Known workarounds

No workaround

Activity

  1. forki commented on Aug 2, 2021

    @forki
    Member

    Hey, which version do you use? Can you please give a deps file which reproduces this?

  2. vshapenko commented on Aug 2, 2021

    @vshapenko
    Author

    Hello, we are using 6.0.0-rc007, although bug is reproduced on 5.247.0 . I have attached a dependencies file.

  3. Dolfik1 commented on Aug 2, 2021

    @Dolfik1
    Contributor

    Hey, which version do you use? Can you please give a deps file which reproduces this?

    paket.dependencies.zip

  4. Dolfik1 commented on Aug 3, 2021

    @Dolfik1
    Contributor

    There is minimal repro paket.dependencies file:

    source https://api.nuget.org/v3/index.json
    framework: monoandroid10.0
    
    nuget Xamarin.AndroidX.AppCompat 1.2.0.6
    nuget Xamarin.AndroidX.Core 1.5.0
    nuget Xamarin.AndroidX.Migration 1.0.8
    nuget Xamarin.AndroidX.Navigation.Fragment 2.3.2.1
    
  5. added a commit that references this issue on Aug 3, 2021
    b31a9b1
  6. added a commit that references this issue on Aug 4, 2021
    59d4a9e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions