You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Iriasthor <mi...@gmail.com> on 2014/09/04 17:58:12 UTC
EC2 - JNI crashes JVM with multi core instances
Hi,
I am trying to run a custom Spark application on a Spark standalone cluster
on Amazon's EC2 infrastructure. So far I have successfully executed the
application on several m1.medium instances (each with one core). However,
when I try executing the very same application on some c1.medium instances
(each with two cores), a JVM crash occurs with no further information.
Is there any known issue with combining JNI and multiple cored instances?
Code piece:
/JavaRDD<String> result = file.mapPartitions(
new FlatMapFunction <Iterator<String> , String>()
{
@Override
public Iterable<String> call(Iterator <String> t) throws Exception {
ArrayList <String> tmp= new ArrayList <String>();
while(t.hasNext()){
tmp.add(t.next());
}
return Arrays.asList(myNativeFunc(arg1,arg2));
}
}).cache();/
--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/EC2-JNI-crashes-JVM-with-multi-core-instances-tp13463.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org
Re: EC2 - JNI crashes JVM with multi core instances
Posted by Iriasthor <mi...@gmail.com>.
Hi, thanks for the reply.
Actually, I think you are correct about the native library not being thread
safe. However, for what I understand, different cores should start different
processes, being these independent from one another. If I am not mistaken,
the thread safe issue would start being critical when using threads. What is
your opinion about this matter?
--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/EC2-JNI-crashes-JVM-with-multi-core-instances-tp13463p13527.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org
Re: EC2 - JNI crashes JVM with multi core instances
Posted by maxpar <hl...@gmail.com>.
Hi,
What is the setup of your native library? Probably it is not thread safe?
Thanks,
Max
--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/EC2-JNI-crashes-JVM-with-multi-core-instances-tp13463p13470.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org