Azure / Azure/azure-functions-dotnet-worker

4.1038.300.25164 causes Azure.RequestFailedExceptions

Open
#3,030 11 comments 0 reactions 0 assignees View on GitHub
Needs: Triage (Functions) potential-bug
Dominant language
C#
Stars
466
Forks
215
Avg merge
3d 10h
Merged PRs (30d)
7

Description

### Description

As version 4.1038.300.25164 rolled out my AppInsights started to be flooded with `Azure.RequestFailedException`s. These do not seem to align with any deployments of my function, nor do they seem to scale with requests. Interestingly they also don't seem to be causing requests to fail.

This is the message:
```
This request is not authorized to perform this operation using this permission. RequestId:249c6fb6-c002-001b-2d7d-ad03b2000000 Time:2025-04-14T20:41:31.3878204Z Status: 403 (Forbidden) ErrorCode: AuthorizationPermissionMismatch Content: {"odata.error":{"code":"AuthorizationPermissionMismatch","message":{"lang":"en-US","value":"This request is not authorized to perform this operation using this permission.\nRequestId:249c6fb6-c002-001b-2d7d-ad03b2000000\nTime:2025-04-14T20:41:31.3878204Z"}}} Headers: Cache-Control: no-cache Transfer-Encoding: chunked Server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-id: 249c6fb6-c002-001b-2d7d-ad03b2000000 x-ms-client-request-id: 6a1c8aa0-c0be-4585-99d1-0008cd605bbb x-ms-version: REDACTED X-Content-Type-Options: REDACTED Date: Mon, 14 Apr 2025 20:41:30 GMT Content-Type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8
```

Method | Level | Line | Assembly | File Name
-- | -- | -- | -- | --
Azure.Data.Tables.TableRestClient+d__8.MoveNext | 0 | 0 | Azure.Data.Tables, Version=12.8.3.0, Culture=neutral, PublicKeyToken=92742159e12e44c8 |  
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw | 1 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess | 2 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification | 3 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.GetResult | 4 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
Azure.Data.Tables.TableServiceClient+<>c__DisplayClass34_0+d.MoveNext | 5 | 0 | Azure.Data.Tables, Version=12.8.3.0, Culture=neutral, PublicKeyToken=92742159e12e44c8 |  
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw | 6 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess | 7 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification | 8 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.GetResult | 9 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
Azure.Core.PageableHelpers+FuncAsyncPageable`1+d__4.MoveNext | 10 | 0 | Azure.Data.Tables, Version=12.8.3.0, Culture=neutral, PublicKeyToken=92742159e12e44c8 |  
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw | 11 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.ThrowForFailedGetResult | 12 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult | 13 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
Azure.AsyncPageable`1+d__6.MoveNext | 14 | 0 | Azure.Core, Version=1.38.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8 |  
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw | 15 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
Azure.AsyncPageable`1+d__6.MoveNext | 16 | 0 | Azure.Core, Version=1.38.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8 |  
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw | 17 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.ThrowForFailedGetResult | 18 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult | 19 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
Microsoft.Azure.WebJobs.Script.WebHost.Helpers.TableStorageHelpers+d__5.MoveNext | 20 | 104 | Microsoft.Azure.WebJobs.Script.WebHost, Version=4.1038.0.0, Culture=neutral, PublicKeyToken=null | /_/src/WebJobs.Script.WebHost/Helpers/TableStorageHelpers.cs
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw | 21 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
Microsoft.Azure.WebJobs.Script.WebHost.Helpers.TableStorageHelpers+d__5.MoveNext | 22 | 104 | Microsoft.Azure.WebJobs.Script.WebHost, Version=4.1038.0.0, Culture=neutral, PublicKeyToken=null | /_/src/WebJobs.Script.WebHost/Helpers/TableStorageHelpers.cs
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw | 23 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess | 24 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification | 25 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
System.Runtime.CompilerServices.TaskAwaiter`1.GetResult | 26 | 0 | System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e |  
Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.DiagnosticEventTableStorageRepository+<>c__DisplayClass29_0+d.MoveNext | 27 | 127 | Microsoft.Azure.WebJobs.Script.WebHost, Version=4.1038.0.0, Culture=neutral, PublicKeyToken=null | /_/src/WebJobs.Script.WebHost/Diagnostics/DiagnosticEventTableStorageRepository.cs

### Steps to reproduce

Create and Azure Function with an associated AppInsights database.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at src/WebJobs.Script.WebHost/Helpers/TableStorageHelpers.cs line 104 and src/WebJobs.Script.WebHost/Diagnostics/DiagnosticEventTableStorageRepository.cs line 127, then inspect the Azure.Data.Tables 12.8.3 calls involved in diagnostic storage. Reproduce with an Azure Function and associated App Insights database; done means the unexpected authorization exceptions are explained and no longer flood diagnostics without breaking request processing.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud, databases, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.