You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When terminating Spring Boot Applications that use spring-cloud-stream:4.1.0, a StackOverflowError is thrown as the framework cannot stop some beans:
2024-01-25T19:01:02.950+01:00 WARN 33005 --- [ionShutdownHook] o.s.c.support.DefaultLifecycleProcessor : Failed to stop bean 'solaceBinder_binderProducingContext'
java.lang.StackOverflowError: null
at java.base/java.lang.invoke.BoundMethodHandle$Species_LJ.<init>(java/lang/invoke/BoundMethodHandle$Species_LJ) ~[na:na]
at java.base/java.lang.invoke.BoundMethodHandle$Species_LJ.make(java/lang/invoke/BoundMethodHandle$Species_LJ) ~[na:na]
at java.base/java.lang.invoke.BoundMethodHandle$Species_L.copyWithExtendJ(BoundMethodHandle.java:254) ~[na:na]
at java.base/java.lang.invoke.LambdaFormEditor.bindArgumentJ(LambdaFormEditor.java:539) ~[na:na]
at java.base/java.lang.invoke.BoundMethodHandle.bindArgumentJ(BoundMethodHandle.java:81) ~[na:na]
at java.base/java.lang.invoke.MethodHandles.insertArgumentPrimitive(MethodHandles.java:5300) ~[na:na]
at java.base/java.lang.invoke.MethodHandles.insertArguments(MethodHandles.java:5284) ~[na:na]
at java.base/java.lang.invoke.StringConcatFactory.foldInLastMixers(StringConcatFactory.java:685) ~[na:na]
at java.base/java.lang.invoke.StringConcatFactory.filterAndFoldInMixers(StringConcatFactory.java:657) ~[na:na]
at java.base/java.lang.invoke.StringConcatFactory.generateMHInlineCopy(StringConcatFactory.java:587) ~[na:na]
at java.base/java.lang.invoke.StringConcatFactory.makeConcatWithConstants(StringConcatFactory.java:365) ~[na:na]
at java.base/java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:102) ~[na:na]
at java.base/java.lang.invoke.CallSite.makeSite(CallSite.java:316) ~[na:na]
at java.base/java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:274) ~[na:na]
at java.base/java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:264) ~[na:na]
at org.springframework.context.support.DefaultLifecycleProcessor.doStop(DefaultLifecycleProcessor.java:370) ~[spring-context-6.1.3.jar:6.1.3]
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.stop(DefaultLifecycleProcessor.java:483) ~[spring-context-6.1.3.jar:6.1.3]
at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na]
at org.springframework.context.support.DefaultLifecycleProcessor.stopBeans(DefaultLifecycleProcessor.java:313) ~[spring-context-6.1.3.jar:6.1.3]
at org.springframework.context.support.DefaultLifecycleProcessor.stop(DefaultLifecycleProcessor.java:186) ~[spring-context-6.1.3.jar:6.1.3]
at org.springframework.context.support.AbstractApplicationContext.stop(AbstractApplicationContext.java:1523) ~[spring-context-6.1.3.jar:6.1.3]
at org.springframework.context.support.DefaultLifecycleProcessor.doStop(DefaultLifecycleProcessor.java:357) ~[spring-context-6.1.3.jar:6.1.3]
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.stop(DefaultLifecycleProcessor.java:483) ~[spring-context-6.1.3.jar:6.1.3]
at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na]
at org.
The StackOverflowError is thrown in spring-cloud-stream, regardless of which binder implementation is used in the application.
We have observed the problem both when using a Solace binder(4.1.0) and a custom binder.
The bug can be reproduced in any Spring Boot application that uses spring-cloud-stream version 4.1.0.
To make it easier to reproduce, I created a small test application with an integration test that demonstrates the issue using the Solace binder: https://github.com/mentamas/reproducers/tree/main/spring-cloud-stream-stackoverflowerror
(the test requires Docker as it uses Solace testcontainers)
The StackOverflowError is not reproducible with spring-cloud-stream:4.0.4.
I tried to analyse the problem a bit, in version 4.1.0 the propagation of shared beans has changed: #2728
Could this change have led to this new problem?
The text was updated successfully, but these errors were encountered:
When terminating Spring Boot Applications that use
spring-cloud-stream:4.1.0
, aStackOverflowError
is thrown as the framework cannot stop some beans:The
StackOverflowError
is thrown inspring-cloud-stream
, regardless of which binder implementation is used in the application.We have observed the problem both when using a Solace binder(4.1.0) and a custom binder.
The bug can be reproduced in any Spring Boot application that uses spring-cloud-stream version 4.1.0.
To make it easier to reproduce, I created a small test application with an integration test that demonstrates the issue using the Solace binder: https://github.com/mentamas/reproducers/tree/main/spring-cloud-stream-stackoverflowerror
(the test requires Docker as it uses Solace testcontainers)
The
StackOverflowError
is not reproducible withspring-cloud-stream:4.0.4
.I tried to analyse the problem a bit, in version 4.1.0 the propagation of shared beans has changed: #2728
Could this change have led to this new problem?
The text was updated successfully, but these errors were encountered: