Expression compile crash - Where to start looking?


(Björn Lilja) #1

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
  2. Expression: (max((((time() - doc['last_activity'].value)/(10006060*
    • (time() -doc['pub_date'].value)/(10006060*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

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

--


(Ævar Arnfjörð Bjarmason) #2

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.

--


(system) #3