Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleAsyncTaskScheduler: consistently apply default error handling #32298

Closed
zyro23 opened this issue Feb 20, 2024 · 0 comments
Closed

SimpleAsyncTaskScheduler: consistently apply default error handling #32298

zyro23 opened this issue Feb 20, 2024 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@zyro23
Copy link

zyro23 commented Feb 20, 2024

Affects: 6.1.4 (virtual threads enabled)


SimpleAsyncTaskScheduler does apply default error handling (and logging) for:

but does not apply it for:

i think default error handling (especially logging) should be applied in all cases.

ill reference a repro sample app that uses schedule(Runnable task, Instant startTime).
running the app, you can see corresponding stderr output but no other handling/logging taking place:

2024-02-20T12:46:53.948+01:00  INFO 2924 --- [           main] com.example.demo.DemoApplication         : Started DemoApplication in 0.605 seconds (process running for 0.99)
Exception in thread "scheduling-2" java.lang.IllegalStateException: o.O
	at com.example.demo.Sample.lambda$init$0(Sample.java:21)
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:309)

thanks & regards.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Feb 20, 2024
zyro23 added a commit to zyro23/spring-framework-issue-32298 that referenced this issue Feb 20, 2024
@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Feb 20, 2024
@jhoeller jhoeller self-assigned this Feb 20, 2024
@jhoeller jhoeller added this to the 6.1.5 milestone Feb 20, 2024
jhoeller added a commit that referenced this issue Mar 6, 2024
Includes suppression after logging, not propagating exceptions to the thread itself.

Closes gh-32381
See gh-32298
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants