# Expression compile crash - Where to start looking?

**URL:** <https://discuss.elastic.co/t/expression-compile-crash-where-to-start-looking/8926>\
**Category:** Elasticsearch\
**Created:** [September 4, 2012, 4:08pm UTC](https://discuss.elastic.co/t/expression-compile-crash-where-to-start-looking/8926 "2012-09-04T16:08:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bjorn\_Lilja](https://avatars.discourse-cdn.com/v4/letter/b/ecc23a/32.png) [@Bjorn\_Lilja](https://discuss.elastic.co/u/Bjorn_Lilja)\
**Post date:** [September 4, 2012, 4:08pm UTC](https://discuss.elastic.co/t/expression-compile-crash-where-to-start-looking/8926/1 "2012-09-04T16:08:25Z")

</div>

Hi

We have recently started to get this exception thrown by Elasticsearch:

1. \*\*\*\* COMPILER BUG! REPORT THIS IMMEDIATELY AT http:  
[//jira.codehaus.org/browse/mvel2](https://jira.codehaus.org/browse/mvel2)
2. Expression: (max((((time() - doc['last\_activity'].value)/(1000_60_60\*

1. 
  - (time() -doc['pub\_date'].value)/(1000_60_60\*24)) / 2), 14.0) - 14.0  
)/14.0

1. Exception in thread "elasticsearch[Paladin][search][T#1]" java.lang.  
VerifyError: (class:ASMAccessorImpl\_10314052691346751095980, method: getValue  
signature:(Ljava/lang/Object;Ljava/lang/Object;Lorg/elasticsearch/common/  
mvel2/integration/VariableResolverFactory;)Ljava/lang/Object;)Expecting  
to find double on stack

Complete trace here: [http://pastebin.com/apjvF9Le](http://pastebin.com/apjvF9Le)

This occurs seemingly random and the same search does not cause the crash  
twice. It does hog elasticsearch down for a few seconds but then everything  
works fine again only to reoccur in a different query later. The expression  
found above is common to all queries made.

We are using Elasticsearch 0.19.9 with pyes 0.19.1.

I would guess that this is not a bug in elasticsearch, but I am completely  
lost on were to start looking for the cause of this errors. Any pointers  
would be highly appreciated! Thanks.

Sincerely, Björn

--

---

<div class="post-metadata">

**Author:** ![AEvar\_Arnfjord\_Bjarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aevar_arnfjord_bjarm/32/2746_2.png) [@AEvar\_Arnfjord\_Bjarm](https://discuss.elastic.co/u/AEvar_Arnfjord_Bjarm)\
**Post date:** [September 4, 2012, 6:41pm UTC](https://discuss.elastic.co/t/expression-compile-crash-where-to-start-looking/8926/2 "2012-09-04T18:41:50Z")

</div>

As the backtrace indicates it's a bug in mvel.

You can mitigate it by using another language for your script callback.

You could reproduce it by seeing what arguments ElasticSearch passes  
to construct the mvel object, then make that into a testcase you can  
submit to the mvel developers.

--

---

<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:14am UTC](https://discuss.elastic.co/t/expression-compile-crash-where-to-start-looking/8926/3 "2017-07-06T03:14:10Z")

</div>


