runtime: Segmentation fault (core dumped) started popping a lot since upgrading to .NET 7
Description
Since migrating to .NET 7, we have started getting a lot of Segmentation fault (core dumped) crashes in our ASP.NET Core applications.
Unlike other issues here, .NET was not installed with snap or any other tool distribution tools, since we are using the official .NET docker:
dotnet/aspnet:7.0-jammy after we migrated from dotnet/aspnet:6.0.15-jammy.
dmesg yielded this result:
[ 5198.137895] dotnet[6138]: segfault at 7f365c282000 ip 00007f36d250b99e sp 00007ffd7ece7738 error 4 in libc.so.6[7f36d2385000+195000] [ 5198.145939] Code: 00 00 00 00 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 83 fa 20 77 36 b9 ff ff ff ff c4 e2 68 f5 c9 c5 fb 92 d1 62 e1 7f 2a 6f 16 <62> f3 6d 22 3e 0f 04 c5 fb 93 c1 85 c0 75 03 c3 66 90 f3 0f bc c0
Let me know if there is any additional info I can gather that will help you debug the issue.
Reproduction Steps
The only thing our dockerfile has, is installation of newrelic’s agent (which was there also in .NET 6).
# Newrelic agent
RUN apt-get update && apt-get install -y wget ca-certificates gnupg curl \
&& echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | tee /etc/apt/sources.list.d/newrelic.list \
&& wget https://download.newrelic.com/548C16BF.gpg \
&& apt-key add 548C16BF.gpg \
&& apt-get update \
&& apt-get install -y newrelic-dotnet-agent \
&& rm -rf /var/lib/apt/lists/*
ENV CORECLR_ENABLE_PROFILING=1 \
CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A} \
CORECLR_NEWRELIC_HOME=/usr/local/newrelic-dotnet-agent \
CORECLR_PROFILER_PATH=/usr/local/newrelic-dotnet-agent/libNewRelicProfiler.so
# Newrelic agent
Regression?
We did see some issues with dotnet/aspnet:6.0.15-jammy, but it was once or two a week, now it’s dozens a day.
Known Workarounds
No response
Configuration
No response
Other information
No response
About this issue
- Original URL
- State: open
- Created 10 months ago
- Comments: 20 (13 by maintainers)
In addition to the above, in case you are running in kubernetes there are a couple more things to consider:
Hope this helps!
Can you try removing the newrelic profiler and see if the issue still persists?