Bug 564872 - ResourceException Marker id not found when calling BreakpointManager.removeBreakpoints()
Summary: ResourceException Marker id not found when calling BreakpointManager.removeBr...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.15   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-02 10:33 EDT by Simeon Andreev CLA
Modified: 2020-07-02 11:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Andreev CLA 2020-07-02 10:33:42 EDT
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 breakpont 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.
Comment 1 Eclipse Genie CLA 2020-07-02 11:27:50 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/165753