Skip to content

Report teh project name that we were unable to recover a symbol from.#46237

Merged
CyrusNajmabadi merged 5 commits intodotnet:masterfrom
CyrusNajmabadi:reportProjectName
Jul 23, 2020
Merged

Report teh project name that we were unable to recover a symbol from.#46237
CyrusNajmabadi merged 5 commits intodotnet:masterfrom
CyrusNajmabadi:reportProjectName

Conversation

@CyrusNajmabadi
Copy link
Contributor

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner July 22, 2020 22:20
@CyrusNajmabadi CyrusNajmabadi requested a review from sharwell July 22, 2020 22:20
{
throw new InvalidOperationException(
$"We should always be able to resolve a symbol back on the host side:\r\n{SymbolKeyData}\r\n{failureReason}");
$"We should always be able to resolve a symbol back on the host side:\r\n{project.Name}\r\n{SymbolKeyData}\r\n{failureReason}");
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to worry about this from a PII standpoint? Does the exception message get sent or logged anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is already causing a watson crash dump. so we're already collecting all that information. i would presume normal watson pii takes effect here as this is all going through that system.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, any full memory dump would already contain 'project', so the information is already in the heap. The only risk here would be triage dumps which would capture the exception but not the local variables, or if this gets logged into some other system.

@CyrusNajmabadi
Copy link
Contributor Author

@jinujoseph i will likely want to take this in 16.7 as a followup to #46043. Effectively it includes a little more targeted information gathering as @sharwell was able to hit things in practice and narrow it down to a specific type of symbol. This may hopefully give enough information to track down the root on this.

@CyrusNajmabadi
Copy link
Contributor Author

waiting on @sharwell or @jasonmalinowski for review.

{
throw new InvalidOperationException(
$"We should always be able to resolve a symbol back on the host side:\r\n{SymbolKeyData}\r\n{failureReason}");
$"We should always be able to resolve a symbol back on the host side:\r\n{project.Name}\r\n{SymbolKeyData}\r\n{failureReason}");
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, any full memory dump would already contain 'project', so the information is already in the heap. The only risk here would be triage dumps which would capture the exception but not the local variables, or if this gets logged into some other system.


bool TryResolveLocation(Location loc, int index, out SymbolKeyResolution resolution, out string? reason)
{
var resolutionOpt = reader.ResolveLocation(loc);
Copy link
Member

Choose a reason for hiding this comment

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

Why the resolution/resolutionOpt? I only see a single use of 'resolution' and that's only to grab the symbol so worth simplifying it?

var resolutionOpt = reader.ResolveLocation(loc);
if (resolutionOpt == null)
{
reason = $"location {index} failed to resolve";
Copy link
Member

Choose a reason for hiding this comment

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

Do you want the string to also include 'location' rather than the index? It seems like that'd be more useful and also prevents the need of passing index?

}
totalFailureReason = totalFailureReason == null
? $"({reason})"
: $"({totalFailureReason} -> {reason})";
Copy link
Member

Choose a reason for hiding this comment

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

This is going to add up to a string like (((a) -> b) -> c) with a bunch of nested parenthesis; expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup. that way you can make out the 'tree/nesting' structure. i.e. you might have a few failures, which themselves have nested failures. i.e.:

(location 1 failed because (foo failed bacause (bar failed ...))) (location 2 failed because (foo failed because (...))))

not havin thte parens makes it ambiguous how this ties together.

@CyrusNajmabadi CyrusNajmabadi merged commit 15148d3 into dotnet:master Jul 23, 2020
@ghost ghost added this to the Next milestone Jul 23, 2020
@CyrusNajmabadi CyrusNajmabadi deleted the reportProjectName branch July 23, 2020 19:50
JoeRobich added a commit that referenced this pull request Jul 24, 2020
Backport #46237 to dev16.7: Report teh project name that we were unable to recover a symbol from.
@RikkiGibson RikkiGibson modified the milestones: Next, 16.8.P2 Aug 11, 2020
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

Successfully merging this pull request may close these issues.

4 participants