# JVM crashes on SunOS

**URL:** <https://discuss.elastic.co/t/jvm-crashes-on-sunos/7300>\
**Category:** Elasticsearch\
**Created:** [April 11, 2012, 7:42pm UTC](https://discuss.elastic.co/t/jvm-crashes-on-sunos/7300 "2012-04-11T19:42:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danny\_Coates](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danny_coates/32/2919_2.png) [@Danny\_Coates](https://discuss.elastic.co/u/Danny_Coates)\
**Post date:** [April 11, 2012, 7:42pm UTC](https://discuss.elastic.co/t/jvm-crashes-on-sunos/7300/1 "2012-04-11T19:42:01Z")

</div>

Hi,

I'm experiencing JVM crashes while running ElasticSearch on Joyent's  
SmartOS (an OpenSolaris fork).

I was originally using mmapfs, but switched to niofs after seeing crashes  
related to MMapDirectory (and reading  
[http://stackoverflow.com/questions/8224843/jvm-crashes-on-lucene-datainput-readvint](http://stackoverflow.com/questions/8224843/jvm-crashes-on-lucene-datainput-readvint)).  
However, I'm still getting crashes that hint at MMap being a problem. I  
only have one index on this cluster, and started with a clean install and  
data directory before creating the niofs index.

Here are my index settings:

curl localhost:9200/\_settings?pretty=true  
{  
"foo" : {  
"settings" : {  
"index.store" : "niofs",  
"index.number\_of\_replicas" : "2",  
"index.number\_of\_shards" : "80",  
"index.version.created" : "190199"  
}  
}  
}

These are the problematic frames:

for f in hs\_err\_pid\*; do sed '9!d' $f; done | sort | uniq -c | sort -n  
1 # v ~StubRoutines::jint\_disjoint\_arraycopy  
2 # v ~StubRoutines::jshort\_disjoint\_arraycopy  
3 # J  
org.apache.lucene.index.TermBuffer.read(Lorg/apache/lucene/store/IndexInput;Lorg/apache/lucene/index/FieldInfos;)V  
3 # J org.apache.lucene.store.DataInput.readVLong()J  
3 # J  
org.elasticsearch.index.cache.bloom.simple.SimpleBloomCache$BloomFilterLoader.run()V  
6 # J  
org.apache.lucene.store.MMapDirectory$MMapIndexInput.readByte()B  
12 # v ~StubRoutines::jbyte\_disjoint\_arraycopy  
23 # J org.apache.lucene.index.SegmentTermEnum.next()Z

These are the JVM versions I've tried:

# JRE version: 6.0\_26-b03

# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode

solaris-amd64 )

# JRE version: 7.0\_03-b04

# Java VM: Java HotSpot(TM) 64-Bit Server VM (22.1-b02 mixed mode

solaris-amd64 )

These are the ElasticSearch versions I've tried:  
0.18.7  
0.19.0  
0.19.1

The frequency of crashes went down significantly after switching to niofs,  
but still occur regularly. Are these crashes still mmap related? Have I not  
set the index store correctly?

Thanks!

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 11, 2012, 9:58pm UTC](https://discuss.elastic.co/t/jvm-crashes-on-sunos/7300/2 "2012-04-11T21:58:43Z")

</div>

It seems like mmapfs is still being used, its because the proper setting  
for it is index.store.type. You can simply set it in the elasticsearch.yml  
and it will be applied to all indices created. Hopefully those failure will  
go away with Lucene 3.6 when its out.

On Wed, Apr 11, 2012 at 10:42 PM, Danny Coates [dannycoates@gmail.com](mailto:dannycoates@gmail.com)wrote:

> Hi,
> 
> I'm experiencing JVM crashes while running Elasticsearch on Joyent's  
> SmartOS (an OpenSolaris fork).
> 
> I was originally using mmapfs, but switched to niofs after seeing crashes  
> related to MMapDirectory (and reading  
> [java - JVM crashes on Lucene DataInput.readVInt - Stack Overflow](http://stackoverflow.com/questions/8224843/jvm-crashes-on-lucene-datainput-readvint)).  
> However, I'm still getting crashes that hint at MMap being a problem. I  
> only have one index on this cluster, and started with a clean install and  
> data directory before creating the niofs index.
> 
> Here are my index settings:
> 
> curl localhost:9200/\_\*\*settings?pretty=true  
> {  
> "foo" : {  
> "settings" : {  
> "index.store" : "niofs",  
> "index.number\_of\_replicas" : "2",  
> "index.number\_of\_shards" : "80",  
> "index.version.created" : "190199"  
> }  
> }  
> }
> 
> These are the problematic frames:
> 
> for f in hs\_err\_pid\*; do sed '9!d' $f; done | sort | uniq -c | sort -n  
> 1 # v ~StubRoutines::jint\_disjoint\_arraycopy  
> 2 # v ~StubRoutines::jshort\_disjoint\_arraycopy  
> 3 # J  
> org.apache.lucene.index.TermBuffer.read(Lorg/apache/lucene/store/IndexInput;Lorg/apache/lucene/index/FieldInfos;)V  
> 3 # J org.apache.lucene.store.DataInput.readVLong()J  
> 3 # J  
> org.elasticsearch.index.cache.bloom.simple.SimpleBloomCache$BloomFilterLoader.run()V  
> 6 # J  
> org.apache.lucene.store.MMapDirectory$MMapIndexInput.readByte()B  
> 12 # v ~StubRoutines::jbyte\_disjoint\_arraycopy  
> 23 # J org.apache.lucene.index.SegmentTermEnum.next()Z
> 
> These are the JVM versions I've tried:
> 
> # JRE version: 6.0\_26-b03
> 
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode
> 
> solaris-amd64 )
> 
> # JRE version: 7.0\_03-b04
> 
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (22.1-b02 mixed mode
> 
> solaris-amd64 )
> 
> These are the Elasticsearch versions I've tried:  
> 0.18.7  
> 0.19.0  
> 0.19.1
> 
> The frequency of crashes went down significantly after switching to niofs,  
> but still occur regularly. Are these crashes still mmap related? Have I not  
> set the index store correctly?
> 
> Thanks!

---

<div class="post-metadata">

**Author:** ![Danny\_Coates](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danny_coates/32/2919_2.png) [@Danny\_Coates](https://discuss.elastic.co/u/Danny_Coates)\
**Post date:** [April 15, 2012, 4:20pm UTC](https://discuss.elastic.co/t/jvm-crashes-on-sunos/7300/3 "2012-04-15T16:20:33Z")

</div>

Thank you! This works great. No more crashes.

Is there a definitive resource with all the possible settings listed out  
(besides source code)? In this case I  
used [http://www.elasticsearch.org/guide/reference/index-modules/store.html](http://www.elasticsearch.org/guide/reference/index-modules/store.html)  
to find the proper value, but mislead myself to setting it to the wrong  
property.

It would also have helped me if I could have seen output like, "index.store  
is a user defined property", somewhere. Then I wouldn't have believed that  
I set it correctly. Does such logging exist?

This isn't the first time I've had trouble with settings. A definitive list  
would help immensely.

Thanks again,  
Danny

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 16, 2012, 7:11am UTC](https://discuss.elastic.co/t/jvm-crashes-on-sunos/7300/4 "2012-04-16T07:11:47Z")

</div>

The guide lists the relevant settings for each section, the funny thing is  
that the guide store section doesn't properly list this setting how to set  
it..., will fix it.

On Sun, Apr 15, 2012 at 7:20 PM, Danny Coates [dannycoates@gmail.com](mailto:dannycoates@gmail.com) wrote:

> Thank you! This works great. No more crashes.
> 
> Is there a definitive resource with all the possible settings listed out  
> (besides source code)? In this case I used  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/store.html) to  
> find the proper value, but mislead myself to setting it to the wrong  
> property.
> 
> It would also have helped me if I could have seen output like,  
> "index.store is a user defined property", somewhere. Then I wouldn't have  
> believed that I set it correctly. Does such logging exist?
> 
> This isn't the first time I've had trouble with settings. A definitive  
> list would help immensely.
> 
> Thanks again,  
> Danny

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:32am UTC](https://discuss.elastic.co/t/jvm-crashes-on-sunos/7300/5 "2017-07-06T03:32:29Z")

</div>


