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

Travis build fails due to Kryo serialisation issue #39

Closed
soxofaan opened this issue Apr 15, 2020 · 5 comments
Closed

Travis build fails due to Kryo serialisation issue #39

soxofaan opened this issue Apr 15, 2020 · 5 comments

Comments

@soxofaan
Copy link
Member

Latest travis-ci builds are failing with (from https://travis-ci.org/github/Open-EO/openeo-geopyspark-driver/builds/675374224):

INTERNALERROR>   File "/home/travis/build/Open-EO/openeo-geopyspark-driver/tests/conftest.py", line 14, in pytest_configure
INTERNALERROR>     _setup_local_spark(terminal_reporter, verbosity=config.getoption("verbose"))
INTERNALERROR>   File "/home/travis/build/Open-EO/openeo-geopyspark-driver/tests/conftest.py", line 58, in _setup_local_spark
INTERNALERROR>     answer = context.parallelize([9, 10, 11, 12]).sum()
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/pyspark/rdd.py", line 1044, in sum
INTERNALERROR>     return self.mapPartitions(lambda x: [sum(x)]).fold(0, operator.add)
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/pyspark/rdd.py", line 915, in fold
INTERNALERROR>     vals = self.mapPartitions(func).collect()
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/pyspark/rdd.py", line 814, in collect
INTERNALERROR>     sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/py4j/java_gateway.py", line 1305, in __call__
INTERNALERROR>     answer, self.gateway_client, self.target_id, self.name)
INTERNALERROR>   File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/py4j/protocol.py", line 328, in get_return_value
INTERNALERROR>     format(target_id, ".", name), value)
INTERNALERROR> py4j.protocol.Py4JJavaError: An error occurred while calling z:org.apache.spark.api.python.PythonRDD.collectAndServe.
INTERNALERROR> : org.apache.spark.SparkException: Job aborted due to stage failure: Task serialization failed: org.apache.spark.SparkException: Failed to register classes with Kryo
INTERNALERROR> org.apache.spark.SparkException: Failed to register classes with Kryo
INTERNALERROR> 	at org.apache.spark.serializer.KryoSerializer.newKryo(KryoSerializer.scala:140)
INTERNALERROR> 	at org.apache.spark.serializer.KryoSerializerInstance.borrowKryo(KryoSerializer.scala:324)
INTERNALERROR> 	at org.apache.spark.serializer.KryoSerializerInstance.<init>(KryoSerializer.scala:309)
INTERNALERROR> 	at org.apache.spark.serializer.KryoSerializer.newInstance(KryoSerializer.scala:218)
INTERNALERROR> 	at org.apache.spark.broadcast.TorrentBroadcast$.blockifyObject(TorrentBroadcast.scala:288)
INTERNALERROR> 	at org.apache.spark.broadcast.TorrentBroadcast.writeBlocks(TorrentBroadcast.scala:127)
INTERNALERROR> 	at org.apache.spark.broadcast.TorrentBroadcast.<init>(TorrentBroadcast.scala:88)
INTERNALERROR> 	at org.apache.spark.broadcast.TorrentBroadcastFactory.newBroadcast(TorrentBroadcastFactory.scala:34)
INTERNALERROR> 	at org.apache.spark.broadcast.BroadcastManager.newBroadcast(BroadcastManager.scala:62)
INTERNALERROR> 	at org.apache.spark.SparkContext.broadcast(SparkContext.scala:1482)
INTERNALERROR> 	at org.apache.spark.scheduler.DAGScheduler.submitMissingTasks(DAGScheduler.scala:1039)
@soxofaan
Copy link
Member Author

soxofaan commented Apr 15, 2020

@soxofaan
Copy link
Member Author

that commit is yours @bossie , any quick ideas?

@bossie
Copy link
Collaborator

bossie commented Apr 16, 2020

The stack trace also contains this: java.lang.ClassNotFoundException: geopyspark.geotools.kryo.ExpandedKryoRegistrator, which sounds vaguely familiar.

This will download the "official" GeoPySpark back end assembly:

- SPARK_HOME=$(find_spark_home.py) geopyspark install-jar

We want our Geotrellis 3.1 back end assembly at https://artifactory.vgt.vito.be/auxdata-public/openeo/geotrellis-backend-assembly-0.4.5-openeo.jar instead.

@soxofaan
Copy link
Member Author

aha, and that install-jar will fail because it tries to download version 0.4.5-openeo from https://github.com/locationtech-labs/....

this also sound familiar to me: locationtech-labs/geopyspark#710 :)

@soxofaan
Copy link
Member Author

travis build works again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants