You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by xiaoshi <xi...@163.com> on 2021/08/19 03:42:33 UTC

Failed to execute Ant run-task command

Hello:

When I running ant run-task command, the default thread name is main not ParallelTaskThread,
StringIndexOutOfBoundsException error is thrown.

Here is the stack error:

[java] ####################
[java] ### D O N E !!! ###
[java] ####################
[java] Error: cannot execute the algorithm! String index out of range: -15
[java] java.lang.StringIndexOutOfBoundsException: String index out of range: -15
[java] at java.lang.String.substring(String.java:1967)
[java] at org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource.getNextDocData(ReutersContentSource.java:120)
[java] at org.apache.lucene.benchmark.byTask.feeds.DocMaker.makeDocument(DocMaker.java:371)
[java] at org.apache.lucene.benchmark.byTask.tasks.AddDocTask.setup(AddDocTask.java:52)
[java] at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:134)
[java] at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSequence.java:198)
[java] at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequence.java:139)
[java] at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:146)
[java] at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSequence.java:198)
[java] at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequence.java:139)
[java] at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:146)
[java] at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSequence.java:198)
[java] at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequence.java:139)
[java] at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:146)
[java] at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSequence.java:198)
[java] at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequence.java:139)
[java] at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:146)
[java] at org.apache.lucene.benchmark.byTask.utils.Algorithm.execute(Algorithm.java:332)
[java] at org.apache.lucene.benchmark.byTask.Benchmark.execute(Benchmark.java:77)
[java] at org.apache.lucene.benchmark.byTask.Benchmark.exec(Benchmark.java:121)
[java] at org.apache.lucene.benchmark.byTask.Benchmark.main(Benchmark.java:85)




I submitted a pull request (GitHub Pull Request #2556) to fix this issue, can someone please to see if it needs to be fixed?
I submitted an issues in jira : https://issues.apache.org/jira/browse/LUCENE-10051




Re:Re:Re:RE: Failed to execute Ant run-task command

Posted by xiaoshi <xi...@163.com>.
I have submitted the relevant issues on jira: LUCENE-10058.

















At 2021-08-20 00:31:22, "xiaoshi" <xi...@163.com> wrote:
>I also get an StringIndexOutOfBoundsException error when I run the latest main(9.0) branch.
>
>
>the commond:   ./gradlew lucene:benchmark:run -Druntime.java.home=/Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home
>
>
>Run results:
>> Task :errorProneSkipped
>WARNING: errorprone disabled (skipped on non-nightly runs)
>
>
>> Task :lucene:benchmark:run
>Running algorithm from: /Users/zhanglei/git/lucene_source/lucene_zl/lucene/lucene/benchmark/conf/micro-standard.alg
>------------> config properties:
>analyzer = org.apache.lucene.analysis.standard.StandardAnalyzer
>compound = true
>content.source = org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource
>directory = FSDirectory
>doc.stored = true
>doc.term.vector = false
>doc.tokenized = true
>docs.dir = reuters21578
>log.queries = true
>log.step = 500
>max.buffered = buf:10:10:100:100
>merge.factor = mrg:10:100:10:100
>query.maker = org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker
>task.max.depth.log = 2
>work.dir = data
>-------------------------------
>------------> queries:
>0. TermQuery - body:salomon
>1. TermQuery - body:comex
>2. BooleanQuery - body:night body:trading
>3. BooleanQuery - body:japan body:sony
>4. PhraseQuery - body:"sony japan"
>5. PhraseQuery - body:"food needs"~3
>6. BooleanQuery - +(body:"world bank")^2.0 +body:nigeria
>7. BooleanQuery - body:"world bank" -body:nigeria
>8. PhraseQuery - body:"ford credit"~5
>9. BooleanQuery - body:airline body:europe body:canada body:destination
>10. BooleanQuery - body:long body:term body:pressure body:by body:trade body:ministers body:is body:necessary body:if body:the body:current body:uruguay body:round body:of body:talks body:on body:the body:general body:agreement body:on body:trade body:and body:tariffs body:gatt body:is body:to body:succeed
>11. SpanFirstQuery - spanFirst(body:ford, 5)
>12. SpanNearQuery - spanNear([body:night, body:trading], 4, false)
>13. SpanNearQuery - spanNear([spanFirst(body:ford, 10), body:credit], 10, false)
>14. WildcardQuery - body:fo*
>
>
>------------> algorithm:
>Seq {
>    Rounds_4 {
>        ResetSystemErase
>        Populate {
>            -CreateIndex
>            MAddDocs_2000 {
>                AddDoc
>            > * 2000
>            -ForceMerge(1.0)
>            -CloseIndex
>        }
>        OpenReader
>        SearchSameRdr_5000 {
>            Search
>        > * 5000
>        CloseReader
>        WarmNewRdr_50 {
>            Warm
>        > * 50
>        SrchNewRdr_500 {
>            Search
>        > * 500
>        SrchTrvNewRdr_300 {
>            SearchTrav(1000.0)
>        > * 300
>        SrchTrvRetNewRdr_100 {
>            SearchTravRet(2000.0)
>        > * 100
>        NewRound
>    } * 4
>    RepSumByName
>    RepSumByPrefRound MAddDocs
>}
>
>
>------------> starting task: Seq
>------------> starting task: Rounds_4
>------------> starting task: Populate
>Error: cannot execute the algorithm! begin 19, end 4, length 4
>java.lang.StringIndexOutOfBoundsException: begin 19, end 4, length 4
>        at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
>        at java.base/java.lang.String.substring(String.java:1874)
>        at org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource.getNextDocData(ReutersContentSource.java:117)
>        at org.apache.lucene.benchmark.byTask.feeds.DocMaker.makeDocument(DocMaker.java:368)
>        at org.apache.lucene.benchmark.byTask.tasks.AddDocTask.setup(AddDocTask.java:50)
>        at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:131)
>        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSequence.java:189)
>        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequence.java:127)
>        at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:143)
>        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSequence.java:189)
>        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequence.java:127)
>        at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:143)
>        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSequence.java:189)
>        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequence.java:127)
>        at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:143)
>        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSequence.java:189)
>        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequence.java:127)
>        at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:143)
>        at org.apache.lucene.benchmark.byTask.utils.Algorithm.execute(Algorithm.java:335)
>        at org.apache.lucene.benchmark.byTask.Benchmark.execute(Benchmark.java:78)
>        at org.apache.lucene.benchmark.byTask.Benchmark.exec(Benchmark.java:124)####################
>
>
>        at org.apache.lucene.benchmark.byTask.Benchmark.main(Benchmark.java:87)
>###  D O N E !!! ###
>####################
>
>
>BUILD SUCCESSFUL in 3s
>31 actionable tasks: 3 executed, 28 up-to-date

Re:Re:RE: Failed to execute Ant run-task command

Posted by xiaoshi <xi...@163.com>.
I also get an StringIndexOutOfBoundsException error when I run the latest main(9.0) branch.


the commond:   ./gradlew lucene:benchmark:run -Druntime.java.home=/Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home


Run results:
> Task :errorProneSkipped
WARNING: errorprone disabled (skipped on non-nightly runs)


> Task :lucene:benchmark:run
Running algorithm from: /Users/zhanglei/git/lucene_source/lucene_zl/lucene/lucene/benchmark/conf/micro-standard.alg
------------> config properties:
analyzer = org.apache.lucene.analysis.standard.StandardAnalyzer
compound = true
content.source = org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource
directory = FSDirectory
doc.stored = true
doc.term.vector = false
doc.tokenized = true
docs.dir = reuters21578
log.queries = true
log.step = 500
max.buffered = buf:10:10:100:100
merge.factor = mrg:10:100:10:100
query.maker = org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker
task.max.depth.log = 2
work.dir = data
-------------------------------
------------> queries:
0. TermQuery - body:salomon
1. TermQuery - body:comex
2. BooleanQuery - body:night body:trading
3. BooleanQuery - body:japan body:sony
4. PhraseQuery - body:"sony japan"
5. PhraseQuery - body:"food needs"~3
6. BooleanQuery - +(body:"world bank")^2.0 +body:nigeria
7. BooleanQuery - body:"world bank" -body:nigeria
8. PhraseQuery - body:"ford credit"~5
9. BooleanQuery - body:airline body:europe body:canada body:destination
10. BooleanQuery - body:long body:term body:pressure body:by body:trade body:ministers body:is body:necessary body:if body:the body:current body:uruguay body:round body:of body:talks body:on body:the body:general body:agreement body:on body:trade body:and body:tariffs body:gatt body:is body:to body:succeed
11. SpanFirstQuery - spanFirst(body:ford, 5)
12. SpanNearQuery - spanNear([body:night, body:trading], 4, false)
13. SpanNearQuery - spanNear([spanFirst(body:ford, 10), body:credit], 10, false)
14. WildcardQuery - body:fo*


------------> algorithm:
Seq {
    Rounds_4 {
        ResetSystemErase
        Populate {
            -CreateIndex
            MAddDocs_2000 {
                AddDoc
            > * 2000
            -ForceMerge(1.0)
            -CloseIndex
        }
        OpenReader
        SearchSameRdr_5000 {
            Search
        > * 5000
        CloseReader
        WarmNewRdr_50 {
            Warm
        > * 50
        SrchNewRdr_500 {
            Search
        > * 500
        SrchTrvNewRdr_300 {
            SearchTrav(1000.0)
        > * 300
        SrchTrvRetNewRdr_100 {
            SearchTravRet(2000.0)
        > * 100
        NewRound
    } * 4
    RepSumByName
    RepSumByPrefRound MAddDocs
}


------------> starting task: Seq
------------> starting task: Rounds_4
------------> starting task: Populate
Error: cannot execute the algorithm! begin 19, end 4, length 4
java.lang.StringIndexOutOfBoundsException: begin 19, end 4, length 4
        at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
        at java.base/java.lang.String.substring(String.java:1874)
        at org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource.getNextDocData(ReutersContentSource.java:117)
        at org.apache.lucene.benchmark.byTask.feeds.DocMaker.makeDocument(DocMaker.java:368)
        at org.apache.lucene.benchmark.byTask.tasks.AddDocTask.setup(AddDocTask.java:50)
        at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:131)
        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSequence.java:189)
        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequence.java:127)
        at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:143)
        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSequence.java:189)
        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequence.java:127)
        at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:143)
        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSequence.java:189)
        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequence.java:127)
        at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:143)
        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSequence.java:189)
        at org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequence.java:127)
        at org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTask.java:143)
        at org.apache.lucene.benchmark.byTask.utils.Algorithm.execute(Algorithm.java:335)
        at org.apache.lucene.benchmark.byTask.Benchmark.execute(Benchmark.java:78)
        at org.apache.lucene.benchmark.byTask.Benchmark.exec(Benchmark.java:124)####################


        at org.apache.lucene.benchmark.byTask.Benchmark.main(Benchmark.java:87)
###  D O N E !!! ###
####################


BUILD SUCCESSFUL in 3s
31 actionable tasks: 3 executed, 28 up-to-date

Re:RE: Failed to execute Ant run-task command

Posted by xiaoshi <xi...@163.com>.
Thanks for reply.
I submitted an issues in jira : https://issues.apache.org/jira/browse/LUCENE-10051 .
I'll run it on 9.0 right away, and get back to you later.














At 2021-08-19 17:07:21, "Uwe Schindler" <uw...@thetaphi.de> wrote:
>Could you please open an issue?
>
>Can you also check if it still happens on main branch with Lucene 9.0 and
>Gradle as build system?
>
>-----
>Uwe Schindler
>Achterdiek 19, D-28357 Bremen
>https://www.thetaphi.de
>eMail: uwe@thetaphi.de
>
>> -----Original Message-----
>> From: xiaoshi <xi...@163.com>
>> Sent: Thursday, August 19, 2021 5:43 AM
>> To: java-user@lucene.apache.org
>> Subject: Failed to execute Ant run-task command
>> 
>> Hello:
>> 
>> When I running ant run-task command, the default thread name is main not
>> ParallelTaskThread,
>> StringIndexOutOfBoundsException error is thrown.
>> 
>> Here is the stack error:
>> 
>> [java] ####################
>> [java] ### D O N E !!! ###
>> [java] ####################
>> [java] Error: cannot execute the algorithm! String index out of range: -15
>> [java] java.lang.StringIndexOutOfBoundsException: String index out of
>range: -
>> 15
>> [java] at java.lang.String.substring(String.java:1967)
>> [java] at
>> org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource.getNextDoc
>> Data(ReutersContentSource.java:120)
>> [java] at
>> org.apache.lucene.benchmark.byTask.feeds.DocMaker.makeDocument(DocMak
>> er.java:371)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.AddDocTask.setup(AddDocTask.java
>> :52)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTa
>> sk.java:134)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSe
>> quence.java:198)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequenc
>> e.java:139)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTa
>> sk.java:146)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSe
>> quence.java:198)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequenc
>> e.java:139)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTa
>> sk.java:146)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSe
>> quence.java:198)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequenc
>> e.java:139)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTa
>> sk.java:146)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSe
>> quence.java:198)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequenc
>> e.java:139)
>> [java] at
>> org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTa
>> sk.java:146)
>> [java] at
>>
>org.apache.lucene.benchmark.byTask.utils.Algorithm.execute(Algorithm.java:33
>> 2)
>> [java] at
>> org.apache.lucene.benchmark.byTask.Benchmark.execute(Benchmark.java:77)
>> [java] at
>> org.apache.lucene.benchmark.byTask.Benchmark.exec(Benchmark.java:121)
>> [java] at
>> org.apache.lucene.benchmark.byTask.Benchmark.main(Benchmark.java:85)
>> 
>> 
>> 
>> 
>> I submitted a pull request (GitHub Pull Request #2556) to fix this issue,
>can
>> someone please to see if it needs to be fixed?
>> I submitted an issues in jira :
>https://issues.apache.org/jira/browse/LUCENE-
>> 10051
>> 
>> 
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>For additional commands, e-mail: java-user-help@lucene.apache.org

RE: Failed to execute Ant run-task command

Posted by Uwe Schindler <uw...@thetaphi.de>.
Could you please open an issue?

Can you also check if it still happens on main branch with Lucene 9.0 and
Gradle as build system?

-----
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: xiaoshi <xi...@163.com>
> Sent: Thursday, August 19, 2021 5:43 AM
> To: java-user@lucene.apache.org
> Subject: Failed to execute Ant run-task command
> 
> Hello:
> 
> When I running ant run-task command, the default thread name is main not
> ParallelTaskThread,
> StringIndexOutOfBoundsException error is thrown.
> 
> Here is the stack error:
> 
> [java] ####################
> [java] ### D O N E !!! ###
> [java] ####################
> [java] Error: cannot execute the algorithm! String index out of range: -15
> [java] java.lang.StringIndexOutOfBoundsException: String index out of
range: -
> 15
> [java] at java.lang.String.substring(String.java:1967)
> [java] at
> org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource.getNextDoc
> Data(ReutersContentSource.java:120)
> [java] at
> org.apache.lucene.benchmark.byTask.feeds.DocMaker.makeDocument(DocMak
> er.java:371)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.AddDocTask.setup(AddDocTask.java
> :52)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTa
> sk.java:134)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSe
> quence.java:198)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequenc
> e.java:139)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTa
> sk.java:146)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSe
> quence.java:198)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequenc
> e.java:139)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTa
> sk.java:146)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSe
> quence.java:198)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequenc
> e.java:139)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTa
> sk.java:146)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doSerialTasks(TaskSe
> quence.java:198)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.TaskSequence.doLogic(TaskSequenc
> e.java:139)
> [java] at
> org.apache.lucene.benchmark.byTask.tasks.PerfTask.runAndMaybeStats(PerfTa
> sk.java:146)
> [java] at
>
org.apache.lucene.benchmark.byTask.utils.Algorithm.execute(Algorithm.java:33
> 2)
> [java] at
> org.apache.lucene.benchmark.byTask.Benchmark.execute(Benchmark.java:77)
> [java] at
> org.apache.lucene.benchmark.byTask.Benchmark.exec(Benchmark.java:121)
> [java] at
> org.apache.lucene.benchmark.byTask.Benchmark.main(Benchmark.java:85)
> 
> 
> 
> 
> I submitted a pull request (GitHub Pull Request #2556) to fix this issue,
can
> someone please to see if it needs to be fixed?
> I submitted an issues in jira :
https://issues.apache.org/jira/browse/LUCENE-
> 10051
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org