ResourceException Marker id not found when calling BreakpointManager.removeBreakpoints()
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #2218 @trancexpress による — マージされずにクローズ
評価
調査の方向性
org.eclipse.debug.internal.core.BreakpointManager.removeBreakpoints(IBreakpoint[], boolean) から始め、その workspace-rule の処理を bug 540132 および参照されている commit と比較します。JavaDebugOptionsManager.updateBreakpointMessages(IBreakpoint[]) と marker.setAttribute が関与するシーケンスを再現します。完了の条件は、breakpoints の削除によって ResourceException の marker-not-found スタックトレースが発生しなくなることです。
索引モデルが 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時間
- マージ済み PR(30日)
- 43
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
objectionary/lints#1556 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
wildfly/wildfly-launcher#99 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
apache/rocketmq#11427 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
A failed JNA download is reported as a corrupt zip, because `curl` in `Makefile` lacks `--fail`オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
objectionary/phino#1884 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信