简体   繁体   中英

Where to find coredump on Azure App Service using Linux?

I am using Azure App Service hosted on linux to use a.Net Core 6.0 app.

I have a null pointer error that is resulting in a segfault, that in turn is taking down the app service. I have had a few errors that result in segfaults so while I can fix the null pointer I really want to find why the container is crashing.

I can see the the following in AppServiceConsoleLogs :

/opt/startup/startup.sh: line 17: 65 Segmentation fault (core dumped) do.net xxx.dll

I am hoping if I can find the dumped core I might figure out the segmentation fault.

I have looked around the folders by going into the SSH console, but I cannot find anything that looks like memory dump.

Where to find coredump on Azure App Service using Linux?

I have deployed the .NET Core 6 App to Azure App service.

  • Navigate to Azure portal => your Deployed App Service => Advanced Tools => Go .

  • Click on - Site wwwroot .

在此处输入图像描述

  • Deployed files will be compiled into dll files .

Click on the file, you can see the content.

在此处输入图像描述

  • We can also check the files in Bash .
  • In Bash , Navigate to the Application root directory and run ls .You can see the deployed files.

在此处输入图像描述

  • In Configuration section => General Settings , check the startup command.
  • It has to be
dotnet YourAppName.dll
  • Make sure the dll is available in Bash or SSH .

在此处输入图像描述

Update:

We can find the core dumps in LogFiles/core folder. But initially, it is disabled. To enable it, we need to add the below command in Startup of the deployed app service.

ulimit -c unlimited

Thanks @ Sourabh Edake for the command.

在此处输入图像描述

  • Restart the app. Whenever there is an exception, the core dump will be created in the mentioned LogFiles/core folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM