You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I tested out spark runtime using TreeLiteMode in yarn cluster, and observed JNI call segfaulting.
Let me get straight to the point, for JavaSerializer which is a slow one not commonly used in spark, Serializable implementation in Preditor.java is sufficient but is not for KryoSerializer. It should implement KryoSerializable as well:
Im' not sure. In my case, Predictor object containing a handle to a native runtime was not reconstructed in spark runtime as expected, then segfaulted. The scenario was:
spark driver node initializes the native binary and runtime
the driver serializes and distributes the binary to worker nodes
worker nodes try to deserialize the Predictor instance using KryoSerializer
Kryo doesn't call readObject and uses the default constructor instead to reconstruct it, then this.handle remains 0
any call using TreeliteJNI with handle=0 results in SEGV. (handle=0 is treated as null pointer in C++)
@hcho3 (cc: @sperlingxx)
Hi, I tested out spark runtime using
TreeLiteMode
in yarn cluster, and observed JNI call segfaulting.Let me get straight to the point, for
JavaSerializer
which is a slow one not commonly used in spark,Serializable
implementation inPreditor.java is sufficient but is not for
KryoSerializer
. It should implementKryoSerializable
as well:I'll submit a patch fixing this later if there is not problem.
The text was updated successfully, but these errors were encountered: