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

[BUG] .Net 4.7.2 Application Crashing #2449

Open
andrewgierens opened this issue Sep 19, 2024 · 4 comments
Open

[BUG] .Net 4.7.2 Application Crashing #2449

andrewgierens opened this issue Sep 19, 2024 · 4 comments
Labels
bug Something isn't working community question Further information is requested

Comments

@andrewgierens
Copy link

Kibana version: 8.13.0
Elasticsearch version: 8.13
APM Server version: 8.13.0
APM Agent language and version: Profiler 1.26.0
Fresh install or upgraded from other version? Fresh install

Environment

Operating system and version: Windows 10

.NET Framework/Core name and version (e.g. .NET 4.6.2, NET Core 3.1.100) : .NET 4.7.2

Application Target Framework(s) (e.g. net462, netcoreapp3.1): net472

Describe the bug

When starting our application after enabling the profiler with the below script, our application crashes (screenshot below of some logs). When the profiler is disabled, the application loads as normal.

Any help on how we can diagnose this further would be appreciated.

To Reproduce

Script to init profiler:

$appcmd = "$($env:systemroot)\system32\inetsrv\AppCmd.exe"
$appPool = "AppPoolName" 
$profilerHomeDir = "C:\source\ApmProfiler\elastic_apm_profiler_1.26.0-win-x64" 
$environment = @{
  COR_ENABLE_PROFILING = "1"
  COR_PROFILER = "{FA65FE15-F085-4681-9B20-95E04F6C03CC}"
  COR_PROFILER_PATH = "$profilerHomeDir\elastic_apm_profiler.dll"
  ELASTIC_APM_PROFILER_HOME = "$profilerHomeDir"
  ELASTIC_APM_PROFILER_INTEGRATIONS = "$profilerHomeDir\integrations.yml"
  ELASTIC_APM_SERVER_URL = "https://XYZ:8200" 
  ELASTIC_APM_PROFILER_LOG = "trace"
}

$environment.Keys | ForEach-Object {
  & $appcmd set config -section:system.applicationHost/applicationPools /+"[name='$appPool'].environmentVariables.[name='$_',value='$($environment[$_])']"
}

Below are the errors we get, they dont really point us anywhere obvious

Image
Image
elastic_apm_profiler_w3wp_22680_1726702449.log - I have redacted information from this. Let me know if you need the trace logs and we can organise something

Notes:

  • APM .net agent works fine to add traces. We had no issues with this
  • The reason we were exploring the profiler as an option was to give us SQL tracing, as I believe this isn't supported with the agent in .net framework mentioned here
  • Microsoft.Data.SqlClient is used, 1.1.3, but we have tried upgrading this with no success
  • We have tried removing all references to the Elastic APM agent in code also, this does not have any affect.
  • You will notice in the log file that there is [ERROR] No rejit method found for target: Npgsql.NpgsqlCommand.ExecuteReaderAsync, I removed the Npsql integration and this did go away, but the crashing still persisted

Expected behavior

The profiler to start

Actual behavior

The profiler causes our application to crash. No logs given point us in any direction

@andrewgierens andrewgierens added the bug Something isn't working label Sep 19, 2024
@Mpdreamz
Copy link
Member

Hi @andrewgierens

Can you try our 1.30.0 release? This should fix the load issue in your log.

Specifically this PR fixes it: #2457

If it doesn't we'd be very keen to hearing it! Closing this but please reopen if it doesn't fix the issue on your end.

@andrewgierens
Copy link
Author

Great, we will test today and let you know how it goes. Thank you @Mpdreamz and @stevejgordon

@andrewgierens
Copy link
Author

Unfortunately we are seeing the same error on 1.30.0

@Mpdreamz Mpdreamz reopened this Oct 24, 2024
@stevejgordon
Copy link
Contributor

@andrewgierens I'm Sorry to hear this is still an issue. Would you be able to collect a crash dump for us to analyse, or, if it's easier, provide a minimal repro codebase we can run locally?

@stevejgordon stevejgordon added question Further information is requested and removed triage labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants