hashicorp / hashicorp/nomad

Nomad handles app excetions

Open
#12,294 2 comments 0 reactions 0 assignees View on GitHub
theme/platform-windows type/bug
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

Faced the problem of catching application crash dumps.
A simple program that throws an exception:
```
#include
#include
#include

int main()
{
std::this_thread::sleep_for(std::chrono::milliseconds(10000));
throw std::exception();
}
```
When I run this application without nomad WER (Windows Error Reporting), a crash dump is generated. When I run the application under nomad nothing is saved.
My guess is that nomad catches all exceptions and WER fails to create a dump.
### Nomad version
Nomad v1.2.6 (a6c6b475db5073e33885377b4a5c733e1161020c)

### Operating system and Environment details
Windows Server 2019
Microsoft Windows [Version 10.0.17763.1999]

### Reproduction steps
1. Setup collecting local dumps
https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
2. Run job.
3. After crash the app no dumps has been collected.
#### Expected Result
Stored dump.

#### Actual Result

### Job file (if appropriate)
```
job "crash-dev"{
datacenters = ["dc1"]
type = "service"

group "mt5-vs" {
count = 1

constraint {
attribute = "${node.unique.name}"
operator = "regexp"
value = "exn-dev-mt5-vs"
}

task "app" {
driver = "raw_exec"

config {
command = "c:/_crashes/app/CrashApp.exe"
}

resources {
cpu = 200
memory = 200
}
}
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the provided CrashApp.exe through Nomad's raw_exec task using the supplied job file, then compare it with running the program directly. Review the linked Windows Error Reporting guidance and the raw_exec process entry point to determine why local dump collection differs. Done means the expected crash dump is stored when the application crashes under Nomad.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devops, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.