atilika / kuromoji

Kuromoji is a self-contained and very easy to use Japanese morphological analyzer designed for search
Apache License 2.0
959 stars 131 forks source link

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project kuromoji-benchmark: There are test failures. #81

Closed kallewoof closed 8 years ago

kallewoof commented 9 years ago

Another out of memory issue -- despite the fact I did

export MAVEN_OPTS=-Xmx3g
-------------------------------------------------------------------------------
Test set: com.atilika.kuromoji.benchmark.SimpleBenchmarkTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 67.952 sec <<< FAILURE!
testSimpleBenchmark(com.atilika.kuromoji.benchmark.SimpleBenchmarkTest)  Time elapsed: 5.8 sec  <<< ERROR!
java.lang.OutOfMemoryError: Java heap space
    at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
    at java.nio.ByteBuffer.allocate(ByteBuffer.java:331)
    at com.atilika.kuromoji.io.ByteBufferIO.read(ByteBufferIO.java:39)
    at com.atilika.kuromoji.buffer.TokenInfoBuffer.<init>(TokenInfoBuffer.java:39)
    at com.atilika.kuromoji.dict.TokenInfoDictionary.setup(TokenInfoDictionary.java:165)
    at com.atilika.kuromoji.dict.TokenInfoDictionary.newInstance(TokenInfoDictionary.java:160)
    at com.atilika.kuromoji.TokenizerBase$Builder.loadDictionaries(TokenizerBase.java:289)
    at com.atilika.kuromoji.TokenizerBase.configure(TokenizerBase.java:77)
    at com.atilika.kuromoji.unidic.neologd.Tokenizer.<init>(Tokenizer.java:67)
    at com.atilika.kuromoji.unidic.neologd.Tokenizer.<init>(Tokenizer.java:58)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at java.lang.Class.newInstance(Class.java:374)
    at com.atilika.kuromoji.benchmark.SimpleBenchmarkTest.tokenizeForName(SimpleBenchmarkTest.java:92)
    at com.atilika.kuromoji.benchmark.SimpleBenchmarkTest.testSimpleBenchmark(SimpleBenchmarkTest.java:48)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
cmoen commented 8 years ago

Could you share more information about your hardware, OS environment, Java version, etc.?

The simple benchmark tests creates a bunch of tokenizers in a short period of time and might deplete heap-size on some system -- I've seen this on Windows. Is that your system as well?

cmoen commented 8 years ago

I'm closing this since there hasn't been any update.