Skip to content

Conversation

@stefansjfw
Copy link
Contributor

Summary of the Pull Request

What is this about:
Stack trace shows that PT Run crashed in UpdateResultsListViewAfterQuery function, line Results.Results.NotifyChanges(). For some reason array is being copied (at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)`) there...

My assumption is that this crash happens because Results.Results can be changed in parallel both from Parallel.ForEach(plugins, (plugin) => block while executing delayed plugins (e.g. Results.Results.RemoveAll(r => r.Result.PluginID == plugin.Metadata.ID); line) and UpdateResultsListViewAfterQuery which is invoked after processing non-delayed plugins (System.Array.Copy mentioned above).

What is include in the PR:

How does someone test / validate:

Quality Checklist

Contributor License Agreement (CLA)

A CLA must be signed. If not, go over here and sign the CLA.

@stefansjfw stefansjfw changed the title Surround UpdateResultsListViewAfterQuery logic with addResultLock Put UpdateResultsListViewAfterQuery calls inside addResultLock blocks Oct 29, 2021
Copy link
Contributor

@SeraphimaZykova SeraphimaZykova left a comment

Choose a reason for hiding this comment

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

Cannot repro the crash, but changes look reasonable.

@stefansjfw
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stefansjfw
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stefansjfw stefansjfw merged commit a881e6b into master Nov 1, 2021
@stefansjfw stefansjfw deleted the stefan/fix_8921 branch November 1, 2021 16:17
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