dotnet / diagnostics

This repository contains the source code for various .NET Core runtime diagnostic tools and documents.
MIT License
1.18k stars 356 forks source link

Write dump failed - HRESULT: 0x00000000 with nothing in service stdout #4771

Closed shaojun closed 1 month ago

shaojun commented 2 months ago

Description

OS info:

cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

SDK info:

dotnet --info
.NET SDK:
 Version:           8.0.302
 Commit:            ef14e02af8
 Workload version:  8.0.300-manifests.f6879a9a
 MSBuild version:   17.10.4+10fbfbf2e

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/8.0.302/

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      8.0.6
  Architecture: x64
  Commit:       3b8b000a0e

.NET SDKs installed:
  8.0.302 [/usr/share/dotnet/sdk]

dotnet-dump info:

 dotnet-dump --version
8.0.532401+d98406ff95be0a8398d4c403056c5705389665f3

My service is a .NET CORE 6 console application:

 systemctl status LiteCore.service
● LiteCore.service - LiteCore for controlling devices
     Loaded: loaded (/etc/systemd/system/LiteCore.service; disabled; vendor preset: enabled)
     Active: active (running) since Tue 2024-07-02 11:23:30 CST; 30min ago
    Process: 1965215 ExecStartPre=/bin/sleep 5 (code=exited, status=0/SUCCESS)
   Main PID: 1965216 (dotnet)
     Tasks: 30 (limit: 4203)
     Memory: 209.2M
        CPU: 1min 487ms
     CGroup: /system.slice/LiteCore.service
             ├─1965216 /usr/bin/dotnet LiteCore.dll

When trying to dump the service process, already in root priviledge, always see error:

dotnet-dump collect -p 1965216 --diag

Writing full to /root/LiteCore/core_20240702_115547
Write dump failed - HRESULT: 0x00000000.

and check the service log, see nothing useful, only my application output:

journalctl -u LiteCore.service -n 100
#just application output, nothing related to dotnet-dump
#just application output, nothing related to dotnet-dump

Configuration

Regression?

Other information

hoyosjs commented 2 months ago

@shaojun from the look of this, you're running this from systemd? A few questions:

dotnet-policy-service[bot] commented 1 month ago

Hi @shaojun. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

dotnet-policy-service[bot] commented 1 month ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

dotnet-policy-service[bot] commented 1 month ago

Hi @shaojun. We are closing this issue due to inactivity. If you comment within 30 days it will automatically reopen. If you are not the author of this issue and you're facing the same problem, feel free to open a new issue referencing this one.