Race condition at the end of hot code replacement causes inconsistent UI state
還沒有人認領這個 Issue。
評估
研究方向
從 JavaHotCodeReplaceProvider.redefineClasses() 和 stepIntoThread(ThreadReference) 開始,接著檢查 ProtocolServer.sendEvent(DebugEvent) 以及它對 StoppedEvent 和 ContinuedEvent 的處理。重現或追蹤 StepEvent 的時序,並在 VS Code UI 能夠一致反映目標程序在熱程式碼替換後處於暫停狀態時,視為該 issue 已完成。
由索引模型根據 Issue 內容生成。
描述
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:
context.getProtocolServer().sendEvent(new Events.StoppedEvent("step", thread.uniqueID()));
context.getProtocolServer().sendEvent(new Events.ContinuedEvent(thread.uniqueID()));
However, 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 > 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.
- 主要語言
- Java
- 星號
- 409
- 分支
- 204
- 平均合併
- 1 天 13 小時
- 30 天內合併 PR
- 4
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/java-debug 的其他 Issue
-
ai-triaged bug
難度 4/5 3-5 天 新手友好度 35/100
microsoft/java-debug#611 · 2 則留言 ·
-
ai-triaged enhancement
難度 4/5 3-5 天 新手友好度 35/100
microsoft/java-debug#608 · 3 則留言 ·
-
ai-triaged question
難度 5/5 一週以上 新手友好度 30/100
microsoft/java-debug#597 · 1 則留言 ·
-
ai-triaged bug
難度 4/5 3-5 天 新手友好度 25/100
microsoft/java-debug#588 · 1 則留言 ·
-
ai-triaged question
難度 2/5 1-3 小時 新手友好度 35/100
microsoft/java-debug#582 · 1 則留言 ·
查看 microsoft/java-debug 的全部 Issue
相似的 Issue
-
Bug Java Platform: Java
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-java#6138 · 1 則留言 ·
-
bug needs triage p2
難度 2/5 1-3 小時 新手友好度 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 則留言 ·
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
apache/rocketmq-dashboard#4654 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 76/100