Title: Updating progress pane using timer causes race condition that would randomly crash powershell · Issue #2800 · PowerShell/PowerShell · GitHub
Open Graph Title: Updating progress pane using timer causes race condition that would randomly crash powershell · Issue #2800 · PowerShell/PowerShell
X Title: Updating progress pane using timer causes race condition that would randomly crash powershell · Issue #2800 · PowerShell/PowerShell
Description: With PR #2640, a timer is used to trigger updating progress pane every 100 ms to improve progress record rendering performance (commit: 760a9c2). Before the change, _progPane.Show and _pendingProgress.Update used to be called on the same...
Open Graph Description: With PR #2640, a timer is used to trigger updating progress pane every 100 ms to improve progress record rendering performance (commit: 760a9c2). Before the change, _progPane.Show and _pendingProgr...
X Description: With PR #2640, a timer is used to trigger updating progress pane every 100 ms to improve progress record rendering performance (commit: 760a9c2). Before the change, _progPane.Show and _pendingProgr...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/2800
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Updating progress pane using timer causes race condition that would randomly crash powershell","articleBody":"With PR #2640, a timer is used to trigger updating progress pane every 100 ms to improve progress record rendering performance (commit: https://github.com/PowerShell/PowerShell/commit/760a9c2997148f32a0b763165a32647abe49b985). Before the change, `_progPane.Show` and `_pendingProgress.Update` used to be called on the same thread, and now they will be called on different threads. This causes race conditions -- **for all type members that are used by both methods, they might be changed at the same time and the states may be corrupted.**\r\n\r\nThe screenshot below is from a recent CI build on master branch. The exception was raised from [RenderHelper](https://github.com/PowerShell/PowerShell/blob/master/src/Microsoft.PowerShell.ConsoleHost/host/msh/PendingProgress.cs#L763), and that was because it was actually enumerating over `PendingProgress._topLevelNodes` and at the same time new node was being added to/removed from `_topLevelNodes` by [Update](https://github.com/PowerShell/PowerShell/blob/master/src/Microsoft.PowerShell.ConsoleHost/host/msh/PendingProgress.cs#L60).\r\n\r\n\r\n\r\n\r\n/cc @iSazonov @lzybkr ","author":{"url":"https://github.com/daxian-dbw","@type":"Person","name":"daxian-dbw"},"datePublished":"2016-11-29T07:01:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/2800/PowerShell/issues/2800"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1a64c16a-3459-73ec-d625-269baa8f6029 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B438:370C10:EFBC57:148DC83:6A55C9DC |
| html-safe-nonce | 9d763919bb0c46477760e356f2ae554e91ac841abccbbd1b0b5b0d92d2777a31 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDM4OjM3MEMxMDpFRkJDNTc6MTQ4REM4Mzo2QTU1QzlEQyIsInZpc2l0b3JfaWQiOiI1MTgzNDAzNzgwMDAwMzAzNTgwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 697aab6264718162d84240b97044c3e68730a404c8a8d5745ec80cc27c4bb54e |
| hovercard-subject-tag | issue:192203507 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/2800/issue_layout |
| twitter:image | https://opengraph.githubassets.com/54a828dca07b24abf7316815b03ccb1ab6a6cd28b370d9f1865d45261c5b6f53/PowerShell/PowerShell/issues/2800 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/54a828dca07b24abf7316815b03ccb1ab6a6cd28b370d9f1865d45261c5b6f53/PowerShell/PowerShell/issues/2800 |
| og:image:alt | With PR #2640, a timer is used to trigger updating progress pane every 100 ms to improve progress record rendering performance (commit: 760a9c2). Before the change, _progPane.Show and _pendingProgr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | daxian-dbw |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8f8e1726192df8dce16872ceb503336c12e9ae78 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width