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

Stack overflow in Microsoft.Kiota.Abstractions sending email via graph API #309

Closed
mericstanley opened this issue Jul 29, 2024 · 6 comments
Labels
Status: No Recent Activity status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question

Comments

@mericstanley
Copy link

Hi, we are experiencing stack overflow exceptions originating from Microsoft.Kiota.Abstractions when sending emails in production. We are running a .NET Framework 4.8 application on IIS 10. We recently updated Microsoft.Kiota.Abstractions package from 1.3.1 to 1.9.5. The crash happens frequently, but we've not been able to spot it during debugging. Stack trace from our production server below. I have truncated, but the lines:

000000cd5adfb040 00007ff9d5c811aa System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8, Microsoft.Kiota.Abstractions]](<GetRootParseNodeAsync>d__8 ByRef) 000000cd5adfb0f0 00007ff9d5c810fa Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory.GetRootParseNodeAsync(System.String, System.IO.Stream, System.Threading.CancellationToken) 000000cd5adfb170 00007ff9d5c812a4 Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8.MoveNext()

Appear to be infinitely recursive. Here is the full stack trace to the start of the recursion.

000000cd5adfab30 00007ff9d5c811aa System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8, Microsoft.Kiota.Abstractions]](<GetRootParseNodeAsync>d__8 ByRef) 000000cd5adfabe0 00007ff9d5c810fa Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory.GetRootParseNodeAsync(System.String, System.IO.Stream, System.Threading.CancellationToken) 000000cd5adfac60 00007ff9d5c812a4 Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8.MoveNext() 000000cd5adface0 00007ff9d5c811aa System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8, Microsoft.Kiota.Abstractions]](<GetRootParseNodeAsync>d__8 ByRef) 000000cd5adfad90 00007ff9d5c810fa Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory.GetRootParseNodeAsync(System.String, System.IO.Stream, System.Threading.CancellationToken) 000000cd5adfae10 00007ff9d5c812a4 Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8.MoveNext() 000000cd5adfae90 00007ff9d5c811aa System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8, Microsoft.Kiota.Abstractions]](<GetRootParseNodeAsync>d__8 ByRef) 000000cd5adfaf40 00007ff9d5c810fa Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory.GetRootParseNodeAsync(System.String, System.IO.Stream, System.Threading.CancellationToken) 000000cd5adfafc0 00007ff9d5c812a4 Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8.MoveNext() 000000cd5adfb040 00007ff9d5c811aa System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8, Microsoft.Kiota.Abstractions]](<GetRootParseNodeAsync>d__8 ByRef) 000000cd5adfb0f0 00007ff9d5c810fa Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory.GetRootParseNodeAsync(System.String, System.IO.Stream, System.Threading.CancellationToken) 000000cd5adfb170 00007ff9d5c812a4 Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8.MoveNext() 000000cd5adfb1f0 00007ff9d5c811aa System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8, Microsoft.Kiota.Abstractions]](<GetRootParseNodeAsync>d__8 ByRef) 000000cd5adfb2a0 00007ff9d5c810fa Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory.GetRootParseNodeAsync(System.String, System.IO.Stream, System.Threading.CancellationToken) 000000cd5adfb320 00007ff9d5c812a4 Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8.MoveNext() 000000cd5adfb3a0 00007ff9d5c811aa System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory+<GetRootParseNodeAsync>d__8, Microsoft.Kiota.Abstractions]](<GetRootParseNodeAsync>d__8 ByRef) 000000cd5adfb450 00007ff9d5c810fa Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory.GetRootParseNodeAsync(System.String, System.IO.Stream, System.Threading.CancellationToken) 000000cd5adfb4d0 00007ff9d5c8086a Microsoft.Kiota.Abstractions.Serialization.ParseNodeFactoryRegistry+<GetRootParseNodeAsync>d__9.MoveNext() 000000cd5adfb560 00007ff9d5c8073a System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.Kiota.Abstractions.Serialization.ParseNodeFactoryRegistry+<GetRootParseNodeAsync>d__9, Microsoft.Kiota.Abstractions]](<GetRootParseNodeAsync>d__9 ByRef) 000000cd5adfb610 00007ff9d5c8068a Microsoft.Kiota.Abstractions.Serialization.ParseNodeFactoryRegistry.GetRootParseNodeAsync(System.String, System.IO.Stream, System.Threading.CancellationToken) 000000cd5adfb6a0 00007ff9d5c80201 Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter+<GetRootParseNode>d__30.MoveNext() 000000cd5adfb760 00007ff9d5c7fc9a System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].Start[[Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter+<GetRootParseNode>d__30, Microsoft.Kiota.Http.HttpClientLibrary]](<GetRootParseNode>d__30 ByRef) 000000cd5adfb810 00007ff9d5c7fbe8 Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.GetRootParseNode(System.Net.Http.HttpResponseMessage, System.Threading.CancellationToken) 000000cd5adfb8c0 00007ff9d53f7fb9 Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter+<SendAsync>d__20`1[[System.__Canon, mscorlib]].MoveNext() 000000cd5adfba80 00007ffa20cd0052 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfbb50 00007ffa20ccfed5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfbb80 00007ffa20d3f20f System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run() 000000cd5adfbbd0 00007ffa20d44723 System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef) 000000cd5adfbc20 00007ffa20ca8ee0 System.Threading.Tasks.Task.FinishContinuations() 000000cd5adfbcb0 00007ffa20ca8a28 System.Threading.Tasks.Task`1[[System.__Canon, mscorlib]].TrySetResult(System.__Canon) 000000cd5adfbcf0 00007ffa20d3e533 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].SetResult(System.__Canon) 000000cd5adfbd40 00007ff9d53f9be5 Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter+<GetHttpResponseMessage>d__34.MoveNext() 000000cd5adfbe90 00007ffa20cd0052 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfbf60 00007ffa20ccfed5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfbf90 00007ffa20d3f20f System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run() 000000cd5adfbfe0 00007ffa20d44723 System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef) 000000cd5adfc030 00007ffa20ca8ee0 System.Threading.Tasks.Task.FinishContinuations() 000000cd5adfc0c0 00007ffa20ca8a28 System.Threading.Tasks.Task`1[[System.__Canon, mscorlib]].TrySetResult(System.__Canon) 000000cd5adfc100 00007ffa20ca89a5 System.Threading.Tasks.TaskCompletionSource`1[[System.__Canon, mscorlib]].TrySetResult(System.__Canon) 000000cd5adfc140 00007ff9d4df710e System.Net.Http.HttpClient.SetTaskCompleted(System.Net.Http.HttpRequestMessage, System.Threading.CancellationTokenSource, System.Threading.Tasks.TaskCompletionSource`1<System.Net.Http.HttpResponseMessage>, System.Net.Http.HttpResponseMessage) 000000cd5adfc1b0 00007ff9d4df6f62 System.Net.Http.HttpClient+<>c__DisplayClass59_0.<StartContentBuffering>b__0(System.Threading.Tasks.Task) 000000cd5adfc220 00007ffa20d3d127 System.Threading.Tasks.Task.Execute() 000000cd5adfc260 00007ffa20cd0052 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfc330 00007ffa20ccfed5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfc360 00007ffa20d3d3e1 System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) 000000cd5adfc410 00007ffa20d3cac1 System.Threading.Tasks.Task.ExecuteEntry(Boolean) 000000cd5adfc450 00007ffa20d41072 System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task, Boolean) 000000cd5adfc4a0 00007ffa20d40f46 System.Threading.Tasks.TaskScheduler.TryRunInline(System.Threading.Tasks.Task, Boolean) 000000cd5adfc540 00007ffa20d40be6 System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(System.Threading.Tasks.Task, Boolean) 000000cd5adfc5d0 00007ffa20d3cfb6 System.Threading.Tasks.Task.ContinueWithCore(System.Threading.Tasks.Task, System.Threading.Tasks.TaskScheduler, System.Threading.CancellationToken, System.Threading.Tasks.TaskContinuationOptions) 000000cd5adfc630 00007ffa20d3d8f5 System.Threading.Tasks.Task.ContinueWith(System.Action`1<System.Threading.Tasks.Task>, System.Threading.Tasks.TaskScheduler, System.Threading.CancellationToken, System.Threading.Tasks.TaskContinuationOptions, System.Threading.StackCrawlMark ByRef) 000000cd5adfc6d0 00007ffa20d3cda3 System.Threading.Tasks.Task.ContinueWith(System.Action`1<System.Threading.Tasks.Task>, System.Threading.CancellationToken, System.Threading.Tasks.TaskContinuationOptions, System.Threading.Tasks.TaskScheduler) 000000cd5adfc710 00007ff9d1208bdd System.Net.Http.HttpUtilities.ContinueWithStandard(System.Threading.Tasks.Task, System.Action`1<System.Threading.Tasks.Task>) 000000cd5adfc750 00007ff9d4df40d9 System.Net.Http.HttpClient+<>c__DisplayClass55_0.<SendAsync>b__0(System.Threading.Tasks.Task`1<System.Net.Http.HttpResponseMessage>) 000000cd5adfc7c0 00007ffa20d3d127 System.Threading.Tasks.Task.Execute() 000000cd5adfc800 00007ffa20cd0052 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfc8d0 00007ffa20ccfed5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfc900 00007ffa20d3d3e1 System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) 000000cd5adfc9b0 00007ffa20d3cac1 System.Threading.Tasks.Task.ExecuteEntry(Boolean) 000000cd5adfc9f0 00007ffa20d41072 System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task, Boolean) 000000cd5adfca40 00007ffa20d40f46 System.Threading.Tasks.TaskScheduler.TryRunInline(System.Threading.Tasks.Task, Boolean) 000000cd5adfcae0 00007ffa20d40be6 System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(System.Threading.Tasks.Task, Boolean) 000000cd5adfcb70 00007ffa20ca8bde System.Threading.Tasks.Task.FinishContinuations() 000000cd5adfcc00 00007ffa20ca8a28 System.Threading.Tasks.Task`1[[System.__Canon, mscorlib]].TrySetResult(System.__Canon) 000000cd5adfcc40 00007ffa20d3e533 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].SetResult(System.__Canon) 000000cd5adfcc90 00007ff9d66107d0 Microsoft.Kiota.Http.HttpClientLibrary.Middleware.CompressionHandler+<SendAsync>d__1.MoveNext() 000000cd5adfcd80 00007ffa20cd0052 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfce50 00007ffa20ccfed5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfce80 00007ffa20d3f20f System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run() 000000cd5adfced0 00007ffa20d44723 System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef) 000000cd5adfcf20 00007ffa20ca8ee0 System.Threading.Tasks.Task.FinishContinuations() 000000cd5adfcfb0 00007ffa20ca8a28 System.Threading.Tasks.Task`1[[System.__Canon, mscorlib]].TrySetResult(System.__Canon) 000000cd5adfcff0 00007ffa20d3e533 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].SetResult(System.__Canon) 000000cd5adfd040 00007ff9d6611091 Microsoft.Kiota.Http.HttpClientLibrary.Middleware.UriReplacementHandler`1+<SendAsync>d__2[[System.__Canon, mscorlib]].MoveNext() 000000cd5adfd100 00007ffa20cd0052 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfd1d0 00007ffa20ccfed5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfd200 00007ffa20d3f20f System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run() 000000cd5adfd250 00007ffa20d44723 System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef) 000000cd5adfd2a0 00007ffa20ca8ee0 System.Threading.Tasks.Task.FinishContinuations() 000000cd5adfd330 00007ffa20ca8a28 System.Threading.Tasks.Task`1[[System.__Canon, mscorlib]].TrySetResult(System.__Canon) 000000cd5adfd370 00007ffa20d3e533 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].SetResult(System.__Canon) 000000cd5adfd3c0 00007ff9d6611be4 Microsoft.Kiota.Http.HttpClientLibrary.Middleware.RetryHandler+<SendAsync>d__7.MoveNext() 000000cd5adfd460 00007ffa20cd0052 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfd530 00007ffa20ccfed5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfd560 00007ffa20d3f20f System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run() 000000cd5adfd5b0 00007ffa20d44723 System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef) 000000cd5adfd600 00007ffa20ca8ee0 System.Threading.Tasks.Task.FinishContinuations() 000000cd5adfd690 00007ffa20ca8a28 System.Threading.Tasks.Task`1[[System.__Canon, mscorlib]].TrySetResult(System.__Canon) 000000cd5adfd6d0 00007ffa20d3e533 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].SetResult(System.__Canon) 000000cd5adfd720 00007ff9d6612ead Microsoft.Kiota.Http.HttpClientLibrary.Middleware.RedirectHandler+<SendAsync>d__5.MoveNext() 000000cd5adfd8f0 00007ffa20cd0052 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfd9c0 00007ffa20ccfed5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfd9f0 00007ffa20d3f20f System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run() 000000cd5adfda40 00007ffa20d44723 System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef) 000000cd5adfda90 00007ffa20ca8ee0 System.Threading.Tasks.Task.FinishContinuations() 000000cd5adfdb20 00007ffa20ca8a28 System.Threading.Tasks.Task`1[[System.__Canon, mscorlib]].TrySetResult(System.__Canon) 000000cd5adfdb60 00007ffa20d3e533 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib]].SetResult(System.__Canon) 000000cd5adfdbb0 00007ff9d6613f5d Microsoft.Kiota.Http.HttpClientLibrary.Middleware.HeadersInspectionHandler+<SendAsync>d__2.MoveNext() 000000cd5adfdc90 00007ffa20cd0052 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfdd60 00007ffa20ccfed5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfdd90 00007ffa20d3f20f System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run() 000000cd5adfdde0 00007ffa20d44723 System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean, System.Threading.Tasks.Task ByRef) 000000cd5adfde30 00007ffa20ca8ee0 System.Threading.Tasks.Task.FinishContinuations() 000000cd5adfdec0 00007ffa20ca8a28 System.Threading.Tasks.Task`1[[System.__Canon, mscorlib]].TrySetResult(System.__Canon) 000000cd5adfdf00 00007ffa20ca89a5 System.Threading.Tasks.TaskCompletionSource`1[[System.__Canon, mscorlib]].TrySetResult(System.__Canon) 000000cd5adfdf40 00007ff9d53ffc54 System.Net.Http.WinHttpHandler+<StartRequestAsync>d__122.MoveNext() 000000cd5adfe040 00007ffa20cd0052 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfe110 00007ffa20ccfed5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfe140 00007ffa20d3f20f System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run() 000000cd5adfe190 00007ffa20d3d127 System.Threading.Tasks.Task.Execute() 000000cd5adfe1d0 00007ffa20cd0052 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfe2a0 00007ffa20ccfed5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 000000cd5adfe2d0 00007ffa20d3d3e1 System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) 000000cd5adfe380 00007ffa20d3cac1 System.Threading.Tasks.Task.ExecuteEntry(Boolean) 000000cd5adfe3c0 00007ffa20c9ade6 System.Threading.ThreadPoolWorkQueue.Dispatch()

@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Jul 29, 2024
@baywet
Copy link
Member

baywet commented Jul 29, 2024

Hi @mericstanley
Thanks for using kiota and for reaching out.
Can you share how you initialize the factories/client please?
Have you refreshed your client as you've updated the dependency?
Have you updated the other dependencies?
Any specific reason why you're not upgrading straight to 1.9.11?

@baywet baywet moved this from Needs Triage 🔍 to Waits for author 🔁 in Kiota Jul 29, 2024
@baywet baywet added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question labels Jul 29, 2024
@mericstanley
Copy link
Author

Hi Vincent,

1.9.5 was the latest version available when we updated our dependencies (looks like we did it 3rd June). We would have taken the latest version of all related packages at the same time. Here are the related package versions that I think might be relevant:

  <package id="Microsoft.Extensions.Logging" version="8.0.0" targetFramework="net48" />
  <package id="Microsoft.Graph" version="5.55.0" targetFramework="net48" />
  <package id="Microsoft.Graph.Core" version="3.1.12" targetFramework="net48" />
  <package id="Microsoft.Kiota.Abstractions" version="1.9.5" targetFramework="net48" />
  <package id="Microsoft.Kiota.Authentication.Azure" version="1.1.7" targetFramework="net48" />
  <package id="Microsoft.Kiota.Http.HttpClientLibrary" version="1.4.3" targetFramework="net48" />
  <package id="Microsoft.Kiota.Serialization.Form" version="1.2.4" targetFramework="net48" />
  <package id="Microsoft.Kiota.Serialization.Json" version="1.3.3" targetFramework="net48" />
  <package id="Microsoft.Kiota.Serialization.Multipart" version="1.1.5" targetFramework="net48" />
  <package id="Microsoft.Kiota.Serialization.Text" version="1.2.2" targetFramework="net48" />
  <package id="System.Diagnostics.DiagnosticSource" version="8.0.1" targetFramework="net48" />
  <package id="System.Memory.Data" version="8.0.0" targetFramework="net48" />
  <package id="System.Text.Json" version="8.0.3" targetFramework="net48" />

There are a couple of places where we use the graph API, this code path is from our prime suspect at the moment.

       public GraphServiceClient InitializeGraphForUserAuth()
        {
            if (userClient == null)
            {
                var clientId = configuration.GraphClientID;
                var clientSecret = configuration.GraphClientSecret;
                var tenantId = configuration.GraphTenantId;

                var credentials = new ClientSecretCredential(tenantId,
                    clientId,
                    clientSecret,
                    new TokenCredentialOptions { AuthorityHost = AzureAuthorityHosts.AzurePublicCloud });

                userClient = new GraphServiceClient(credentials);
            }

            return userClient;
        }

This code is part of a class who's lifetime in per IIS call (i.e. autofac instance per lifetime scope).

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Jul 29, 2024
@baywet
Copy link
Member

baywet commented Jul 29, 2024

Thanks for the additional information.
Side note system.text.json 8.0.3 has a declared vulnerability, if you're only using it in the context of a kiota client, it's not applicable, but you should upgrade to be on the safe side.

Have you tried upgrading to the current latest versions of kiota dependencies to see if that impacts anything?

Have you refreshed your client as you've updated the dependency?

The only potential for a SO in this area is if the same registry is registered for itself.

public (T, string ContentType) GetFactory<T>(string contentType)

Are you doing anything specific with the parse node factories in your application code?

@baywet baywet added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed Needs: Attention 👋 labels Jul 29, 2024
@mericstanley
Copy link
Author

Thanks for the warning regarding system.text.json, we are only using it for kiota but will update to the latest version when we next update our packages.

We are not doing anything with the parse node factories.

Please can you clarify what you mean by 'refreshed your client'?

I will arrange a test with the latest version of all dependencies, but please bear with us. The work will need to be scheduled and regression testing performed before we can try it on live as we have not seen it in development.

@baywet
Copy link
Member

baywet commented Jul 31, 2024

Please can you clarify what you mean by 'refreshed your client'?

running the generate or update command so the generated code is also up to date.

@baywet baywet added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed Needs: Attention 👋 labels Jul 31, 2024

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@github-project-automation github-project-automation bot moved this from Waits for author 🔁 to Done ✔️ in Kiota Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: No Recent Activity status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close type:question An issue that's a question
Projects
Archived in project
Development

No branches or pull requests

2 participants