Skip to content
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

[CI][Java] Integration jobs with Spark fail with NoSuchMethodError:io.netty.buffer.PooledByteBufAllocator #36332

Closed
raulcd opened this issue Jun 27, 2023 · 17 comments

Comments

@raulcd
Copy link
Member

raulcd commented Jun 27, 2023

Describe the bug, including details regarding any error messages, version, and platform.

It does seem that:
#36211
Updated from PoolThreadCache to PoolArenasCache this has made our nightly integration tests with Spark previous and current development versions to fail.

The error:

 02:07:30.759 WARN org.apache.spark.scheduler.TaskSetManager: Lost task 0.0 in stage 24.0 (TID 30) (ab33723e6432 executor driver): java.lang.NoSuchMethodError: io.netty.buffer.PooledByteBufAllocatorL$InnerAllocator.threadCache()Lio/netty/buffer/PoolArenasCache;

Spark hasn't yet updated to 4.1.94.Final.
I am unsure on how do we fix this but does this mean we break backwards compatibility with previous Spark versions?

Component(s)

Continuous Integration, Java

@raulcd
Copy link
Member Author

raulcd commented Jun 27, 2023

@BryanCutler @lidavidm @kiszk FYI
I've also opened a ticket on the JIRA for spark to let them know about the CVE.

@lidavidm
Copy link
Member

Possibly we can do something via runtime reflection (though that would have to be carefully benchmarked)

@kiszk
Copy link
Member

kiszk commented Jun 27, 2023

Thank you for sharing this. Here is a discussion at Spark side.

@BryanCutler
Copy link
Member

Could we have our Spark tests use Arrow with shaded dependencies?

@lidavidm
Copy link
Member

I think shaded Netty would be the best solution (it would also hopefully unblock downstream Spark). But we don't build such an artifact currently.

Could we force the test to use Arrow with arrow-memory-unsafe added and arrow-memory-netty excluded?

@raulcd raulcd added the Priority: Blocker Marks a blocker for the release label Jun 29, 2023
@raulcd
Copy link
Member Author

raulcd commented Jul 4, 2023

@lidavidm @BryanCutler is this or should this be a blocker for 13.0.0?

@lidavidm
Copy link
Member

lidavidm commented Jul 4, 2023

I think we should evaluate if shading Netty or using arrow-memory-unsafe in place of arrow-memory-netty works, or else evaluate if something reflection-based might work.

@lidavidm
Copy link
Member

lidavidm commented Jul 4, 2023

Er, so that is to say, yes, let's consider this a blocker.

@lidavidm
Copy link
Member

lidavidm commented Jul 5, 2023

It looks like to shade Netty or use arrow-memory-unsafe, we'd have to modify the Spark pom; I'm not sure if that quite qualifies as a solution for non-HEAD Spark.

@danepitkin
Copy link
Member

I sent a note to the Spark ML: https://lists.apache.org/thread/ndmj3ht85j2g40n8clfh92ny6qqbvd09

So far, I think we are leaning towards Spark resolving HEAD on their side and breaking backwards compatibility with older Spark versions.

@raulcd
Copy link
Member Author

raulcd commented Jul 12, 2023

Thanks @danepitkin !
If this is the solution we decide to go with I suppose we can try to patch the POM to use the new Netty version (I am testing that on the related PR).
On that case this should not a blocker for the release as we will just "patch" older Spark versions (updating version on POM) to use the newer Netty version? @lidavidm

@lidavidm
Copy link
Member

I think Spark will just have to be ignored.

@raulcd
Copy link
Member Author

raulcd commented Jul 14, 2023

I never posted the JIRA ticket that was opened on SPARK. Adding it for reference: https://issues.apache.org/jira/projects/SPARK/issues/SPARK-44212

@raulcd raulcd modified the milestones: 13.0.0, 14.0.0 Jul 17, 2023
@raulcd raulcd removed the Priority: Blocker Marks a blocker for the release label Jul 17, 2023
@raulcd
Copy link
Member Author

raulcd commented Jul 28, 2023

@lidavidm this can be closed after this one #36928 has been merged, right?

@lidavidm
Copy link
Member

I merged that PR - so hopefully this is fixed

@lidavidm
Copy link
Member

I ran crossbow on that PR - looks like it does pass now

@raulcd
Copy link
Member Author

raulcd commented Jul 28, 2023

Thanks @lidavidm , I am closing it then!

@raulcd raulcd closed this as completed Jul 28, 2023
dongjoon-hyun pushed a commit to apache/spark that referenced this issue Nov 4, 2023
### What changes were proposed in this pull request?
This pr upgrade Apache Arrow from 13.0.0 to 14.0.0.

### Why are the changes needed?
The Apache Arrow 14.0.0 release brings a number of enhancements and bug fixes.
‎
In terms of bug fixes, the release addresses several critical issues that were causing failures in integration jobs with Spark([GH-36332](apache/arrow#36332)) and problems with importing empty data arrays([GH-37056](apache/arrow#37056)). It also optimizes the process of appending variable length vectors([GH-37829](apache/arrow#37829)) and includes C++ libraries for MacOS AARCH 64 in Java-Jars([GH-38076](apache/arrow#38076)).
‎
The new features and improvements focus on enhancing the handling and manipulation of data. This includes the introduction of DefaultVectorComparators for large types([GH-25659](apache/arrow#25659)), support for extended expressions in ScannerBuilder([GH-34252](apache/arrow#34252)), and the exposure of the VectorAppender class([GH-37246](apache/arrow#37246)).
‎
The release also brings enhancements to the development and testing process, with the CI environment now using JDK 21([GH-36994](apache/arrow#36994)). In addition, the release introduces vector validation consistent with C++, ensuring consistency across different languages([GH-37702](apache/arrow#37702)).
‎
Furthermore, the usability of VarChar writers and binary writers has been improved with the addition of extra input methods([GH-37705](apache/arrow#37705)), and VarCharWriter now supports writing from `Text` and `String`([GH-37706](apache/arrow#37706)). The release also adds typed getters for StructVector, improving the ease of accessing data([GH-37863](apache/arrow#37863)).

The full release notes as follows:
- https://arrow.apache.org/release/14.0.0.html

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GitHub Actions

### Was this patch authored or co-authored using generative AI tooling?
No

Closes #43650 from LuciferYang/arrow-14.

Lead-authored-by: yangjie01 <[email protected]>
Co-authored-by: YangJie <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment