You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2009/10/18 23:49:32 UTC

[jira] Created: (LUCENE-1992) intermittent failure in TestIndexWriter. testExceptionDuringSync

intermittent failure in TestIndexWriter. testExceptionDuringSync 
-----------------------------------------------------------------

                 Key: LUCENE-1992
                 URL: https://issues.apache.org/jira/browse/LUCENE-1992
             Project: Lucene - Java
          Issue Type: Bug
          Components: Index
            Reporter: Michael McCandless
            Assignee: Michael McCandless
            Priority: Minor
             Fix For: 3.0


{code}
common.test:

    [mkdir] Created dir: C:\Projects\lucene\trunk-full1\build\test

    [junit] Testsuite: org.apache.lucene.index.TestIndexWriter

    [junit] Tests run: 102, Failures: 0, Errors: 1, Time elapsed: 100,297sec

    [junit]

    [junit] Testcase: testExceptionDuringSync(org.apache.lucene.index.TestIndexWriter): Caused an ERROR

    [junit] _a.fnm

    [junit] java.io.FileNotFoundException: _a.fnm

    [junit]     at org.apache.lucene.store.MockRAMDirectory.openInput(MockRAMDirectory.java:226)

    [junit]     at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:68)

    [junit]     at org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:116)

    [junit]     at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:620)

    [junit]     at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:590)

    [junit]     at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:104)

    [junit]     at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:27)

    [junit]     at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:74)

    [junit]     at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:704)

    [junit]     at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)

    [junit]     at org.apache.lucene.index.IndexReader.open(IndexReader.java:307)

    [junit]     at org.apache.lucene.index.IndexReader.open(IndexReader.java:193)

    [junit]     at org.apache.lucene.index.TestIndexWriter.testExceptionDuringSync(TestIndexWriter.java:2723)

    [junit]     at org.apache.lucene.util.LuceneTestCase.runBare(LuceneTestCase.java:206)

    [junit]

    [junit]

    [junit] Test org.apache.lucene.index.TestIndexWriter FAILED
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-1992) intermittent failure in TestIndexWriter. testExceptionDuringSync

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12767223#action_12767223 ] 

Uwe Schindler commented on LUCENE-1992:
---------------------------------------

>From the patch:
{code}
-    // We expect sync exceptions in the merge threads
-    cms.setSuppressExceptions();
{code}

Should this also applied to bw branch (2.4 for) 2.9 and (2.9 for) 3.0? I do not know what this call really does and what effect it has.

> intermittent failure in TestIndexWriter. testExceptionDuringSync 
> -----------------------------------------------------------------
>
>                 Key: LUCENE-1992
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1992
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9.1, 3.0
>
>         Attachments: LUCENE-1992.patch
>
>
> {code}
> common.test:
>     [mkdir] Created dir: C:\Projects\lucene\trunk-full1\build\test
>     [junit] Testsuite: org.apache.lucene.index.TestIndexWriter
>     [junit] Tests run: 102, Failures: 0, Errors: 1, Time elapsed: 100,297sec
>     [junit]
>     [junit] Testcase: testExceptionDuringSync(org.apache.lucene.index.TestIndexWriter): Caused an ERROR
>     [junit] _a.fnm
>     [junit] java.io.FileNotFoundException: _a.fnm
>     [junit]     at org.apache.lucene.store.MockRAMDirectory.openInput(MockRAMDirectory.java:226)
>     [junit]     at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:68)
>     [junit]     at org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:116)
>     [junit]     at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:620)
>     [junit]     at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:590)
>     [junit]     at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:104)
>     [junit]     at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:27)
>     [junit]     at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:74)
>     [junit]     at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:704)
>     [junit]     at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>     [junit]     at org.apache.lucene.index.IndexReader.open(IndexReader.java:307)
>     [junit]     at org.apache.lucene.index.IndexReader.open(IndexReader.java:193)
>     [junit]     at org.apache.lucene.index.TestIndexWriter.testExceptionDuringSync(TestIndexWriter.java:2723)
>     [junit]     at org.apache.lucene.util.LuceneTestCase.runBare(LuceneTestCase.java:206)
>     [junit]
>     [junit]
>     [junit] Test org.apache.lucene.index.TestIndexWriter FAILED
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-1992) intermittent failure in TestIndexWriter. testExceptionDuringSync

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12767258#action_12767258 ] 

Michael McCandless commented on LUCENE-1992:
--------------------------------------------

bq. Should this also applied to bw branch (2.4 for) 2.9 and (2.9 for) 3.0? 

No, it can only be applied on trunk.

That call tells ConcurrentMergeScheduler to expect exceptions during this test, which when autoCommit is true (which this test is doing everywhere except trunk) will happen because when a merge completes, it'll commit and call Directory.sync which throws the intentional exception.

> intermittent failure in TestIndexWriter. testExceptionDuringSync 
> -----------------------------------------------------------------
>
>                 Key: LUCENE-1992
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1992
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9.1, 3.0
>
>         Attachments: LUCENE-1992.patch
>
>
> {code}
> common.test:
>     [mkdir] Created dir: C:\Projects\lucene\trunk-full1\build\test
>     [junit] Testsuite: org.apache.lucene.index.TestIndexWriter
>     [junit] Tests run: 102, Failures: 0, Errors: 1, Time elapsed: 100,297sec
>     [junit]
>     [junit] Testcase: testExceptionDuringSync(org.apache.lucene.index.TestIndexWriter): Caused an ERROR
>     [junit] _a.fnm
>     [junit] java.io.FileNotFoundException: _a.fnm
>     [junit]     at org.apache.lucene.store.MockRAMDirectory.openInput(MockRAMDirectory.java:226)
>     [junit]     at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:68)
>     [junit]     at org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:116)
>     [junit]     at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:620)
>     [junit]     at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:590)
>     [junit]     at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:104)
>     [junit]     at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:27)
>     [junit]     at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:74)
>     [junit]     at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:704)
>     [junit]     at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>     [junit]     at org.apache.lucene.index.IndexReader.open(IndexReader.java:307)
>     [junit]     at org.apache.lucene.index.IndexReader.open(IndexReader.java:193)
>     [junit]     at org.apache.lucene.index.TestIndexWriter.testExceptionDuringSync(TestIndexWriter.java:2723)
>     [junit]     at org.apache.lucene.util.LuceneTestCase.runBare(LuceneTestCase.java:206)
>     [junit]
>     [junit]
>     [junit] Test org.apache.lucene.index.TestIndexWriter FAILED
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-1992) intermittent failure in TestIndexWriter. testExceptionDuringSync

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-1992:
---------------------------------------

    Attachment: LUCENE-1992.patch

Patch attached.  I'll commit shortly on trunk & 2.9.1.

There is a thread hazard that happens when a merge is committing just
as an exception is happening during sync.  There merge actually
changes the segmentInfos, but fails to checkpoint before exiting the
sync block.  If an exception during syncing is handled in another
thread, this can then decRef the newly merged segment to 0, deleting
it too early.

> intermittent failure in TestIndexWriter. testExceptionDuringSync 
> -----------------------------------------------------------------
>
>                 Key: LUCENE-1992
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1992
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: LUCENE-1992.patch
>
>
> {code}
> common.test:
>     [mkdir] Created dir: C:\Projects\lucene\trunk-full1\build\test
>     [junit] Testsuite: org.apache.lucene.index.TestIndexWriter
>     [junit] Tests run: 102, Failures: 0, Errors: 1, Time elapsed: 100,297sec
>     [junit]
>     [junit] Testcase: testExceptionDuringSync(org.apache.lucene.index.TestIndexWriter): Caused an ERROR
>     [junit] _a.fnm
>     [junit] java.io.FileNotFoundException: _a.fnm
>     [junit]     at org.apache.lucene.store.MockRAMDirectory.openInput(MockRAMDirectory.java:226)
>     [junit]     at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:68)
>     [junit]     at org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:116)
>     [junit]     at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:620)
>     [junit]     at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:590)
>     [junit]     at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:104)
>     [junit]     at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:27)
>     [junit]     at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:74)
>     [junit]     at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:704)
>     [junit]     at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>     [junit]     at org.apache.lucene.index.IndexReader.open(IndexReader.java:307)
>     [junit]     at org.apache.lucene.index.IndexReader.open(IndexReader.java:193)
>     [junit]     at org.apache.lucene.index.TestIndexWriter.testExceptionDuringSync(TestIndexWriter.java:2723)
>     [junit]     at org.apache.lucene.util.LuceneTestCase.runBare(LuceneTestCase.java:206)
>     [junit]
>     [junit]
>     [junit] Test org.apache.lucene.index.TestIndexWriter FAILED
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (LUCENE-1992) intermittent failure in TestIndexWriter. testExceptionDuringSync

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless resolved LUCENE-1992.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9.1

Thanks for reporting this Uwe!

> intermittent failure in TestIndexWriter. testExceptionDuringSync 
> -----------------------------------------------------------------
>
>                 Key: LUCENE-1992
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1992
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9.1, 3.0
>
>         Attachments: LUCENE-1992.patch
>
>
> {code}
> common.test:
>     [mkdir] Created dir: C:\Projects\lucene\trunk-full1\build\test
>     [junit] Testsuite: org.apache.lucene.index.TestIndexWriter
>     [junit] Tests run: 102, Failures: 0, Errors: 1, Time elapsed: 100,297sec
>     [junit]
>     [junit] Testcase: testExceptionDuringSync(org.apache.lucene.index.TestIndexWriter): Caused an ERROR
>     [junit] _a.fnm
>     [junit] java.io.FileNotFoundException: _a.fnm
>     [junit]     at org.apache.lucene.store.MockRAMDirectory.openInput(MockRAMDirectory.java:226)
>     [junit]     at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:68)
>     [junit]     at org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:116)
>     [junit]     at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:620)
>     [junit]     at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:590)
>     [junit]     at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:104)
>     [junit]     at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:27)
>     [junit]     at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:74)
>     [junit]     at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:704)
>     [junit]     at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>     [junit]     at org.apache.lucene.index.IndexReader.open(IndexReader.java:307)
>     [junit]     at org.apache.lucene.index.IndexReader.open(IndexReader.java:193)
>     [junit]     at org.apache.lucene.index.TestIndexWriter.testExceptionDuringSync(TestIndexWriter.java:2723)
>     [junit]     at org.apache.lucene.util.LuceneTestCase.runBare(LuceneTestCase.java:206)
>     [junit]
>     [junit]
>     [junit] Test org.apache.lucene.index.TestIndexWriter FAILED
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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