-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Go] arrow.ipc.writer.compressBodyBuffers leaks memory during compression phase #14883
Comments
looking into this now |
@lquerel Please try the branch on the referenced PR and confirm that it fixes your usage. I added a unit test in the PR to test for the memory leak and was able to replicate the |
@zeroshade yes I will check that but the fact that the version number is in the import path doesn't simplify this kind of test. I'm back to the version 10.0.1 and your branch is v11 so a single replace statement in go.mod will not be enough. I need to replace all the import statement in the code. If you have a better option, please let me know. |
If entirely necessary, we could request on the mailing list to backport this to a 10.0.2 patch release. Or, depending on your timeframe, v11 would be being released around mid-january and you could upgrade to that then. Either of those could work |
The sooner the better, so I will vote for a v10.0.2. |
@zeroshade I tested your commit with my current code which doesn't contain the zstd compression configuration. This code works perfectly with v10.0.1 but doesn't work with your commit or even with v11 head. So, I don't think it's related to your fix. I got the following error: arrow/ipc: unknown error while writing: runtime error: index out of range [1] with length 1 The error is issued from array.list line 157, higher is the stack the program was in ipc.writer line 674, i.e. in the logic to serialize an arrow map. This is probably related to this recent modification in #14780
When the code panic:
==> a.offsets[i+a.data.offset+1] is out of bounds. I need your help to debug this one :) |
Could you share the code you're using to hit that panic? Or potentially boil it down to a small test case I could debug? EDIT: Looking at what you've provided, I have another question: was the length of the actual Map 0? Because |
@zeroshade You can reproduce this bug with this commit f5/otel-arrow-adapter@cdcd886 The test is located in EDIT: I will check the map size in parallel. |
@lquerel I believe I figured out the cause of the issue. Gonna see if I can try to run your test with my fix to confirm. |
@zeroshade you can uncomment the |
@zeroshade to answer your question:
|
@lquerel Okay, two things:
|
@zeroshade Great Regarding the extra release, I will fix that. Thanks. Will it be possible to have this 2 PRs in a v10.0.2? |
I'll merge the two PRs and can you please send an email to the arrow dev mailing list requesting a v10.0.2 release incorporating these two PRs? Discussion about doing so will have to occur on the mailing list. EDIT: I also can confirm that when I combine these two PRs in a local branch and then run that |
@zeroshade Sure I will send an email to request a v10.0.2. |
@zeroshade email sent. |
* Closes: apache#14883 Authored-by: Matt Topol <zotthewizard@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com> (cherry picked from commit cd238d7)
…pache#14892) * Closes: apache#14883 Authored-by: Matt Topol <zotthewizard@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com> (cherry picked from commit 3d9f60b)
Describe the bug, including details regarding any error messages, version, and platform.
All my unit tests work with the CheckedAllocator (the one used in the Arrow Go library) but when I added the zstd compression option to the IPC writer my tests turned red.
The issue is located in the file arrow.ipc.writer line 345 (v10.0.1).
The previous buffer is replaced by a new one but without:
Component(s)
Go
The text was updated successfully, but these errors were encountered: