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

Exception monitoring failed #254

Open
paulomorgado opened this issue Jul 7, 2024 · 2 comments
Open

Exception monitoring failed #254

paulomorgado opened this issue Jul 7, 2024 · 2 comments
Assignees

Comments

@paulomorgado
Copy link

Expected behavior

A memory dump is captured on a first chance .NET exceptions.

Actual behavior

ERROR]: Exception monitoring failed.

Steps to reproduce the behavior

Run any ASP.NET application that serves static files (dotnet new razor).

That will get this error when serving static content:

System.ArgumentOutOfRangeException:  (Parameter 'offset')
Actual value was 0.
   at Microsoft.AspNetCore.Http.SendFileResponseExtensions.SendFileAsyncCore(HttpResponse response, IFileInfo file, Int64 offset, Nullable`1 count, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.SendAsync(StaticAssetInvocationContext context)
   at Microsoft.AspNetCore.StaticAssets.StaticAssetsInvoker.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Builder.StaticAssetDevelopmentRuntimeHandler.<>c__DisplayClass3_0.<<AttachRuntimePatching>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

Try to capture the error:

# procdump -n 100 -e 1 -f ArgumentOutOfRangeException PauloMorgadoNet

ProcDump v3.3.0 - Sysinternals process dump utility
Copyright (C) 2024 Microsoft Corporation. All rights reserved. Licensed under the MIT license.
Mark Russinovich, Mario Hewardt, John Salem, Javid Habibi
Sysinternals - www.sysinternals.com

Monitors one or more processes and writes a core dump file when the processes exceeds the
specified criteria.

[18:11:53 - INFO]: Press Ctrl-C to end monitoring without terminating the process(es).
Process:                                PauloMorgadoNet (1)
CPU Threshold:                          n/a
Commit Threshold:                       n/a
GC Generation:                          n/a
Resource tracking:                      n/a
Resource tracking sample rate:          n/a
Thread Threshold:                       n/a
File Descriptor Threshold:              n/a
Signal:                                 n/a
Exception monitor:                      On
Exception filter:                       ArgumentOutOfRangeException
Polling Interval (ms):                  1000
Threshold (s):                          10
Number of Dumps:                        100
Output directory:                       PauloMorgadoNet
[18:11:53 - INFO]: Starting monitor for process PauloMorgadoNet (1)
[18:11:57 - ERROR]: Exception monitoring failed.
[18:11:57 - INFO]: Stopping monitor for process PauloMorgadoNet (1)

System information (e.g., distro, kernel version, etc.)

.NET SDK container image: mcr.microsoft.com/dotnet/nightly/sdk:9.0-preview

@MarioHewardt
Copy link
Collaborator

Hi - Thanks for reporting this. Based on the output, I assume this is running in a containerized environment? Also, what distribution are you running?

@paulomorgado
Copy link
Author

Hi @MarioHewardt,

Hi - Thanks for reporting this. Based on the output, I assume this is running in a containerized environment? Also, what distribution are you running?

I'm running the lates .NET 9.0 SDK container on "Debian GNU/Linux 12 (bookworm)".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants