Title: Race condition at the end of hot code replacement causes inconsistent UI state · Issue #559 · microsoft/java-debug · GitHub
Open Graph Title: Race condition at the end of hot code replacement causes inconsistent UI state · Issue #559 · microsoft/java-debug
X Title: Race condition at the end of hot code replacement causes inconsistent UI state · Issue #559 · microsoft/java-debug
Description: At the end of JavaHotCodeReplaceProvider.redefineClasses() execution JavaHotCodeReplaceProvider.stepIntoThread(ThreadReference) is called which sends JDI StepRequest to the target process and subscribes for StepEvent, on reception of whi...
Open Graph Description: At the end of JavaHotCodeReplaceProvider.redefineClasses() execution JavaHotCodeReplaceProvider.stepIntoThread(ThreadReference) is called which sends JDI StepRequest to the target process and subsc...
X Description: At the end of JavaHotCodeReplaceProvider.redefineClasses() execution JavaHotCodeReplaceProvider.stepIntoThread(ThreadReference) is called which sends JDI StepRequest to the target process and subsc...
Opengraph URL: https://github.com/microsoft/java-debug/issues/559
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Race condition at the end of hot code replacement causes inconsistent UI state","articleBody":"At the end of JavaHotCodeReplaceProvider.redefineClasses() execution JavaHotCodeReplaceProvider.stepIntoThread(ThreadReference) is called which sends JDI StepRequest to the target process and subscribes for StepEvent, on reception of which the following events for the UI are populated in that order:\r\n`context.getProtocolServer().sendEvent(new Events.StoppedEvent(\"step\", thread.uniqueID()));\r\n context.getProtocolServer().sendEvent(new Events.ContinuedEvent(thread.uniqueID()));`\r\n\r\nHowever, ProtocolServer.sendEvent(DebugEvent) usually reverses this order by putting StoppedEvent to the event queue until ProtocolServer command processing (redefineClasses in this case) has completed. All other types of events are sent immediately. As JDI StepRequest is usually processed very quickly by the target process, the usual order for the VS Code UI to receive the events is ContinuedEvent \u003e StoppedEvent. In contrast, if StepRequest processing happens to be slow then StoppedEvent is sent first and ContinuedEvent as the final one. In that case the Debug toolbar in VS Code UI will be shown like in running state with Stop button while the target process is still suspended.\r\n","author":{"url":"https://github.com/akuusik-perforce","@type":"Person","name":"akuusik-perforce"},"datePublished":"2024-07-08T13:15:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/559/java-debug/issues/559"}
| 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:6c3d0ee2-d6ec-4f7c-a737-aea4685f2cba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A0B2:3DC7AA:3E54C8C:549EBED:69708894 |
| html-safe-nonce | 35d2b370b707014f6d67fb93a11a3613da7b55a4f66488be91139db2090e7776 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMEIyOjNEQzdBQTozRTU0QzhDOjU0OUVCRUQ6Njk3MDg4OTQiLCJ2aXNpdG9yX2lkIjoiMzQ0ODgyNzI4ODQxMTQ3NDA2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b8a47300a73a1f242de25f5f217fd928ccddb85f93ec6164c723518b721e60cd |
| hovercard-subject-tag | issue:2395616679 |
| 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/microsoft/java-debug/559/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c212f33ed1d16dc119adde0cee364afab3901252c562c02f4914efd1fb3176c6/microsoft/java-debug/issues/559 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c212f33ed1d16dc119adde0cee364afab3901252c562c02f4914efd1fb3176c6/microsoft/java-debug/issues/559 |
| og:image:alt | At the end of JavaHotCodeReplaceProvider.redefineClasses() execution JavaHotCodeReplaceProvider.stepIntoThread(ThreadReference) is called which sends JDI StepRequest to the target process and subsc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | akuusik-perforce |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/java-debug git https://github.com/microsoft/java-debug.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 102583752 |
| octolytics-dimension-repository_nwo | microsoft/java-debug |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 102583752 |
| octolytics-dimension-repository_network_root_nwo | microsoft/java-debug |
| 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 | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width