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

Azure Functions Host 1036 results in a 500 Error on a PUT to /admin/functions #10631

Open
FinVamp1 opened this issue Nov 13, 2024 · 2 comments · Fixed by #10638
Open

Azure Functions Host 1036 results in a 500 Error on a PUT to /admin/functions #10631

FinVamp1 opened this issue Nov 13, 2024 · 2 comments · Fixed by #10638
Assignees
Labels

Comments

@FinVamp1
Copy link
Member

Check for a solution in the Azure portal

For issues in production, please check for a solution to common issues in the Azure portal before opening a bug. In the Azure portal, navigate to your function app, select Diagnose and solve problems from the left, and view relevant dashboards before opening your issue.

Investigative information

Please provide the following:

  • Timestamp: 2024-11-13 22:13:56.4826033 to 2024-11-13 22:19:42.4812748
  • Function App version: 4.1036.3.23284
  • Function App name: testfinnodeFGG
  • Function name(s) (as appropriate):HttpTrigger1
  • Invocation ID:
  • Region: East US

Repro steps

Provide the steps required to reproduce the problem:

  1. Create a new Function App targeting Node 18 or 20 to allow Portal Create.
  2. Try and add a Function via the Portal and see that it fails with 500 Server error.
  3. The Function does get created but the Script Host restarts.
  4. Pin back to 4.36.0 and try step 2 again. There are no errors.

Expected behavior

Provide a description of the expected behavior.

  1. The Function create should not result in a 500 Server error.

Actual behavior

Provide a description of the actual behavior observed.

  1. The Portal Function Function creation calls /admin/functions and this call returrns a 500 error but the files do get created.
  2. The Host detects a file change notification from the Put and Initiates a restart.
  3. There is an exception during the restart with this call stack.

System.ObjectDisposedException : Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier,ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider,Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.AspNetCore.Mvc.ObjectResult.ExecuteResultAsync(ActionContext context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultAsync(IActionResult result)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next,Scope& scope,Object& state,Boolean& isCompleted)

The ARM Template is from DataDog and an example deployment creates the Files in the ARM Template e.g datadog-serverless-functions/azure/deploy-to-azure/function_template.json at master · DataDog/datadog-serverless-functions

Known workarounds

Provide a description of any known workarounds.

Pin back to 4.36

Related information

Provide any related information

@FinVamp1 FinVamp1 changed the title Azure Functions Out Of Proc Host 1036 results in a 500 Error on a PUT to /admin/functions Azure Functions Host 1036 results in a 500 Error on a PUT to /admin/functions Nov 14, 2024
@liliankasem
Copy link
Member

Thanks Finbar, I am able to repro. It looks like this is an emerging issue and the CRI loop is already investigating.

@fabiocav
Copy link
Member

Reopening this as I've identified a couple of additional scenarios after end-to-end validation. Will have the fixes against this issue as well.

@fabiocav fabiocav reopened this Nov 25, 2024
@fabiocav fabiocav self-assigned this Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants