You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by caneGuy <gi...@git.apache.org> on 2018/06/29 02:35:41 UTC

[GitHub] spark pull request #21664: [SPARK-24678][CORE] NoClassDefFoundError will not...

GitHub user caneGuy opened a pull request:

    https://github.com/apache/spark/pull/21664

    [SPARK-24678][CORE] NoClassDefFoundError will not be catch up which will ca…

    …use job hang
    
    ## What changes were proposed in this pull request?
    When NoClassDefFoundError thrown,it will cause job hang.
    `Exception in thread "dag-scheduler-event-loop" java.lang.NoClassDefFoundError: Lcom/xxx/data/recommend/aggregator/queue/QueueName;
    	at java.lang.Class.getDeclaredFields0(Native Method)
    	at java.lang.Class.privateGetDeclaredFields(Class.java:2436)
    	at java.lang.Class.getDeclaredField(Class.java:1946)
    	at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1659)
    	at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:72)
    	at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:480)
    	at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:468)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:468)
    	at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:365)
    	at java.io.ObjectOutputStream.writeClass(ObjectOutputStream.java:1212)
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1119)
    	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
    	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
    	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
    	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
    	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
    	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
    	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
    	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
    	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
    	at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1377)
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1173)
    	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
    	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
    	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
    	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
    	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
    	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
    	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
    	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
    	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
    	at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1377)`
    
    It is caused by NoClassDefFoundError will not catch up during task seriazation.
    `var taskBinary: Broadcast[Array[Byte]] = null
        try {
          // For ShuffleMapTask, serialize and broadcast (rdd, shuffleDep).
          // For ResultTask, serialize and broadcast (rdd, func).
          val taskBinaryBytes: Array[Byte] = stage match {
            case stage: ShuffleMapStage =>
              JavaUtils.bufferToArray(
                closureSerializer.serialize((stage.rdd, stage.shuffleDep): AnyRef))
            case stage: ResultStage =>
              JavaUtils.bufferToArray(closureSerializer.serialize((stage.rdd, stage.func): AnyRef))
          }
    
          taskBinary = sc.broadcast(taskBinaryBytes)
        } catch {
          // In the case of a failure during serialization, abort the stage.
          case e: NotSerializableException =>
            abortStage(stage, "Task not serializable: " + e.toString, Some(e))
            runningStages -= stage
    
            // Abort execution
            return
          case NonFatal(e) =>
            abortStage(stage, s"Task serialization failed: $e\n${Utils.exceptionString(e)}", Some(e))
            runningStages -= stage
            return
        }`
    
    ## How was this patch tested?
    UT


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/caneGuy/spark zhoukang/fix-noclassdeferror

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/21664.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #21664
    
----
commit 340e07cbc96a31b28eca52d31baf5a337566b15b
Author: zhoukang <zh...@...>
Date:   2018-06-29T01:45:16Z

    [SPARK][CORE] NoClassDefFoundError will not be catch up which will cause job hung

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24687][CORE] NoClassDefFoundError will not be cat...

Posted by jiangxb1987 <gi...@git.apache.org>.
Github user jiangxb1987 commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    Unfortunately, I can't even track which line in Spark have hit the exception from the image you posted.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24678][CORE] NoClassDefFoundError will not be cat...

Posted by jiangxb1987 <gi...@git.apache.org>.
Github user jiangxb1987 commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    Can you post a useful stack trace of the job hang issue you hit?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24678][CORE] NoClassDefFoundError will not be cat...

Posted by jerryshao <gi...@git.apache.org>.
Github user jerryshao commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    Would you please explain how to reproduce this issue?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24687][CORE] NoClassDefFoundError will not be cat...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    @jiangxb1987  Thanks, i update the description of this pr.Stage 33 never be scheduled.and job not abort


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24678][CORE] NoClassDefFoundError will not be cat...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    cc @jiangxb1987  @jerryshao Could you help review this?Thanks


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24687][CORE] NoClassDefFoundError will not be cat...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    I think this patch will fix 'job hanging' problem @jerryshao @jiangxb1987 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24687][CORE] NoClassDefFoundError will not be cat...

