microsoft / microsoft/debug-adapter-protocol

Introduce a mechanism to protect against stale requests

Open
#153 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
HTML
Stars
1.8k
Forks
173
Avg merge
7d 7h
Merged PRs (30d)
2

Description

Some DAP requests return reference IDs that are used in subsequent requests to retrieve more data.
Since some of these reference IDs are only valid between two stop events, it is possible that a request arrives at the DA after a new stop event has already happened and the reference ID is no longer valid.

Since the DAP only requires that those reference IDs are unique for one stop event, a DA is free to reuse the IDs for every new stop. This makes it impossible for the DA to verify that an IDs is not from an old stop.

One idea to address this problem is to introduce a unique stop ID that the client receives with the stop event and can pass for any subsequent request that uses reference IDs of that stop event.

With this the DA can easily verify that a request refers to the same stop event that the DA sees. If the DAs has already seen a new stop event, stale requests can be detected and aborted.

See bug https://github.com/Microsoft/vscode/issues/27694 for details.

Contributor guide

Open the contributing guide

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.

Research direction

No files, tests, or entry points are identified. Start by reading the Debug Adapter Protocol definitions for stop events and requests that use reference IDs, then determine the protocol changes needed to carry and validate a stop ID. Done means the proposal specifies stale-request detection and its behavior across stop events.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.