microsoft / microsoft/MIEngine
ExclusiveCmdAsync stuck on "info sharedlibrary"
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 859
- Forks
- 233
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 3
Description
@gregg-miskelly
When attaching to a running process through VS 17 it would always hang at some point in the process. So I cloned this project and but some breakpoints in to see where it is hanging. Turns out that the command "info sharedlibrary" is getting hung up, if I but some code in Debugger.cs to return "" when this command is going to run it no longer hangs.
I am also able to duplicate this randomly if I run the same command on the command line when attaching to a pid.
This is what I run:
gdb --interpreter=mi
Then from (gdb) prompt (I pulled these from the output of the MIEngine debug session):
1001-gdb-set target-async on
1002-gdb-set stop-on-solib-events 1
1003-interpreter-exec console "shell readlink -f /proc/1716/exe”
1004-file-exec-and-symbols /code/tmenting/dev/wms/src/my_pg
1005-interpreter-exec console "show architecture"
1006-target-attach 1716
1007-thread-info 1
1008-break-insert -f hubmgrmenu.cpp:290
1009-symbol-list-lines /code/tmenting/dev/wms/src/my_pg.cpp
1010-break-insert -f my_pgm.cpp:143
1011-interpreter-exec console "info sharedlibrary"
Sometimes I get the full list and that returns me to the (gdb) prompt. However, the problem is that sometimes I get part of the output displayed to screen, and it waits for me to press enter to display the rest. It is almost like it is being piped to "less" and I have to enter to continue
How can we work around this? I am evaluating VS17 to see if it works for our environment. I would like to get this figured out soon before my trial periods start running out.
I have more data I could send privately if you are willing. Thanks!
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 in Debugger.cs at ExclusiveCmdAsync and reproduce the listed gdb MI attach sequence, especially interpreter-exec console "info sharedlibrary". Trace why the command sometimes waits for paged output; done means attaching completes without requiring interactive input and the command returns reliably.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100