SimpMessagingTemplate::convertAndSend
leaks AtomicReference
s
#29858
Labels
for: external-project
Needs a fix in external project
status: invalid
An issue that we don't feel is valid
Affects: spring-messaging:5.3.18, spring-boot-starter-websocket:2.6.6
using a
SimpMessagingTemplate
and callingleaks
AtomicReference
's viathis implementation, on successful call to the
ObjectMapper
's methodcanSerialize
can/has shown leak of the AtomicReference (pointing to null).In our use case we had a stomp endpoint be updated every second (using
@Scheduled
), the highest count of AtomicReferences has been seen in our production-environment with 57 million instances (1GB memory) leaked after 16 hours in use.We are running Java17.0.4 Eclipse Adoptium on a RedHat docker container on Linux infrastructure. I cannot provide much more info, as I do not know anything more. Reproduced with same project locally on windows, on java 17.0.3 Adoptium.
This issue is/may be with jackson as well, we are slightly behind running 2.13.2.
I have looked in the source for yours and jackson, and cannot immediately see why this would happen (I see no reason why the
AtomicReference
would not be collected for garbage).The text was updated successfully, but these errors were encountered: