You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@auron.apache.org by "ShreyeshArangath (via GitHub)" <gi...@apache.org> on 2025/11/03 23:36:20 UTC
[PR] [AURON #1597] Fix java.lang.NoClassDefFoundError: io/netty/buffer/Unpooled when running with shaded-spark [auron]
ShreyeshArangath opened a new pull request, #1598:
URL: https://github.com/apache/auron/pull/1598
<!--
Thanks for sending a pull request! Please keep the following tips in mind:
- Start the PR title with the related issue ID, e.g. '[AURON #XXXX] Short summary...'.
- Make your PR title clear and descriptive, summarizing what this PR changes.
- Provide a concise example to reproduce the issue, if possible.
- Keep the PR description up to date with all changes.
-->
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #1597
# Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
In production, we use a shaded version of Spark which shades all of Spark's dependencies. When running one of our production jobs with Auron, we noticed the following error. This was because Auron is using netty that is provided by Spark and not shading it within its own namespace.
```
java.lang.RuntimeException: poll record batch error: Execution error: native execution panics: Execution error: Execution error: output_with_sender[Shuffle] error: Execution error: output_with_sender[Shuffle]: output() returns error: shuffle: executing insert_batch() error
caused by
IO error: External error: Java exception thrown at native-engine/datafusion-ext-plans/src/memmgr/spill.rs:235: java.lang.NoClassDefFoundError: io/netty/buffer/Unpooled
at org.apache.spark.sql.auron.JniBridge.nextBatch(Native Method)
at org.apache.spark.sql.auron.AuronCallNativeWrapper$$anon$1.hasNext(AuronCallNativeWrapper.scala:86)
at org.apache.spark.util.CompletionIterator.hasNext(CompletionIterator.scala:31)
at scala.collection.Iterator.foreach(Iterator.scala:943)
at scala.collection.Iterator.foreach$(Iterator.scala:943)
at org.apache.spark.util.CompletionIterator.foreach(CompletionIterator.scala:25)
at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:62)
at scala.collection.generic.Growable.$plus$plus$eq$(Growable.scala:53)
at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:105)
at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:49)
at scala.collection.TraversableOnce.to(TraversableOnce.scala:348)
at scala.collection.TraversableOnce.to$(TraversableOnce.scala:346)
at org.apache.spark.util.CompletionIterator.to(CompletionIterator.scala:25)
at scala.collection.TraversableOnce.toBuffer(TraversableOnce.scala:340)
at scala.collection.TraversableOnce.toBuffer$(TraversableOnce.scala:340)
at org.apache.spark.util.CompletionIterator.toBuffer(CompletionIterator.scala:25)
at scala.collection.TraversableOnce.toArray(TraversableOnce.scala:327)
at scala.collection.TraversableOnce.toArray$(TraversableOnce.scala:321)
at org.apache.spark.util.CompletionIterator.toArray(CompletionIterator.scala:25)
at org.apache.spark.sql.execution.auron.shuffle.AuronShuffleWriterBase.nativeShuffleWrite(AuronShuffleWriterBase.scala:68)
at org.apache.spark.sql.execution.auron.plan.NativeShuffleExchangeExec$$anon$1.write(NativeShuffleExchangeExec.scala:157)
at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:99)
at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:52)
at org.apache.spark.scheduler.Task.run(Task.scala:131)
at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:531)
at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1575)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:534)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
```
# What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
- Bring in a netty as a explicit dependency to Auron
- Shade netty under to avoid conflicts
# Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
N/A
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
# How was this patch tested?
Tested in production with a test job
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@auron.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AURON #1597] Fix java.lang.NoClassDefFoundError: io/netty/buffer/Unpooled when running with shaded-spark [auron]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #1598:
URL: https://github.com/apache/auron/pull/1598#discussion_r2489029006
##########
pom.xml:
##########
@@ -52,7 +52,7 @@
<bytebuddyVersion>1.14.11</bytebuddyVersion>
<hadoopVersion>3.4.2</hadoopVersion>
<protobufVersion>3.25.5</protobufVersion>
-
+ <nettyVersion>4.1.118.Final</nettyVersion>
Review Comment:
Could we use the latest version `4.2.7.Final`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@auron.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AURON #1597] Fix java.lang.NoClassDefFoundError: io/netty/buffer/Unpooled when running with shaded-spark [auron]
Posted by "richox (via GitHub)" <gi...@apache.org>.
richox merged PR #1598:
URL: https://github.com/apache/auron/pull/1598
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@auron.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AURON #1597] Fix java.lang.NoClassDefFoundError: io/netty/buffer/Unpooled when running with shaded-spark [auron]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #1598:
URL: https://github.com/apache/auron/pull/1598#discussion_r2489311545
##########
pom.xml:
##########
@@ -52,7 +52,7 @@
<bytebuddyVersion>1.14.11</bytebuddyVersion>
<hadoopVersion>3.4.2</hadoopVersion>
<protobufVersion>3.25.5</protobufVersion>
-
+ <nettyVersion>4.1.118.Final</nettyVersion>
Review Comment:
IMO, we could use different netty version for different spark version via profile. WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@auron.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AURON #1597] Fix java.lang.NoClassDefFoundError: io/netty/buffer/Unpooled when running with shaded-spark [auron]
Posted by "ShreyeshArangath (via GitHub)" <gi...@apache.org>.
ShreyeshArangath commented on code in PR #1598:
URL: https://github.com/apache/auron/pull/1598#discussion_r2491101678
##########
pom.xml:
##########
@@ -52,7 +52,7 @@
<bytebuddyVersion>1.14.11</bytebuddyVersion>
<hadoopVersion>3.4.2</hadoopVersion>
<protobufVersion>3.25.5</protobufVersion>
-
+ <nettyVersion>4.1.118.Final</nettyVersion>
Review Comment:
Updated!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@auron.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AURON #1597] Fix java.lang.NoClassDefFoundError: io/netty/buffer/Unpooled when running with shaded-spark [auron]
Posted by "ShreyeshArangath (via GitHub)" <gi...@apache.org>.
ShreyeshArangath commented on code in PR #1598:
URL: https://github.com/apache/auron/pull/1598#discussion_r2489050543
##########
pom.xml:
##########
@@ -52,7 +52,7 @@
<bytebuddyVersion>1.14.11</bytebuddyVersion>
<hadoopVersion>3.4.2</hadoopVersion>
<protobufVersion>3.25.5</protobufVersion>
-
+ <nettyVersion>4.1.118.Final</nettyVersion>
Review Comment:
Decided to use netty 4.1.* for now because spark-4.0 uses that [minor version](https://github.com/apache/spark/blob/branch-4.0/pom.xml#L218). Netty 4.2.* was only introduced in [spark-4.1+](https://github.com/apache/spark/blob/branch-4.1/pom.xml#L219) so I was hesitant on adding it here as we dont support it yet. Thoughts?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@auron.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org