Job framework become unusable after stopping and restarting the "org.eclipse.core.jobs" bundle
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
复现 org.eclipse.core.jobs bundle 的停止和重启序列,然后从 org.eclipse.core.internal.jobs.InternalJob 和 JobManager 入手,尤其关注堆栈跟踪中显示的调度路径。检查调度新的 Job 时,重启后的 bundle 是如何表示的。完成标准是:bundle 重启后可以创建并调度 Job,并且针对所报告序列具有回归测试覆盖。
由索引模型根据 Issue 内容生成。
描述
Let's make sure issue is not already fixed in latest builds first.
- I verified I can reproduce this issue against latest Integration Build of Eclipse SDK
Not checked with the latest Build, but checked that the affected bundle has been unchanged compared to the version I tried with.
Steps to reproduce
- In a running application, stop the "org.eclipse.core.jobs" bundle
- restart the bundle
- create a new job
This fails with an exception
I expected: That the bundle can be stopped and restarted
But got: it becomes unusable after restarting
Looking at the failing code, it looks like the class "InternalJob" keeps a cached instance of the first ever created JobManager in a static final field and only uses that for all created instances of InternalJob instead of using the current running JobManager.
Here is some relevant log output
From <workspace>/.metadata/.log
Command-line arguments: -application eclipse-core-jobs-sample.id1 -data W:\fis\ws\fa_99.99.0/../runtime-eclipse-core-jobs-sample.id1 -dev file:///W:/fis/ws/fa_99.99.0/.metadata/.plugins/org.eclipse.pde.core/eclipse-core-jobs-sample.id1/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog
!ENTRY org.eclipse.osgi 4 0 2026-06-28 11:40:00.218
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Job manager has been shut down.
at org.eclipse.core.internal.jobs.JobManager.scheduleInternal(JobManager.java:1485)
at org.eclipse.core.internal.jobs.JobManager.lambda$5(JobManager.java:1475)
at org.eclipse.core.internal.jobs.JobManager.withWriteLock(JobManager.java:568)
at org.eclipse.core.internal.jobs.JobManager.schedule(JobManager.java:1474)
at org.eclipse.core.internal.jobs.InternalJob.schedule(InternalJob.java:402)
at org.eclipse.core.runtime.jobs.Job.schedule(Job.java:654)
at sample.Application.start(Application.java:35)
Code for reproduction
BundleContext bundleContext = FrameworkUtil.getBundle(getClass()).getBundleContext();
Bundle coreJobs = Arrays.stream( bundleContext.getBundles()).filter(x -> x.getSymbolicName().equals("org.eclipse.core.jobs")).findFirst().orElseThrow();
coreJobs.stop();
coreJobs.start();
Job job = new Job("test") {
@Override
protected IStatus run(IProgressMonitor monitor) {
return Status.OK_STATUS;
}
};
job.schedule();
Tested under this environment:
- OS & version: Windows, 11
- Eclipse IDE/Platform version (as shown in Help > About): Eclipse 25-12
Community
- I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.
- 主要语言
- Java
- 星标
- 165
- 派生
- 174
- 平均合并
- 2 天 16 小时
- 30 天内合并 PR
- 45
环境准备
从这里开始
- 先读完整个 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 于 6 天前认领。 未关闭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 天内回复
-
[Win32] Folder becomes a file in the workspace tree when a child is deleted during `refreshLocal` (regression in 2026-09)可能已有人在做 @FlorianKroiss 于 1 天前认领。 未关闭bug regression Windows
难度 4/5 3-5 天 新手友好度 15/100
eclipse-platform/eclipse.platform#3024 · 1 条评论 ·
维护者通常 1 天内回复
查看 eclipse-platform/eclipse.platform 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
NationalSecurityAgency/ghidra#9884 ·
维护者通常 2 天内回复
-
Status: Pending Review Type: Feature Request
难度 1/5 1 小时以内 新手友好度 82/100
OpenRefine/OpenRefine#8019 ·
维护者通常 1 天内回复
-
`timer` rule rejects dates the engine accepts可能已有人在做 @MFA-G 今天认领。 未关闭bug ready
难度 2/5 1-3 小时 新手友好度 72/100
camunda/bpmnlint-plugin-camunda-compat#281 · 3 条评论 ·
维护者通常 1 天内回复
-
status: waiting-for-triage
难度 2/5 1-3 小时 新手友好度 72/100
-
bug
难度 2/5 1-3 小时 新手友好度 62/100