简体   繁体   English

使用 Linux 在 Azure App Service 上哪里可以找到 coredump?

[英]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.我正在使用托管在 linux 上的 Azure App Service 来使用 .Net Core 6.0 应用程序。

I have a null pointer error that is resulting in a segfault, that in turn is taking down the app service.我有一个导致段错误的 null 指针错误,这反过来又导致应用程序服务中断。 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.我遇到了一些导致段错误的错误,所以虽然我可以修复 null 指针,但我真的很想找出容器崩溃的原因。

I can see the the following in AppServiceConsoleLogs :我可以在AppServiceConsoleLogs中看到以下内容:

/opt/startup/startup.sh: line 17: 65 Segmentation fault (core dumped) do.net xxx.dll /opt/startup/startup.sh:第 17 行:65 分段错误(核心已转储)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.我通过进入 SSH 控制台查看了文件夹,但我找不到任何看起来像 memory 转储的东西。

Where to find coredump on Azure App Service using Linux?使用 Linux 在 Azure App Service 上哪里可以找到 coredump?

I have deployed the .NET Core 6 App to Azure App service.我已经将 .NET Core 6 App 部署到 Azure App 服务。

  • Navigate to Azure portal => your Deployed App Service => Advanced Tools => Go .导航到Azure portal => 您Deployed App Service => Advanced Tools => Go

  • Click on - Site wwwroot .单击Site wwwroot

在此处输入图像描述

  • Deployed files will be compiled into dll files .部署的文件会编译成dll files

Click on the file, you can see the content.点击文件,可以看到内容。

在此处输入图像描述

  • We can also check the files in Bash .我们也可以查看Bash中的文件。
  • In Bash , Navigate to the Application root directory and run ls .You can see the deployed files.Bash ,导航到应用程序根目录并运行ls ,您可以看到部署的文件。

在此处输入图像描述

  • In Configuration section => General Settings , check the startup command.Configuration部分 => General Settings ,检查启动命令。
  • It has to be它一定要是
dotnet YourAppName.dll
  • Make sure the dll is available in Bash or SSH .确保dllBashSSH中可用。

在此处输入图像描述

Update:更新:

We can find the core dumps in LogFiles/core folder.我们可以在LogFiles/core文件夹中找到核心转储。 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.感谢@Sourabh Edake的命令。

在此处输入图像描述

  • Restart the app.重新启动应用程序。 Whenever there is an exception, the core dump will be created in the mentioned LogFiles/core folder.每当出现异常时,将在提到的LogFiles/core文件夹中创建核心转储。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure 应用服务 linux 忽略自定义命令 - Azure app service linux custom command ignored 在 Azure linux 应用程序服务上执行 sudo 命令作为启动的一部分 - Execute sudo commands as part of startup on Azure linux app service 在 Azure 上使用 PM2 运行 nextjs 时出错 在 Linux 上应用服务 - Error running nextjs with PM2 on Azure App Service on Linux Azure Linux 带有 .Net Core Stack 的应用服务。 无法使用 NodeJS - Azure Linux App Service with .Net Core Stack. Unable to use NodeJS 如果 App Service 崩溃,我可以在 Azure 的哪个位置设置 email 地址以接收电子邮件? - Where in Azure can i set the email address to receive emails if an App Service crashes? 使用 Azure PowerShell 查找 App Insights 的 LA 工作区 - Find LA workspace for an App Insights using Azure PowerShell 仅使用 TXT 记录验证 Azure 应用服务中的自定义域 - Validating custom domain in Azure App service by using only TXT record 将带有wsHttpBinding的WCF服务迁移到Azure应用服务 - Migrating WCF service with wsHttpBinding to Azure App Service 如何在Azure Web App Service Linux环境下安装自己的Python package? - How can I install my own Python package in Azure Web App Service Linux environment? Azure Service App 中未定义环境变量 - Environment Variables are undefined in Azure Service App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM