Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate "lovinssnowballstem" "concatenategraph" token filters #86

Closed
dainiusjocas opened this issue Apr 26, 2021 · 2 comments
Closed

Comments

@dainiusjocas
Copy link
Owner

These two fail when compiled with GraalVM.

./lmgrep test/resources/test.txt --only-analyze --analysis="$(cat test/resources/binary/tokenfilters/lovinssnowballstem.json)"   
java.lang.invoke.BoundMethodHandle$Species_LL cannot be cast to java.lang.invoke.SimpleMethodHandle

oracle/graal#3341

org.apache.lucene.analysis.tokenattributes.BytesTermAttributeImpl cannot be cast to org.apache.lucene.analysis.miscellaneous.ConcatenateGraphFilter$BytesRefBuilderTermAttribute

This one also fails in REPL

(cast org.apache.lucene.analysis.miscellaneous.ConcatenateGraphFilter$BytesRefBuilderTermAttribute
      (org.apache.lucene.analysis.tokenattributes.BytesTermAttributeImpl.))
Execution error (ClassCastException) at java.lang.Class/cast (Class.java:3818).
Cannot cast org.apache.lucene.analysis.tokenattributes.BytesTermAttributeImpl to org.apache.lucene.analysis.miscellaneous.ConcatenateGraphFilter$BytesRefBuilderTermAttribute
@dainiusjocas
Copy link
Owner Author

Lovins is solved with Graalvm update to 21.2.0

However, there is a problem with concurrent execution:

java.util.ConcurrentModificationException
        at java.util.HashMap.computeIfAbsent(HashMap.java:1134)
        at com.oracle.svm.methodhandles.MethodHandleIntrinsicImpl.intrinsic(MethodHandleIntrinsicImpl.java:140)
        at com.oracle.svm.methodhandles.MethodHandleIntrinsicImpl.intrinsic(MethodHandleIntrinsicImpl.java:159)
        at com.oracle.svm.methodhandles.MethodHandleIntrinsicImpl.resolve(MethodHandleIntrinsicImpl.java:455)
        at com.oracle.svm.methodhandles.Util_java_lang_invoke_MethodHandleNatives.resolve(Target_java_lang_invoke_MethodHandleNatives.java:307)
        at java.lang.invoke.MethodHandleNatives.resolve(MethodHandleNatives.java:214)
        at com.oracle.svm.methodhandles.Util_java_lang_invoke_MethodHandle.invokeInternal(Target_java_lang_invoke_MethodHandle.java:139)
        at java.lang.invoke.MethodHandle.invokeBasic(MethodHandle.java:79)
        at java.lang.invoke.LambdaForm$NamedFunction.invokeWithArguments(LambdaForm.java:76)
        at java.lang.invoke.LambdaForm.interpretName(LambdaForm.java:981)
        at java.lang.invoke.LambdaForm.interpretWithArguments(LambdaForm.java:958)
        at java.lang.invoke.MethodHandle.invokeBasic(MethodHandle.java:85)
        at java.lang.invoke.MethodHandle.invokeBasic(MethodHandle.java:0)
        at java.lang.invoke.LambdaForm$MH/485828909.invokeExact_MT(LambdaForm$MH)
        at org.tartarus.snowball.SnowballProgram.find_among_b(SnowballProgram.java:382)
        at org.tartarus.snowball.ext.LovinsStemmer.r_endings(LovinsStemmer.java:1526)
        at org.tartarus.snowball.ext.LovinsStemmer.stem(LovinsStemmer.java:1886)
        at org.apache.lucene.analysis.snowball.SnowballFilter.incrementToken(SnowballFilter.java:95)
        at lmgrep.lucene.text_analysis$text__GT_token_strings.invokeStatic(text_analysis.clj:16)
        at lmgrep.lucene.text_analysis$text__GT_token_strings.invoke(text_analysis.clj:9)
        at lmgrep.only_analyze$ordered_analysis$analyze_fn__9504.invoke(only_analyze.clj:99)
        at clojure.core$map$fn__5880$fn__5881.invoke(core.clj:2746)
        at clojure.core.async.impl.channels$chan$fn__1031.invoke(channels.clj:300)
        at clojure.core.async.impl.channels.ManyToManyChannel.put_BANG_(channels.clj:143)
        at clojure.core.async$fn__6243.invokeStatic(async.clj:172)
        at clojure.core.async$fn__6243.invoke(async.clj:164)
        at clojure.core.async$pipeline_STAR_$process__6427.invoke(async.clj:534)
        at clojure.core.async$pipeline_STAR_$fn__6556.invoke(async.clj:549)
        at clojure.core.async$thread_call$fn__6350.invoke(async.clj:484)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.lang.Thread.run(Thread.java:829)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:567)
        at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
Failed analysis with token filter in : test/resources/binary/tokenfilters/lovinssnowballstem.json

@dainiusjocas
Copy link
Owner Author

oracle/graal#3695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant