-
Notifications
You must be signed in to change notification settings - Fork 25
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
IllegalReferenceCountException exception in TextRowDecoder #24
Comments
Since updating to Spring Boot 2.7.0, I have the same (edit: reproducible) problem when using this r2dbc migrate tool |
After some experimentation I found that the exact same software works correctly with the 1.0.3 release of the r2dbc-mariadb driver. |
This is normally corrected in 1.1.2. (snapshot are available through sonatype snapshot repository)
|
Thank you for your reply. |
Seems I found how to fix it on r2dbc-migrate side.
Try r2dbc-migrate 2.7.x |
r2dbc-migrate 2.7.x works for me, but not in combination with mariadb driver version 1.1.1-rc Have not tried mariadb driver 1.1.2-SNAPSHOT with r2dbc-migrate 2.7.x |
I got IllegalReferenceCountException exception with mariadb driver version 1.1.1-rc in tests in r2dbc-migrate. If you will get error with mariadb driver 1.1.2-SNAPSHOT and r2dbc-migrate 2.7.x please share new reproducer. |
Sorry, my bad, let me rephrase: With r2dbc-migrate 2.7.x and driver version 1.1.1-rc, migrate now runs fine for me, although I still get problems during later tests, that I do not get with driver 1.0.3. I will post a new issue for the driver when I get the repro figured out. As far as I can tell, r2dbc-migrate was not the source of the problem, just the place where it showed up. |
I got 'refCnt: 0' exception when using 'r2dbc-mariadb:1.1.2' and also same with '1.1.1-rc'.
|
This is happening for me as well. Impossible to use the latest version of the driver, only 1.0.2 works. |
I get the same issue using micronaut and r2dbc-mariadb v1.1.2 |
@rusher I'm having similar issue with version
1.1.1-rc
.I couldn't get to the bottom of this yet but I get
IllegalReferenceCountException
exception inTextRowDecoder.setPosition()
.It happens in line
because reference count of
RowDecoder.buf
. I'm assuming you're reusing instance ofByteBuf
. So far I can't find consistent pattern to reproduce it but I can say it happens when query returns a lot of rows (80K+ items).Sadly I'm seeing that it doesn't happen when I slow down the application (using profiler for example). Race condition somewhere?
UPD: I thought maybe it's related to spring-projects/spring-framework#26060 so I upgraded to Netty 4.1.70 but it didn't help. That's too bad since it's no-go for production :( Interestingly enough inside
AbstractByteBuf.ensureAccessible()
call((UnpooledSlicedByteBuf) this).buffer.refCnt()
that works viaReferenceCountUpdater
returns 0 but underlyingvolatile int refCnt
field has 1. Ah... they have wacky code in counter updater. When count is one then treat it as zero https://github.com/netty/netty/blob/ea2742b4f628dfae9523c49b22472df921d1386c/common/src/main/java/io/netty/util/internal/ReferenceCountUpdater.java#L62 but why....Originally posted by @unoexperto in #7 (comment)
The text was updated successfully, but these errors were encountered: