[jira] [Commented] (LUCENE-8203) Windows failures when removing test directories

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (LUCENE-8203) Windows failures when removing test directories

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/LUCENE-8203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16397418#comment-16397418 ]

Hoss Man commented on LUCENE-8203:
----------------------------------

bq. It's also surprising how it sometimes fails with a DirectoryNotEmptyException without reporting issues about deleting inner files of the directory.

Do you have an example of that?

In the example you posted, the DirNotEmpty comes from {{lucene.search.TestBoolean2_B7B1F66EB9785AE1-001}} after saying it already had an AccessDeniedException trying to delete {{lucene.search.TestBoolean2_B7B1F66EB9785AE1-001\tempDir-001}} -- so the "Not Empty" makes sense.

I've seen this pattern a lot, but I can't remember ever seeing DirectoryNotEmptyException w/o already reporting a problem w/some other file in that directory.

> Windows failures when removing test directories
> -----------------------------------------------
>
>                 Key: LUCENE-8203
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8203
>             Project: Lucene - Core
>          Issue Type: Test
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: image-2018-03-13-19-15-51-149.png
>
>
> I was looking at Lucene failures of Policeman Jenkins' Windows job (https://jenkins.thetaphi.de/job/Lucene-Solr-master-Windows) and they all fail  when cleaning up temporary files/dirs used for testing, eg.
> {noformat}
> [junit4] ERROR   0.00s J1 | TestBoolean2 (suite) <<<
>    [junit4]    > Throwable #1: java.io.IOException: Could not remove the following files (in the order of attempts):
>    [junit4]    >    C:\Users\jenkins\workspace\Lucene-Solr-master-Windows\lucene\build\core\test\J1\temp\lucene.search.TestBoolean2_B7B1F66EB9785AE1-001\tempDir-001: java.nio.file.AccessDeniedException: C:\Users\jenkins\workspace\Lucene-Solr-master-Windows\lucene\build\core\test\J1\temp\lucene.search.TestBoolean2_B7B1F66EB9785AE1-001\tempDir-001
>    [junit4]    >    C:\Users\jenkins\workspace\Lucene-Solr-master-Windows\lucene\build\core\test\J1\temp\lucene.search.TestBoolean2_B7B1F66EB9785AE1-001: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\Lucene-Solr-master-Windows\lucene\build\core\test\J1\temp\lucene.search.TestBoolean2_B7B1F66EB9785AE1-001
>    [junit4]    > at __randomizedtesting.SeedInfo.seed([B7B1F66EB9785AE1]:0)
>    [junit4]    > at org.apache.lucene.util.IOUtils.rm(IOUtils.java:329)
>    [junit4]    > at java.lang.Thread.run(Thread.java:748)
> {noformat}
> Has anyone ideas what the problem is? At first sight it looks:
>  - not due to unclosed index inputs or MockDirectoryWrapper would barf too
>  - not related to the unmap hack since we have failures on tests that do not use MmapDirectory at all like TestNIOFSDirectory
>  - not due to the fact that we do not release resources in a try/finally or try-with-resources block or junit would report the exception that prevented the dir/input from being closed as well
> It's also surprising how it sometimes fails with a DirectoryNotEmptyException without reporting issues about deleting inner files of the directory.
> I don't have much background on this issue so I could easily have missed something.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]