Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

mikem8361
Copy link

Shiproom template

Description

The libdbgshim.dylib launch/attach helper had a bug with module names with spaces in them. The Excel (Oded Hanson) ran into this because ship the .NET Core in a sub-directory with a space in the path.

This causes launch (or attach) with VS (VSCode or VS for Mac) to hang..

The fix is to change the vmmap output parsing to include the rest of the line as the module name.

Customer Impact

Without this fix, Excel can not debug their product and an official build is needed to get the dbgshim for insertion into VS vsdbg to fix the problem.

Regression?

No.

Risk

Low.

Link to issue

https://github.com/dotnet/coreclr/issues/20401

@mikem8361 mikem8361 added this to the 2.2 milestone Oct 12, 2018
@mikem8361 mikem8361 self-assigned this Oct 12, 2018
@mikem8361 mikem8361 added the Servicing-consider Issue for next servicing release review label Oct 23, 2018
@danmoseley
Copy link
Member

@dotnet-bot test this please

@danmoseley
Copy link
Member

I guess the build is partly broken in this branch at least for arm64

make[2]: *** No rule to make target 'System.Native/CMakeFiles/System.Native.dir/build'.  Stop.
make[2]: Leaving directory '/mnt/j/workspace/dotnet_coreclr/release_2.2/arm64_debug_small_page_size_innerloop_prtest/fx/bin/obj/Linux.arm64.Release/native'
CMakeFiles/Makefile2:181: recipe for target 'System.Native/CMakeFiles/System.Native.dir/all' failed
make[1]: *** [System.Native/CMakeFiles/System.Native.dir/all] Error 2

char moduleName[PATH_MAX];

if (sscanf_s(line, "__TEXT %p-%p [ %*[0-9K ]] %*[-/rwxsp] SM=%*[A-Z] %s\n", &startAddress, &endAddress, moduleName, _countof(moduleName)) == 3)
if (sscanf_s(line, "__TEXT %p-%p [ %*[0-9K ]] %*[-/rwxsp] SM=%*[A-Z] %[^\n]", &startAddress, &endAddress, moduleName, _countof(moduleName)) == 3)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, can the VSIZE RSDNT DIRTY SWAP fields never have an M in there for megabytes? Are they always in kilobytes?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know they are always in KB. This isn't well documented.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I couldn't find any info on this (though I also wasn't sure what to search for).

Is it possible to create a test case with an app that has a really large "one of those things" to see what it is? E.g. what if an app has more than 99,999KB of VSIZE? (only 5-digit numbers fit in the table)

@mikem8361
Copy link
Author

mikem8361 commented Oct 23, 2018 via email

@mikem8361
Copy link
Author

mikem8361 commented Oct 23, 2018 via email

@jamshedd jamshedd added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 23, 2018
@jamshedd
Copy link
Member

Approved for 2.2

@mikem8361 mikem8361 merged commit bba9fda into dotnet:release/2.2 Oct 24, 2018
@mikem8361 mikem8361 deleted the osxmodule2.2 branch October 24, 2018 00:28
@Eilon
Copy link

Eilon commented Oct 24, 2018

Is it worth looking into the parsing further? To be clear, I have no background in this at all, just saw something curious.

@mikem8361
Copy link
Author

@Eilon you could write up an issue to investigate this more and assign it to me.

@Eilon
Copy link

Eilon commented Oct 24, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Diagnostics Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants