microsoft / microsoft/vscode-windows-process-tree
Invocations to `getProcessTree`/`getProcessList` with different flags are confused
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 94
- Forks
- 29
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 4
Description
Related to (but neither caused nor fixed by): https://github.com/microsoft/vscode-windows-process-tree/pull/46.
Filing because I noticed the issue by inspection, not from a particular known defect.
Basically, because of the gating to native.getProcessList, if one invocation is called with one set of flags, and then with another is made before the first returns, the second invocation will get results from the wrong flags. This could confuse code in cases where e.g. you requested memory info and occasionally do not receive it seemingly randomly.
Instead, there should probably be logic along the lines of:
- different queues for different sets of flags
- on completion of an invocation, callbacks run for all queues with fully-satisfied flags
- if there are queued requests for additional flags, re-run with those flags immediately
Or something like that. Or just always run with all the flags, unless there's a performance reason not to.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing getProcessTree and getProcessList through the gating around native.getProcessList, focusing on how concurrent invocations and their flags are queued. Confirm the behavior with overlapping requests using different flags; done means each invocation receives results satisfying its own flags, including memory information when requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100