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

removed ImmutableArray from json.net usage. and moved to IList #21539

Merged
merged 2 commits into from
Aug 17, 2017

Conversation

heejaechang
Copy link
Contributor

this is port of #21395 to dev15.3.x branch.

Customer scenario

VS crashes at random point when C#/VB proects are loaded to VS.

Bugs this fixes:

https://devdiv.visualstudio.com/DevDiv/_workitems?id=473979&fullScreen=false&_a=edit

Workarounds, if any

Make sure VS uses newtonsoft.json shipped with VS not one in the GAC or one in some VS extensions by deleting those.

Risk

low. There should be no behavior or noticeable perf changes. it just changes collection type we use to marshal collections between 2 processes.

Performance impact

there could be some allocations differences due to creating different kinds of collections (List vs ImmutableArray) but not significant.

Is this a regression from a previous update?

Kind of yes. in RTM, we used old version of newtonsoft.json to build, so didn't try to use ImmutableArray, after RTM, we moved all dependencies to current (what VS uses) which support ImmutableArray, so we changed all code to use ImmutableArray.

Root cause analysis:

This is general problem for any dll that are not specific to VS but VS depends on. we just encountered it since newstonsoft.json is such a popular one. and some other software GACed the dll that happened to be same version as VS uses but target different framework.

How was the bug found?

Watson. feedbacks.

@heejaechang
Copy link
Contributor Author

@Pilchie is this right branch?

@heejaechang
Copy link
Contributor Author

@dotnet/roslyn-analysis @dotnet/roslyn-ide can you take a look? we want to bring this to escrow.

this is port of #21395 to dev15.3.x branch.

@Pilchie
Copy link
Member

Pilchie commented Aug 15, 2017

Yes, this is the right branch.

Can we work on extra validation for this please? Ensure we have a machine set up with the problematic dll in the GAC, verify the crash repros without the fix, doesn't repro with the fix, as well as testing the features affected by these changes.

@richaverma1 can help coordinate some of the testing here.

Copy link
Member

@Pilchie Pilchie left a comment

Choose a reason for hiding this comment

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

These changes look right to me, but I'm wondering what we can do to ensure it's the entire set?

@CyrusNajmabadi
Copy link
Member

@heejaechang Did you just do a cherry-pick here? Are there any extra changes you had to make manually? If so, can you point them out?

@heejaechang
Copy link
Contributor Author

I didn't do cherry-pick since code is quite different. (master uses new StreamRpc version that uses InvokeWithCancellation and dev15.3.x uses old InvokeAsync which have cancellation at the session)

I went each file and manually re-did the work.

@CyrusNajmabadi
Copy link
Member

ok. i can review later tonight then!

@heejaechang
Copy link
Contributor Author

@Pilchie sure, let me do some verification today. can I ask vendor to do some testing as well?

@heejaechang
Copy link
Contributor Author

done testing. found some issues and pushed more changes. @Pilchie can I get some help from vendor on doing more testing on these?

@brettfo
Copy link
Member

brettfo commented Aug 17, 2017

Merging at the request of @Pilchie.

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

Successfully merging this pull request may close these issues.

5 participants