Open MichaelMaio opened 1 year ago
Tagging subscribers to this area: @tommcdon See info in area-owners.md if you want to be subscribed.
Author: | MichaelMaio |
---|---|
Assignees: | - |
Labels: | `bug`, `area-Diagnostics-coreclr` |
Milestone: | - |
There does not seem to be an actionable fix for this issue due to OS-level limitations. Moving to Future as a tracking issue.
We’re collecting mini dumps for our .NET Core app as described here: Collect Dumps on Crash - .NET | Microsoft Learn. We’re setting DOTNET_DbgMiniDumpName to\%e.%d.dmp.
On Windows, everything works fine. For example, when I crash an app named DotNetCoreConsoleApp.exe, I get a dump named DotNetCoreConsoleApp.exe..dmp.
On Linux, however, the exe file name (the %e) is getting truncated to 15 characters. For example, I get a dump named DotNetCoreConso..dmp.
I've pasted a discussion this below with more information:
From: Juan Sebastian Hoyos Ayala Juan.Hoyos@microsoft.com Sent: Tuesday, March 14, 2023 11:52 AM To: Michael Maio michma@microsoft.com; Mike McLaughlin mikem@microsoft.com; Lee Culver leculver@microsoft.com Subject: RE: exe file name gets truncated in .NET core mini dump name
Or rather, on the systems that truncate it, it’s 16 chars. There’s other nodes in procfs too, but they lie easily about the proc name.
From: Juan Sebastian Hoyos Ayala Sent: Tuesday, March 14, 2023 11:51 AM To: Michael Maio [michma@microsoft.com](mailto:michma@microsoft.com); Mike McLaughlin [mikem@microsoft.com](mailto:mikem@microsoft.com); Lee Culver [leculver@microsoft.com](mailto:leculver@microsoft.com) Subject: RE: exe file name gets truncated in .NET core mini dump name
Sure, feel free to. It’s always truncated to 15 chars (the buffer they use internally is 16 chars).
From: Michael Maio [michma@microsoft.com](mailto:michma@microsoft.com) Sent: Tuesday, March 14, 2023 11:42 AM To: Juan Sebastian Hoyos Ayala [Juan.Hoyos@microsoft.com](mailto:Juan.Hoyos@microsoft.com); Mike McLaughlin [mikem@microsoft.com](mailto:mikem@microsoft.com); Lee Culver [leculver@microsoft.com](mailto:leculver@microsoft.com) Subject: RE: exe file name gets truncated in .NET core mini dump name
Should I log a bug on this? If so, where?
For now I guess we can work around it by truncating the name of the process when we look for its dump.
Thanks,
michma
From: Juan Sebastian Hoyos Ayala [Juan.Hoyos@microsoft.com](mailto:Juan.Hoyos@microsoft.com) Sent: Tuesday, March 14, 2023 10:19 AM To: Mike McLaughlin [mikem@microsoft.com](mailto:mikem@microsoft.com); Lee Culver [leculver@microsoft.com](mailto:leculver@microsoft.com); Michael Maio [michma@microsoft.com](mailto:michma@microsoft.com) Subject: Re: exe file name gets truncated in .NET core mini dump name
Given this has to be out of process, we should try to check for /proc/pod/exe. There's getauxval(AT_EXECFN), but likely can only be called in proc. There's also an aux file in proc with a pointer to the string, but that requires a remote read of a string. I feel the exe with fallback to status might be a better idea.
Juan
From: Mike McLaughlin [mikem@microsoft.com](mailto:mikem@microsoft.com) Sent: Tuesday, March 14, 2023 9:42:15 AM To: Lee Culver [leculver@microsoft.com](mailto:leculver@microsoft.com); Michael Maio [michma@microsoft.com](mailto:michma@microsoft.com) Cc: Juan Sebastian Hoyos Ayala [Juan.Hoyos@microsoft.com](mailto:Juan.Hoyos@microsoft.com) Subject: RE: exe file name gets truncated in .NET core mini dump name
Createdump gets the app name for %e on Linux from the /proc//status file. It parses the “Name: “ field. The name isn’t truncated by createdump so the limitation is status file’s Name field. If there is a better way to get the program name, we can change createdump to do that.
mikem
From: Lee Culver [leculver@microsoft.com](mailto:leculver@microsoft.com) Sent: Monday, March 13, 2023 9:25 PM To: Michael Maio [michma@microsoft.com](mailto:michma@microsoft.com); Mike McLaughlin [mikem@microsoft.com](mailto:mikem@microsoft.com) Subject: RE: exe file name gets truncated in .NET core mini dump name
Mike was OOF today, I’m sure he’ll respond when he’s back this week.
-Lee
From: Michael Maio [michma@microsoft.com](mailto:michma@microsoft.com) Sent: Monday, March 13, 2023 8:34 PM To: Lee Culver [leculver@microsoft.com](mailto:leculver@microsoft.com); Mike McLaughlin [mikem@microsoft.com](mailto:mikem@microsoft.com) Subject: RE: exe file name gets truncated in .NET core mini dump name
@Mike McLaughlin, do you know if this is a known issue in .NET core dump generation?
Thanks,
michma
From: Lee Culver [leculver@microsoft.com](mailto:leculver@microsoft.com) Sent: Saturday, March 11, 2023 9:28 AM To: Michael Maio [michma@microsoft.com](mailto:michma@microsoft.com); NET Core Discussion [netcoredisc@microsoft.com](mailto:netcoredisc@microsoft.com); Mike McLaughlin [mikem@microsoft.com](mailto:mikem@microsoft.com) Subject: RE: exe file name gets truncated in .NET core mini dump name
@Mike McLaughlin would be the expert here.
Thanks, -Lee Culver CLR Technical Insights
From: Michael Maio [michma@microsoft.com](mailto:michma@microsoft.com) Sent: Friday, March 10, 2023 9:01 PM To: NET Core Discussion [netcoredisc@microsoft.com](mailto:netcoredisc@microsoft.com) Subject: exe file name gets truncated in .NET core mini dump name
We’re collecting mini dumps for our .NET Core app as described here: Collect Dumps on Crash - .NET | Microsoft Learn. We’re setting DOTNET_DbgMiniDumpName to\%e.%d.dmp.
On Windows, everything works fine. For example, when I crash an app named DotNetCoreConsoleApp.exe, I get a dump named DotNetCoreConsoleApp.exe..dmp.
On Linux, however, the exe file name (the %e) is getting truncated to 15 characters. For example, I get a dump named DotNetCoreConso..dmp.
Is this a known bug? Any work-arounds? We’re using .NET Core 7. I haven’t checked if it also repros on Mac yet.
Thanks,
michma