Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Windows PID reuse can hang resource shutdown

Open
#274 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go

Research direction

The bug is in pkg/process/process_util.go in the GetProcessTree function. Start by examining how process relationships are enumerated on Windows. Look for where parent-child links are established and add checks for process creation times to detect stale parents. Implement a visited set to prevent cycles. Test by simulating PID reuse on Windows, perhaps using the reproduction steps from the linked Aspire issue.

Written by the indexing model from the issue text.

Description

Problem

DCP can get stuck while stopping a process on Windows. If Windows reuses a PID, an older process can still list that number as its parent. This can create a circular relationship when DCP looks up descendants.

GetProcessTree does not check for stale parent relationships or previously visited processes, so it keeps following the cycle until shutdown times out.

Reproduction

Reproduced with DCP 0.26.2 on Windows x64 by repeatedly stopping, starting, and restarting an Aspire worker. Restart failed on cycle 12; the other two runners completed 30 cycles each.

The captured process identities show the cycle. The shutdown helper used roughly one CPU core until its 15-second deadline expired, and the CLI returned exit code 16.

Failing CI job · Captured diagnostics

Tracked in microsoft/aspire#20103.

Expected behavior

Process-tree traversal should terminate and include only valid descendants. Check process creation times to reject stale parent relationships, and guard against revisiting processes.

A cycle guard alone is insufficient: it could still leave unrelated processes in the list to kill. No product fix has been applied yet.

Dominant language
Go
Stars
190
Forks
24
Avg merge
2d 3h
Merged PRs (30d)
20

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/dcp

All issues in microsoft/dcp

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.