Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTarget.ClrVersions crashes when reading live process v0.8.31 #31

Closed
opulos opened this issue Nov 4, 2015 · 3 comments
Closed

DataTarget.ClrVersions crashes when reading live process v0.8.31 #31

opulos opened this issue Nov 4, 2015 · 3 comments

Comments

@opulos
Copy link

opulos commented Nov 4, 2015

The exact same code, parameters and process work using v0.8.30. So it seems like a new problem.

DataTarget dataTarget = DataTarget.AttachToProcess(processId, timeoutMillis, attachFlag);

ProcessId is process to a running .NET program.
timeoutMillis = 5000
attachFlag = Passive

Then accessing dataTarget.ClrVersions crashes on this line:
if (ReadMemory(moduleBase + 0x3c, buffer, buffer.Length, out read) && read == buffer.Length)

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

at Microsoft.Diagnostics.Runtime.LiveDataReader.GetFileProperties(UInt64 moduleBase, UInt32& filesize, UInt32& timestamp) in c:\Microsoft\clrmd\Microsoft.Diagnostics.Runtime\datatarget.cs:line 2522 at Microsoft.Diagnostics.Runtime.LiveDataReader.EnumerateModules() in c:\Microsoft\clrmd\Microsoft.Diagnostics.Runtime\datatarget.cs:line 2378 at Microsoft.Diagnostics.Runtime.DataTargetImpl.InitModules() in c:\Microsoft\clrmd\Microsoft.Diagnostics.Runtime\datatarget.cs:line 1372 at Microsoft.Diagnostics.Runtime.DataTargetImpl.EnumerateModules() in c:\Microsoft\clrmd\Microsoft.Diagnostics.Runtime\datatarget.cs:line 1350 at Microsoft.Diagnostics.Runtime.DataTargetImpl.get_ClrVersions() in c:\Microsoft\clrmd\Microsoft.Diagnostics.Runtime\datatarget.cs:line 1220

Let me know if you need more information, or would like to see the error in action via a join.me meeting. I can host the meeting.

@opulos
Copy link
Author

opulos commented Nov 4, 2015

Note: This error occurs when using the source code zip you provided in your latest post. However, the error does not occur when using the DLL from nuget.

@leculver
Copy link
Contributor

leculver commented Nov 4, 2015

Thank you for the bug report! I will not be able to take a look until this weekend, but I'll be sure it's fixed asap, and certainly before publishing a NuGet package.

@leculver
Copy link
Contributor

Hello! This issue is being closed due to its age. The codebase has moved significantly since this was filed. Please feel free to open a new issue for ClrMD about this issue if it still reproduces on ClrMD 1.0. (Also, I apologize for having not looked at or resolved this earlier and for resolving it now. In order for me to be able to make some progress on the growing issue count in ClrMD I need to clear the backlog down to a manageable set of issues, but do feel free to file a new one if this is still a problem.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants