Menu

#34 infinite loop

open
nobody
None
7
2010-05-24
2010-05-24
No

I get an infinite loop in jwnl1.4rc2 when looking up the word " [LOCO-SLR-GS-GS-GS-C1-C2-D1-D2-D3-PS1-D4-D5-D6-D7-D8-D9-D10-D]" Yes, this is not a word, but I can't help that. Am investigating now.

Discussion

  • Linas Vepstas

    Linas Vepstas - 2010-05-24

    I've tracked it down to here:
    src/net/didion/jwnl/dictionary/morph/TokenizerOperation.java
    private boolean tryAllCombinations(
    POS pos, String[] tokens, String delimiter, BaseFormSet forms)

    The loop in there appears to be trying vast combinations of possibilities.
    So far, I've racked up 4 hours of CPU time on a server spinning in this loop.

    The correct fix is to limit this loop, so that it stops after the first few million tries.

     
  • Linas Vepstas

    Linas Vepstas - 2010-05-24
    • priority: 5 --> 7
     

Log in to post a comment.