microsoft / microsoft/MIEngine

`MapWindowsToCygwin` returns Windows path

Open
#1,498 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
859
Forks
233
Avg merge
1d 6h
Merged PRs (30d)
3

Description

Another issue like #1418 that can cause wrong paths to be returned from MapWindowsToCygwin.

If LaunchCygPathAndReadResult fails, due to the five second timeout, MapWindowsToCygwin will return the original Windows path. This happened to a coworker of mine because the name resolution to our domain controller is sometimes extremely slow, which causes the startup of many Cygwin programs to take a lot longer than usual.

The symptom was an error message when launching the debugger. It will read somewhat like this:

GDB failed with message:
C:Dir1Dir2PathToTheExecutable: No such file or directory.

I'd like to receive a proper error when LaunchCygPathAndReadResult times out. It took us a lot of time and digging around to figure out why GDB was reporting such a path, only to find out that, ultimately, the MIEngine was the root cause for this error.

Contributor guide

No contributing guide indexed for this repository

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

Start by tracing MapWindowsToCygwin and its call to LaunchCygPathAndReadResult, focusing on the five-second timeout path described in the issue. Reproduce or inspect the failure behavior and make completion mean that a timeout produces a proper error instead of returning the original Windows path.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.