Skip to content

Leak due to ByteBuffer not being released before garbage collection #36475

Closed as not planned
@tkaesler

Description

@tkaesler

Repository with application that reproduces the issue: https://github.com/tkaesler/spring-leak-reproducer

Spring Boot Starter Parent Version: 3.1.1

When continuously calling a function that reduces a Flux, after a certain time (3 minutes in case of the reproducer) a leak is detected:

2023-07-20T13:02:13.629+02:00 ERROR 51552 --- [tor-tcp-epoll-1] io.netty.util.ResourceLeakDetector       : LEAK: ByteBuf.release() was not called before it's garbage-collected. See https://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records: 
#1:
	io.netty.buffer.AbstractPooledDerivedByteBuf.deallocate(AbstractPooledDerivedByteBuf.java:87)
	io.netty.buffer.AbstractReferenceCountedByteBuf.handleRelease(AbstractReferenceCountedByteBuf.java:111)
	io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:101)
	io.netty.buffer.WrappedByteBuf.release(WrappedByteBuf.java:1037)
	io.netty.buffer.SimpleLeakAwareByteBuf.release(SimpleLeakAwareByteBuf.java:102)
	io.netty.buffer.AdvancedLeakAwareByteBuf.release(AdvancedLeakAwareByteBuf.java:942)
	io.netty.util.ReferenceCountUtil.release(ReferenceCountUtil.java:90)
        ...

What I haven't tested properly:

  • Whether the entity has to come from a database, I couldn't reproduce it without thus far
  • Whether never versions of reactor fix this issue
  • Whether it's a problem with reactor itself (seems like it, but my knowledge there is still somewhat limited)

Metadata

Metadata

Assignees

Labels

for: external-projectFor an external project and not something we can fixstatus: invalidAn issue that we don't feel is valid

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions