Uh oh!
There was an error while loading. Please reload this page.
[SPARK-3193]output errer info when Process exit code is not zero in test suite - #2108
[SPARK-3193]output errer info when Process exit code is not zero in test suite#2108scwf wants to merge 2 commits into
Conversation
AmplabJenkins
commented
Aug 24, 2014
Can one of the admins verify this patch? |
ScrapCodes
commented
Aug 25, 2014
Hey !, Thanks for raising this concern. The convention in spark is that we look in the I hope this helps. You can close this PR if you are convinced. P.S: May be we can expand our wiki page with this information. |
scwf
commented
Aug 25, 2014
Hi, @ScrapCodes, i think unit-tests.log is very big and it's hard to search the matched log of a test suite. And the key point is that the jenkins failed accidentally due to "Process exitcode != 0", reruning may can not replay the error. This PR output the error only when failed. refer to our discuss on dev list |
ScrapCodes
commented
Aug 25, 2014
Ahh, I am still not sure of the changes. May be the PR has more changes than just fix what you said ? |
scwf
commented
Aug 25, 2014
@ScrapCodes, yeah, here i fixed the log4j config of the forked process, this is because the old version is not valid. By the old version the forked process's InputStream output nothing |
andrewor14
commented
Aug 27, 2014
test this please |
SparkQA
commented
Aug 27, 2014
QA tests have started for PR 2108 at commit
|
SparkQA
commented
Aug 27, 2014
Tests timed out after a configured wait of |
andrewor14
commented
Aug 28, 2014
retest this please |
SparkQA
commented
Aug 28, 2014
QA tests have started for PR 2108 at commit
|
SparkQA
commented
Aug 28, 2014
QA tests have finished for PR 2108 at commit
|
scwf
commented
Aug 29, 2014
@andrewor14, tests passed~ |
andrewor14
commented
Aug 29, 2014
@scwf Looks like the code already redirects all |
scwf
commented
Aug 30, 2014
@andrewor14, Logger.getRootLogger().setLevel(Level.WARN)in |
SparkQA
commented
Sep 5, 2014
Can one of the admins verify this patch? |
andrewor14
commented
Sep 6, 2014
I see. I would like to see the ok to test |
JoshRosen
commented
Sep 7, 2014
These tests are reliably failing in Jenkins Maven build for Spark Master with YARN. Maybe they'll fail here, too. Jenkins, retest this please. |
JoshRosen
commented
Sep 8, 2014
I SSH'ed into one of the Jenkins boxes and ran the Maven build using this, which resulted in a very interesting error message when SparkSubmitSuite failed: It looks like the SparkSubmitSuite test is failing due to running out of Spark web UI ports. This explains why I couldn't reproduce this failure when running that test in isolation. |
JoshRosen
commented
Sep 8, 2014
Oh, and the test failure message helpfully included the actual spark-submit command: - sparksubmitincludesjarspassedinthrough --jar *** FAILED ***
org.apache.spark.SparkException: ProcessList(./bin/spark-submit, --class, org.apache.spark.deploy.JarCreationTest, --name, testApp, --master, local-cluster[2,1,512], --jars, file:/tmp/1410205297744-1/testJar-1410205297797.jar,file:/tmp/1410205297797-0/testJar-1410205297849.jar, file:/tmp/1410205297744-0/testJar-1410205297744.jar) exitedwithcode1atorg.apache.spark.util.Utils$.executeAndGetOutput(Utils.scala:840)
atorg.apache.spark.deploy.SparkSubmitSuite.runSparkSubmit(SparkSubmitSuite.scala:311)
atorg.apache.spark.deploy.SparkSubmitSuite$$anonfun$15.apply$mcV$sp(SparkSubmitSuite.scala:305)
atorg.apache.spark.deploy.SparkSubmitSuite$$anonfun$15.apply(SparkSubmitSuite.scala:294)
atorg.apache.spark.deploy.SparkSubmitSuite$$anonfun$15.apply(SparkSubmitSuite.scala:294)
atorg.scalatest.Transformer$$anonfun$apply$1.apply(Transformer.scala:22)
atorg.scalatest.Transformer$$anonfun$apply$1.apply(Transformer.scala:22)
atorg.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
atorg.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
atorg.scalatest.Transformer.apply(Transformer.scala:22) |
JoshRosen
commented
Sep 8, 2014
I'm going to merge this patch, since this additional logging will be helpful in diagnosing the problem behind the failing DriverSuite and SparkSubmitSuite tests. |
JoshRosen
commented
Sep 8, 2014
Actually, let me make sure that it passes Jenkins first... Jenkins, this is ok to test. |
srowen
commented
Sep 8, 2014
I also was unable to reproduce it in Maven when only I found that setting Another interesting data point is that if I hack the code temporarily to choose a random UI port, it's all fine. Choosing ports randomly might be a good idea in the longer-term anyway to facilitate parallel tests, and I believe is mentioned in another PR. I suppose it's a potential solution here too, but would be good to understand why it doesn't happen with SBT. Neither is parallel. Maybe some difference in the test lifecycle allows the previous web servers to shut down more reliably before the next ones start? I'm only guessing at this stage. |
andrewor14
commented
Sep 8, 2014
@srowen Actually we already use random ports in SBT tests (by setting @JoshRosen Even before this patch it printed the command it ran, but it seems that with this patch we also get the actual stack trace with the |
JoshRosen
commented
Sep 8, 2014
Jenkins, retest this please. |
SparkQA
commented
Sep 9, 2014
QA tests have started for PR 2108 at commit
|
SparkQA
commented
Sep 9, 2014
QA tests have started for PR 2108 at commit
|
SparkQA
commented
Sep 9, 2014
QA tests have finished for PR 2108 at commit
|
srowen
commented
Sep 9, 2014
@andrewor14@JoshRosen Bingo! Adding |
scwf
commented
Sep 9, 2014
@srowen, it is cool but can not explain SBT test failure. we can use this pr to test a few times to diagnose SBT test problem. |
srowen
commented
Sep 9, 2014
@scwf The SBT build has already set |
scwf
commented
Sep 9, 2014
@srowen ,yeah, we should set |
srowen
commented
Sep 9, 2014
@scwf Yes there is still some underlying issue here, where tests hold open ports somehow for a long time. Randomizing the starting port usually avoids most collision, but not all the time. It's a step forward but it is not the ultimate solution. |
JoshRosen
commented
Sep 9, 2014
I wonder if this is a resource contention issue from having many parallel copies of the tests running on the same Jenkins worker. For example, we might be exhausting ephemeral ports. I think that #2259 will help with this by dramatically reducing the number of ephemeral ports used by PySpark jobs. |
scwf
commented
Sep 9, 2014
@JoshRosen, exhausting ephemeral ports has small probability, if so we should reduce ephemeral ports. Or we can just verify the port available before using it and try several times to get a free one? |
andrewor14
commented
Sep 9, 2014
@scwf Actually we already try several times before getting a free one. My interpretation of this is we simply ran out of ports, such that no matter how many times we retry we can't get a free one. Using a random port for the UI certainly reduces probability of collision, but yes it is definitely not the final solution as it simply puts maven tests on par with SBT tests, the latter of which still fail sometimes but not always. @JoshRosen#2259 may help for PySpark tests, but One solution @JoshRosen and I discussed is to simply not start the SparkUI during tests (maybe except for the |
andrewor14
commented
Sep 9, 2014
For now, I will merge this (master + 1.1) because this helps us debug these test failures. Thanks. |
…est suite https://issues.apache.org/jira/browse/SPARK-3193 I noticed that sometimes pr tests failed due to the Process exitcode != 0,refer to https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18688/consoleFullhttps://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/19118/consoleFull [info] SparkSubmitSuite: [info] - prints usage on empty input [info] - prints usage with only --help [info] - prints error with unrecognized options [info] - handle binary specified but not class [info] - handles arguments with --key=val [info] - handles arguments to user program [info] - handles arguments to user program with name collision [info] - handles YARN cluster mode [info] - handles YARN client mode [info] - handles standalone cluster mode [info] - handles standalone client mode [info] - handles mesos client mode [info] - handles confs with flag equivalents [info] - launch simple application with spark-submit *** FAILED *** [info] org.apache.spark.SparkException: Process List(./bin/spark-submit, --class, org.apache.spark.deploy.SimpleApplicationTest, --name, testApp, --master, local, file:/tmp/1408854098404-0/testJar-1408854098404.jar) exited with code 1 [info] at org.apache.spark.util.Utils$.executeAndGetOutput(Utils.scala:872) [info] at org.apache.spark.deploy.SparkSubmitSuite.runSparkSubmit(SparkSubmitSuite.scala:311) [info] at org.apache.spark.deploy.SparkSubmitSuite$$anonfun$14.apply$mcV$sp(SparkSubmitSuite.scala:291) [info] at org.apache.spark.deploy.SparkSubmitSuite$$anonfun$14.apply(SparkSubmitSuite.scala:284) [info] at org.apacSpark assembly has been built with Hive, including Datanucleus jars on classpath this PR output the process error info when failed, it can be helpful for diagnosis. Author: scwf <wangfei1@huawei.com> Closes#2108 from scwf/output-test-error-info and squashes the following commits: 0c48082 [scwf] minor fix according to comments 563fde1 [scwf] output errer info when Process exitcode not zero (cherry picked from commit 2686233) Signed-off-by: Andrew Or <andrewor14@gmail.com>
https://issues.apache.org/jira/browse/SPARK-3193
I noticed that sometimes pr tests failed due to the Process exitcode != 0,refer to
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18688/consoleFull
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/19118/consoleFull
[info] SparkSubmitSuite:
[info] - prints usage on empty input
[info] - prints usage with only --help
[info] - prints error with unrecognized options
[info] - handle binary specified but not class
[info] - handles arguments with --key=val
[info] - handles arguments to user program
[info] - handles arguments to user program with name collision
[info] - handles YARN cluster mode
[info] - handles YARN client mode
[info] - handles standalone cluster mode
[info] - handles standalone client mode
[info] - handles mesos client mode
[info] - handles confs with flag equivalents
[info] - launch simple application with spark-submit *** FAILED ***
[info] org.apache.spark.SparkException: Process List(./bin/spark-submit, --class, org.apache.spark.deploy.SimpleApplicationTest, --name, testApp, --master, local, file:/tmp/1408854098404-0/testJar-1408854098404.jar) exited with code 1
[info] at org.apache.spark.util.Utils$.executeAndGetOutput(Utils.scala:872)
[info] at org.apache.spark.deploy.SparkSubmitSuite.runSparkSubmit(SparkSubmitSuite.scala:311)
[info] at org.apache.spark.deploy.SparkSubmitSuite$$anonfun$14.apply$mcV$sp(SparkSubmitSuite.scala:291)
[info] at org.apache.spark.deploy.SparkSubmitSuite$$anonfun$14.apply(SparkSubmitSuite.scala:284)
[info] at org.apacSpark assembly has been built with Hive, including Datanucleus jars on classpath
this PR output the process error info when failed, it can be helpful for diagnosis.