Posted by jerryshao <gi...@git.apache.org>.
Github user jerryshao commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    You already got an uncaught exception, there's no need to add warning log. Besides, this is a fatal error, how will let the job continue with such error?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24678][CORE] NoClassDefFoundError will not be cat...

Posted by jerryshao <gi...@git.apache.org>.
Github user jerryshao commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    Please fix the JIRA number, you linked to wrong JIRA number in your PR title.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24687][CORE] NoClassDefFoundError will not be cat...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    I have post an image on the jira @jiangxb1987 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #21664: [SPARK-24678][CORE] NoClassDefFoundError will not...

Posted by jerryshao <gi...@git.apache.org>.
Github user jerryshao commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21664#discussion_r200220083
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala ---
    @@ -1049,6 +1049,13 @@ class DAGScheduler(
             abortStage(stage, s"Task serialization failed: $e\n${Utils.exceptionString(e)}", Some(e))
             runningStages -= stage
             return
    +
    +      case e: NoClassDefFoundError =>
    --- End diff --
    
    This exception is actually a fatal error. I'm not sure if need to fix it or just let it fail.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24687][CORE] NoClassDefFoundError will not be cat...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    @caneGuy can you help me see why returning from this method aborts the job but throwing an error doesn't? If so, yeah that's not good. Why not just catch all exceptions instead of NonFatal only? that would cover all problems of this type.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24678][CORE] NoClassDefFoundError will not be cat...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    Can one of the admins verify this patch?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24678][CORE] NoClassDefFoundError will not be cat...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    It was caused by shading and jar missing.I will post an example later.
    Thanks @jerryshao 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24678][CORE] NoClassDefFoundError will not be cat...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    **[Test build #92446 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92446/testReport)** for PR 21664 at commit [`340e07c`](https://github.com/apache/spark/commit/340e07cbc96a31b28eca52d31baf5a337566b15b).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24687][CORE] NoClassDefFoundError will not be cat...

Posted by jerryshao <gi...@git.apache.org>.
Github user jerryshao commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    The issue is not introduced by Spark itself, it is introduced by user code, is it better to fix in the user side rather than in Spark? Besides, I'm not so sure that Spark should take responsibility for user issue.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24678][CORE] NoClassDefFoundError will not be cat...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92446/
    Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24678][CORE] NoClassDefFoundError will not be cat...

Posted by jiangxb1987 <gi...@git.apache.org>.
Github user jiangxb1987 commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    Seems the PR included wrong JIRA number


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24678][CORE] NoClassDefFoundError will not be cat...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    Can one of the admins verify this patch?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24678][CORE] NoClassDefFoundError will not be cat...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    Merged build finished. Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24687][CORE] NoClassDefFoundError will not be cat...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    @jerryshao I think at least we should print a warning,not let job hanging?Thanks


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #21664: [SPARK-24678][CORE] NoClassDefFoundError will not...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21664#discussion_r200828384
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala ---
    @@ -1049,6 +1049,13 @@ class DAGScheduler(
             abortStage(stage, s"Task serialization failed: $e\n${Utils.exceptionString(e)}", Some(e))
             runningStages -= stage
             return
    +
    +      case e: NoClassDefFoundError =>
    --- End diff --
    
    Actually,i will cause job hung since the state never update.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24687][CORE] NoClassDefFoundError will not be cat...

Posted by jiangxb1987 <gi...@git.apache.org>.
Github user jiangxb1987 commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    I agree we shall fall the job instead of let the job stay hanging.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24687][CORE] NoClassDefFoundError will not be cat...

Posted by caneGuy <gi...@git.apache.org>.
Github user caneGuy commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    The problem is that the job hanging,and user will be misleading since no more information print.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21664: [SPARK-24678][CORE] NoClassDefFoundError will not be cat...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21664
  
    **[Test build #92446 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92446/testReport)** for PR 21664 at commit [`340e07c`](https://github.com/apache/spark/commit/340e07cbc96a31b28eca52d31baf5a337566b15b).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org