Skip to content

DataBufferUtils#join may release a DataBuffer more than necessary #26060

Closed
@rstoyanchev

Description

@rstoyanchev

This is based on investigation under reactor/reactor-netty#1374.

In DataBufferUtils#join we use a custom List to collect buffers and check the total buffered size. When a buffer is added that hits the limit, an error is raised but this causes a double release of the current buffer because Reactor's MonoCollect discards both the item that was passed to the add method and all items in the list. That leads to a double decrease of the refCount when it should be decremented only once.

Activity

added
in: webIssues in web modules (web, webmvc, webflux, websocket)
on Nov 10, 2020
added this to the 5.3.2 milestone on Nov 10, 2020
self-assigned this
on Nov 10, 2020
added a commit that references this issue on Nov 10, 2020
d3d8f1a
zhou-hao

zhou-hao commented on Jan 19, 2021

@zhou-hao

Will 5.2.13 fix this problem?

bclozel

bclozel commented on Jan 19, 2021

@bclozel
Member

@zhou-hao it was fixed in 5.2.12, see the linked issue #26061

6 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @bclozel@rstoyanchev@zhou-hao@spring-projects-issues

      Issue actions

        DataBufferUtils#join may release a DataBuffer more than necessary · Issue #26060 · spring-projects/spring-framework