ResourceException Marker id not found when calling BreakpointManager.removeBreakpoints()
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #2218 来自 @trancexpress —— 已关闭,未合并
评估
调研方向
从 org.eclipse.debug.internal.core.BreakpointManager.removeBreakpoints(IBreakpoint[], boolean) 开始,并将其对 workspace-rule 的处理与 bug 540132 及所引用的 commit 进行比较。重现涉及 JavaDebugOptionsManager.updateBreakpointMessages(IBreakpoint[]) 和 marker.setAttribute 的序列;完成的标准是,移除 breakpoints 不再产生 marker-not-found 的 ResourceException 堆栈跟踪。
由索引模型根据 Issue 内容生成。
描述
See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=564872
During one of our tests we observed the following exception:
org.eclipse.core.internal.resources.ResourceException: Marker id 1332 not found.
at org.eclipse.core.internal.resources.Marker.checkInfo(Marker.java:63)
at org.eclipse.core.internal.resources.Marker.setAttribute(Marker.java:260)
at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager$2.run(JavaDebugOptionsManager.java:894)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.updateBreakpointMessages(JavaDebugOptionsManager.java:906)
at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.breakpointsChanged(JavaDebugOptionsManager.java:965)
at org.eclipse.debug.internal.core.BreakpointManager$BreakpointsNotifier.run(BreakpointManager.java:1104)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.debug.internal.core.BreakpointManager$BreakpointsNotifier.notify(BreakpointManager.java:1124)
at org.eclipse.debug.internal.core.BreakpointManager.fireUpdate(BreakpointManager.java:975)
at org.eclipse.debug.internal.core.BreakpointManager.access$4(BreakpointManager.java:962)
at org.eclipse.debug.internal.core.BreakpointManager$BreakpointManagerVisitor.update(BreakpointManager.java:788)
at org.eclipse.debug.internal.core.BreakpointManager.resourceChanged(BreakpointManager.java:699)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:305)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:295)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:158)
at org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:366)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:157)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
!SUBENTRY 1 org.eclipse.core.resources 4 376 2020-06-30 21:21:07.013
Upon investigation, the exception coincides with a call to org.eclipse.debug.internal.core.BreakpointManager.removeBreakpoints(IBreakpoint[], boolean) from our test. The code in BreakpointManager.removeBreakpoints() deletes a breakpoint marker without specifying a rule, and so can cause race condition (and e.g. cause the error stack trace above).
As in bug 540132 (https://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=897972b60a60c5bd9d0b8138d5be9b07addfcaf5), the breakpoints operation should specify a workspace modification rule if there is no matching outer rule.
To reproduce:
- Debug Eclipse.
- In the debuggee Eclipse, set a breakpoint at the
System.out.println()in this snippet:
package test;
public class TestClass {
public static void main1(String[] args) {
System.out.println("hello world");
}
}
- Set a breakpoint at
org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.updateBreakpointMessages(IBreakpoint[]), at:
marker.setAttribute(IMarker.MESSAGE, type + info);
- Set a breakpoint at the start of:
org.eclipse.debug.internal.core.BreakpointManager.removeBreakpoints(IBreakpoint[], boolean) - Change the
mainmethod name tomain1(simply by typing, no need for refactor rename) and save. This hits the breakpoint atJavaDebugOptionsManager.updateBreakpointMessages. - Remove all breakpoints with the respective Breakpoints view action, this hits the breakpoint at
BreakpointManager.removeBreakpoint(). - Resume first the thread in
BreakpointManager(twice), then the thread inJavaDebugOptionsManager.
- 主要语言
- Java
- 星标
- 165
- 派生
- 174
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 43
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-platform/eclipse.platform 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
eclipse-platform/eclipse.platform#3019 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
eclipse-platform/eclipse.platform#2940 ·
维护者通常 1 天内回复
-
Terminal views all show same name 'Terminal' in Ctrl+F7 view switcher popup可能已有人在做 @ravnskjaer 于 5 天前认领。 未关闭bug good first issue help wanted
难度 2/5 1-3 小时 新手友好度 68/100
eclipse-platform/eclipse.platform#2774 · 4 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
eclipse-platform/eclipse.platform#2593 · 7 条评论 ·
维护者通常 1 天内回复
-
bug regression
难度 3/5 1-2 天 新手友好度 56/100
eclipse-platform/eclipse.platform#3022 · 8 条评论 ·
维护者通常 1 天内回复
查看 eclipse-platform/eclipse.platform 的全部 Issue
相似的 Issue
-
status: waiting-for-triage
难度 2/5 1-3 小时 新手友好度 72/100
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
AOT compilation fails for derived delete queries returning Set可能已有人在做 @ryujungkyun 今天认领。 未关闭status: waiting-for-triage
难度 2/5 1-3 小时 新手友好度 72/100
spring-projects/spring-data-jpa#4387 ·
维护者通常 3 天内回复
-
:ml/Transform >bug Team:ML
难度 2/5 半天 新手友好度 64/100
elastic/elasticsearch#161960 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复