Skip to content

Race condition when initializing ProcessConsoleManager.fColorProviders #2637

@trancexpress

Description

@trancexpress

Seen in the latest fail for #596, see: #596 (comment)

To reproduce:

  1. Set a breakpoint at: org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager.getColorProvider(String)
  2. Debug Eclipse, make sure the Console view is open.
  3. In the debuggee, create a snippet:
public class Test3 {

	public static void main(String[] args) throws InterruptedException {
		Thread.sleep(60_000);
	}
}
  1. Launch this snippet twice.
  2. Observe two threads suspended at the breakpoint:
"Worker-2: Creating console for /usr/lib/jvm/java-21-openjdk/bin/java (Apr 30, 2026, 11:28:57 AM) [pid: 53966]" #74 [51843] prio=5 os_prio=0 cpu=31.67ms elapsed=118.72s tid=0x00007f8f9c0068a0 nid=51843 at breakpoint [0x00007f8fc99fb000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager.getColorProvider(ProcessConsoleManager.java:262)
        at org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager$ConsoleCreation.run(ProcessConsoleManager.java:72)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
"Worker-5: Creating console for /usr/lib/jvm/java-21-openjdk/bin/java (Apr 30, 2026, 11:28:51 AM) [pid: 53920]" #77 [51846] prio=5 os_prio=0 cpu=67.00ms elapsed=118.72s tid=0x00007f8fc00041b0 nid=51846 at breakpoint [0x00007f8fc9dfd000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager.getColorProvider(ProcessConsoleManager.java:262)
        at org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager$ConsoleCreation.run(ProcessConsoleManager.java:72)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
  1. Both are at the same object, e.g.: org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager@2b14b28c

See also screen recording from the reproduction:

vokoscreenNG-2026-04-30_11-32-29.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions