Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intermittent FileAlreadyExistsException on Windows #117

Closed
schmir opened this issue Feb 1, 2015 · 19 comments
Closed

intermittent FileAlreadyExistsException on Windows #117

schmir opened this issue Feb 1, 2015 · 19 comments

Comments

@schmir
Copy link
Contributor

schmir commented Feb 1, 2015

I get intermittent java.nio.file.FileAlreadyExistsException when building a release on Windows. These happen after AOT compilation in the commit! function. Part of the problem is that io/delete-file is called with a second 'true' argument in boot.file/empty-dir!. That is, it silently ignores errors when deleting the file.

Is there a reason why boot explicitly tries to ignore errors here?

Later on commit! tries to hard-link a file to the same path and the file already exists.

Here's log output from a slightly patched boot

Compiling 55/55 steinmetz.version...
ERROR DELETING32#<File C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\3v4\-x24pa9\steinmetz\tab_tab.clj>
ERROR DELETING32#<File C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\3v4\-x24pa9\steinmetz\version.clj>
ERROR DELETING32#<File C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\3v4\-x24pa9\steinmetz>
hard-link32#<WindowsPath C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\3v4\-x24pa9\steinmetz\version.clj>32#<WindowsPath C:\Users\ralf\.boot\
tmp\Users\ralf\home\steinmetz\3v4\-7kd6cy\698743b3d94f0a87dba52c360c41a38b>
ERROR in hard-link32#<FileAlreadyExistsException java.nio.file.FileAlreadyExistsException: C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\3v4\
-x24pa9\steinmetz\version.clj -> C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\3v4\-7kd6cy\698743b3d94f0a87dba52c360c41a38b>
          clojure.lang.ExceptionInfo: java.nio.file.FileAlreadyExistsException: C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\3v4\-x24pa9
\steinmetz\version.clj -> C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\3v4\-7kd6cy\698743b3d94f0a87dba52c360c41a38b
    data: {:file
       "..\\Users\\ralf\\AppData\\Local\\Temp\\boot.user1661604896684391295.clj",
       :line 31}
 java.util.concurrent.ExecutionException: java.nio.file.FileAlreadyExistsException: C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\3v4\-x24pa9
\steinmetz\version.clj -> C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\3v4\-7kd6cy\698743b3d94f0a87dba52c360c41a38b
java.nio.file.FileAlreadyExistsException: C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\3v4\-x24pa9\steinmetz\version.clj -> C:\Users\ralf\.b
oot\tmp\Users\ralf\home\steinmetz\3v4\-7kd6cy\698743b3d94f0a87dba52c360c41a38b
     file: "C:\\Users\\ralf\\.boot\\tmp\\Users\\ralf\\home\\steinmetz\\3v4\\-x24pa9\\steinmetz\\version.clj"
    otherFile: "C:\\Users\\ralf\\.boot\\tmp\\Users\\ralf\\home\\steinmetz\\3v4\\-7kd6cy\\698743b3d94f0a87dba52c360c41a38b"
sun.nio.fs.WindowsException.translateToIOException             WindowsException.java:   81
  sun.nio.fs.WindowsException.rethrowAsIOException             WindowsException.java:   97
   sun.nio.fs.WindowsFileSystemProvider.createLink    WindowsFileSystemProvider.java:  608
                           ...
                   boot.file/hard-link                          file.clj:  129
               boot.file/copy-with-lastmod                          file.clj:  143
            boot.tmpdir.TmpFileSet/commit!                        tmpdir.clj:   69
                 boot.core/commit!                          core.clj:  336
            boot.task.built-in/fn/fn/fn/fn                      built_in.clj:  438
            boot.task.built-in/fn/fn/fn/fn                      built_in.clj:  444
            boot.task.built-in/fn/fn/fn/fn                      built_in.clj:  232
                   boot.core/run-tasks                          core.clj:  637
                           ...
                  boot.user/eval295/fn  boot.user1661604896684391295.clj:   33
           clojure.core/binding-conveyor-fn/fn                          core.clj: 1910
                           ...

(Windows can't delete files that are in use)

@schmir
Copy link
Contributor Author

schmir commented Feb 14, 2015

I've used http://file-leak-detector.kohsuke.org/ to get an idea which parts of boot hold on to files, when they shouldn't.

It looks like clojure's compile method, or rather clojure.lang.RT.lastModified relies on garbage collection to close the files:

#205 C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\2mg\-x24pa9\steinmetz\fx\config.clj by thread:clojure-agent-send-off-pool-0 on Sat Feb 14 19:58:46 UTC 2015
    at java.io.FileInputStream.(FileInputStream.java:139)
    at java.io.FileInputStream.(FileInputStream.java:93)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
    at sun.net.www.protocol.file.FileURLConnection.initializeHeaders(FileURLConnection.java:110)
    at sun.net.www.protocol.file.FileURLConnection.getLastModified(FileURLConnection.java:178)
    at clojure.lang.RT.lastModified(RT.java:390)
    at clojure.lang.RT.load(RT.java:421)
    at clojure.lang.RT.load(RT.java:411)
    at clojure.core$load$fn__5066.invoke(core.clj:5641)
    at clojure.core$load.doInvoke(core.clj:5640)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5446)
    at clojure.core$compile$fn__5071.invoke(core.clj:5652)
    at clojure.core$compile.invoke(core.clj:5651)
    at pod$eval52.invoke(NO_SOURCE_FILE:0)
    at clojure.lang.Compiler.eval(Compiler.java:6703)
    at clojure.lang.Compiler.eval(Compiler.java:6693)
    at clojure.lang.Compiler.eval(Compiler.java:6666)
    at clojure.core$eval.invoke(core.clj:2927)
    at boot.pod$eval_in_STAR_.invoke(pod.clj:203)
    at clojure.lang.Var.invoke(Var.java:379)
    at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:88)
    at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:81)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
    at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
    at boot.pod$eval_in_STAR_.invoke(pod.clj:206)
    at boot.task.built_in$fn__1417$fn__1418$fn__1421$fn__1422.invoke(built_in.clj:433)
    at boot.task.built_in$fn__1443$fn__1444$fn__1447$fn__1448.invoke(built_in.clj:446)
    at boot.task.built_in$fn__1190$fn__1191$fn__1194$fn__1195.invoke(built_in.clj:232)
    at boot.core$run_tasks.invoke(core.clj:663)
    at clojure.lang.Var.invoke(Var.java:379)
    at boot.user$eval297$fn__298.invoke(boot.user4212477544188689077.clj:33)
    at clojure.core$binding_conveyor_fn$fn__4145.invoke(core.clj:1910)
    at clojure.lang.AFn.call(AFn.java:18)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

@schmir
Copy link
Contributor Author

schmir commented Feb 16, 2015

I've reported that one on the clojure's jira: http://dev.clojure.org/jira/browse/CLJ-1659

schmir added a commit that referenced this issue Feb 23, 2015
I could fix the issue by forcing an out of memory error since that also
forces garbage collection. But I'm not ready for that yet...

see #117 and #138
@micha
Copy link
Contributor

micha commented Mar 6, 2015

Idea: (maybe dumb) does windows allow us to move files that are open? Perhaps we could move the files to a garbage place instead of deleting them, maybe all the time or maybe only when there's an error?

@schmir
Copy link
Contributor Author

schmir commented Mar 7, 2015

moving files also won't work. what about using a new empty directory? would that possibly work?

@micha
Copy link
Contributor

micha commented Mar 7, 2015

Yes, I think we can do that. It requires some modifications in boot.core, but I think it will work.

@micha
Copy link
Contributor

micha commented Mar 7, 2015

Hmm, actually it might not work, because we can't remove directories from the class path, so the old files would still be on the class path, which would break things.

@micha
Copy link
Contributor

micha commented Mar 11, 2015

@schmir Can you please try with master and see if the fix for #160 helps at all?

@schmir
Copy link
Contributor Author

schmir commented Mar 11, 2015

I will try that. But I'm sure it won't help.

@schmir
Copy link
Contributor Author

schmir commented Mar 11, 2015

The problem still exists. The issue is that compile relies on garbage
collection to close the filehandles.

Here's a short log with tracebacks:

...
Compiling 55/56 steinmetz.tab-tab...
Compiling 56/56 steinmetz.version...
java.io.IOException: Couldn't delete C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-x24pa9\steinmetz\lib\nshelper.clj
    clojure.java.io/delete-file                           io.clj:  426
                ...
          boot.file/delete-file                         file.clj:   39
           boot.file/empty-dir!                         file.clj:   53
                ...
         clojure.core/apply                         core.clj:  624
     boot.tmpdir.TmpFileSet/commit!                       tmpdir.clj:   66
          boot.core/commit!                         core.clj:  367
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  495
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  501
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  289
        boot.core/run-tasks                         core.clj:  680
                ...
           boot.user/eval387/fn  boot.user106059478854924232.clj:   35
clojure.core/binding-conveyor-fn/fn                         core.clj: 1910
                ...
java.io.IOException: Couldn't delete C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-x24pa9\steinmetz\lib\query.clj
    clojure.java.io/delete-file                           io.clj:  426
                ...
          boot.file/delete-file                         file.clj:   39
           boot.file/empty-dir!                         file.clj:   53
                ...
         clojure.core/apply                         core.clj:  624
     boot.tmpdir.TmpFileSet/commit!                       tmpdir.clj:   66
          boot.core/commit!                         core.clj:  367
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  495
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  501
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  289
        boot.core/run-tasks                         core.clj:  680
                ...
           boot.user/eval387/fn  boot.user106059478854924232.clj:   35
clojure.core/binding-conveyor-fn/fn                         core.clj: 1910
                ...
java.io.IOException: Couldn't delete C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-x24pa9\steinmetz\lib\svnr.clj
    clojure.java.io/delete-file                           io.clj:  426
                ...
          boot.file/delete-file                         file.clj:   39
           boot.file/empty-dir!                         file.clj:   53
                ...
         clojure.core/apply                         core.clj:  624
     boot.tmpdir.TmpFileSet/commit!                       tmpdir.clj:   66
          boot.core/commit!                         core.clj:  367
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  495
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  501
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  289
        boot.core/run-tasks                         core.clj:  680
                ...
           boot.user/eval387/fn  boot.user106059478854924232.clj:   35
clojure.core/binding-conveyor-fn/fn                         core.clj: 1910
                ...
java.io.IOException: Couldn't delete C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-x24pa9\steinmetz\lib\tab_string.clj
    clojure.java.io/delete-file                           io.clj:  426
                ...
          boot.file/delete-file                         file.clj:   39
           boot.file/empty-dir!                         file.clj:   53
                ...
         clojure.core/apply                         core.clj:  624
     boot.tmpdir.TmpFileSet/commit!                       tmpdir.clj:   66
          boot.core/commit!                         core.clj:  367
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  495
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  501
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  289
        boot.core/run-tasks                         core.clj:  680
                ...
           boot.user/eval387/fn  boot.user106059478854924232.clj:   35
clojure.core/binding-conveyor-fn/fn                         core.clj: 1910
                ...
java.io.IOException: Couldn't delete C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-x24pa9\steinmetz\lib\tzr.clj
    clojure.java.io/delete-file                           io.clj:  426
                ...
          boot.file/delete-file                         file.clj:   39
           boot.file/empty-dir!                         file.clj:   53
                ...
         clojure.core/apply                         core.clj:  624
     boot.tmpdir.TmpFileSet/commit!                       tmpdir.clj:   66
          boot.core/commit!                         core.clj:  367
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  495
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  501
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  289
        boot.core/run-tasks                         core.clj:  680
                ...
           boot.user/eval387/fn  boot.user106059478854924232.clj:   35
clojure.core/binding-conveyor-fn/fn                         core.clj: 1910
                ...
java.io.IOException: Couldn't delete C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-x24pa9\steinmetz\lib\tzr_map.clj
    clojure.java.io/delete-file                           io.clj:  426
                ...
          boot.file/delete-file                         file.clj:   39
           boot.file/empty-dir!                         file.clj:   53
                ...
         clojure.core/apply                         core.clj:  624
     boot.tmpdir.TmpFileSet/commit!                       tmpdir.clj:   66
          boot.core/commit!                         core.clj:  367
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  495
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  501
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  289
        boot.core/run-tasks                         core.clj:  680
                ...
           boot.user/eval387/fn  boot.user106059478854924232.clj:   35
clojure.core/binding-conveyor-fn/fn                         core.clj: 1910
                ...
java.io.IOException: Couldn't delete C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-x24pa9\steinmetz\lib\util.clj
    clojure.java.io/delete-file                           io.clj:  426
                ...
          boot.file/delete-file                         file.clj:   39
           boot.file/empty-dir!                         file.clj:   53
                ...
         clojure.core/apply                         core.clj:  624
     boot.tmpdir.TmpFileSet/commit!                       tmpdir.clj:   66
          boot.core/commit!                         core.clj:  367
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  495
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  501
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  289
        boot.core/run-tasks                         core.clj:  680
                ...
           boot.user/eval387/fn  boot.user106059478854924232.clj:   35
clojure.core/binding-conveyor-fn/fn                         core.clj: 1910
                ...
java.io.IOException: Couldn't delete C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-x24pa9\steinmetz\lib
    clojure.java.io/delete-file                           io.clj:  426
                ...
          boot.file/delete-file                         file.clj:   39
           boot.file/empty-dir!                         file.clj:   53
                ...
         clojure.core/apply                         core.clj:  624
     boot.tmpdir.TmpFileSet/commit!                       tmpdir.clj:   66
          boot.core/commit!                         core.clj:  367
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  495
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  501
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  289
        boot.core/run-tasks                         core.clj:  680
                ...
           boot.user/eval387/fn  boot.user106059478854924232.clj:   35
clojure.core/binding-conveyor-fn/fn                         core.clj: 1910
                ...
java.io.IOException: Couldn't delete C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-x24pa9\steinmetz
    clojure.java.io/delete-file                           io.clj:  426
                ...
          boot.file/delete-file                         file.clj:   39
           boot.file/empty-dir!                         file.clj:   53
                ...
         clojure.core/apply                         core.clj:  624
     boot.tmpdir.TmpFileSet/commit!                       tmpdir.clj:   66
          boot.core/commit!                         core.clj:  367
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  495
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  501
     boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  289
        boot.core/run-tasks                         core.clj:  680
                ...
           boot.user/eval387/fn  boot.user106059478854924232.clj:   35
clojure.core/binding-conveyor-fn/fn                         core.clj: 1910
                ...
          clojure.lang.ExceptionInfo: java.nio.file.FileAlreadyExistsException: C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-x24pa9\steinmetz\lib\util.clj -> C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-7kd6cy\0b2fb7c02ae60a30c32155d88703e941
    data: {:file
       "C:\\Users\\ralf\\AppData\\Local\\Temp\\2\\boot.user106059478854924232.clj",
       :line 33}
 java.util.concurrent.ExecutionException: java.nio.file.FileAlreadyExistsException: C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-x24pa9\steinmetz\lib\util.clj -> C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-7kd6cy\0b2fb7c02ae60a30c32155d88703e941
java.nio.file.FileAlreadyExistsException: C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-x24pa9\steinmetz\lib\util.clj -> C:\Users\ralf\.boot\tmp\Users\ralf\home\steinmetz\ls\-7kd6cy\0b2fb7c02ae60a30c32155d88703e941
     file: "C:\\Users\\ralf\\.boot\\tmp\\Users\\ralf\\home\\steinmetz\\ls\\-x24pa9\\steinmetz\\lib\\util.clj"
    otherFile: "C:\\Users\\ralf\\.boot\\tmp\\Users\\ralf\\home\\steinmetz\\ls\\-7kd6cy\\0b2fb7c02ae60a30c32155d88703e941"
sun.nio.fs.WindowsException.translateToIOException            WindowsException.java:   81
  sun.nio.fs.WindowsException.rethrowAsIOException            WindowsException.java:   97
   sun.nio.fs.WindowsFileSystemProvider.createLink   WindowsFileSystemProvider.java:  608
                           ...
                   boot.file/hard-link                         file.clj:  115
               boot.file/copy-with-lastmod                         file.clj:  128
            boot.tmpdir.TmpFileSet/commit!                       tmpdir.clj:   69
                 boot.core/commit!                         core.clj:  367
            boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  495
            boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  501
            boot.task.built-in/fn/fn/fn/fn                     built_in.clj:  289
                   boot.core/run-tasks                         core.clj:  680
                           ...
                  boot.user/eval387/fn  boot.user106059478854924232.clj:   35
           clojure.core/binding-conveyor-fn/fn                         core.clj: 1910
                           ...

@micha micha added the blocked label Apr 5, 2015
@zk
Copy link

zk commented Apr 10, 2015

FWIW I'm getting these on OSX as well: https://gist.github.com/zk/6d5b841174a795dc238c

Boot App Version: 2.0.0-rc9
Boot Lib Version: 2.0.0-rc12
Clojure Version:  1.6.0
java version "1.7.0_71"
OSX 10.10.3

@pietromenna
Copy link

Is there a way I could reproduce the issue on OS X?

@zk
Copy link

zk commented May 6, 2015

@pietromenna Perhaps downgrade your boot lib version to 2.0.0-rc12?

This problem was fixed (for me) by upgrading boot lib to 2.0.0-rc14, apologies for not updating the ticket.

MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue May 8, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue May 8, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue May 12, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue May 14, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jun 1, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jun 3, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jun 11, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jun 17, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jun 22, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jun 23, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jun 23, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jun 29, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jun 30, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jul 5, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jul 6, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jul 7, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jul 8, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jul 10, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
MichaelBlume pushed a commit to MichaelBlume/clojure that referenced this issue Jul 15, 2015
clojure's compile function leaks file descriptors, i.e. it relies on
garbage collection to close the files. I'm trying to use boot [1] on
windows and ran into the problem, that files could not be deleted
intermittently [2]. The problem is that clojure's compile function, or
rather clojure.lang.RT.lastModified relies on garbage collection to
close files.

We now make sure the input stream is closed. The same could possibly be
done for the output stream, but it's not required to fix the issue.

see [3] for more information

[1] http://boot-clj.com/
[2] boot-clj/boot#117
[3] http://dev.clojure.org/jira/browse/CLJ-1659
@schmir
Copy link
Contributor Author

schmir commented Aug 10, 2015

this has been fixed in clojure's git repository and will be fixed in clojure 1.8. see http://dev.clojure.org/jira/browse/CLJ-1659

@martinklepsch
Copy link
Member

Has anyone tested if this is gone with one of 1.8's RCs?

@schmir
Copy link
Contributor Author

schmir commented Jan 15, 2016

I've tested that with a version from git when I wrote that patch.

@Eeveline
Copy link

I'm still having this issue on Windows 10 with clojure 1.8 and boot 2.6.0-SNAPSHOT. Has anyone found a solution to this problem?

@schmir
Copy link
Contributor Author

schmir commented Mar 16, 2016

Can you try http://file-leak-detector.kohsuke.org/ in order to find who's holding on to open files? or provide a minimal reproducible test case?

@Eeveline
Copy link

I tested with other project, which all worked. The project I'm working on is already very big and completely developed on OSX - so I'm using a mac now. Thanks for the help :)

@burn2delete
Copy link
Contributor

Closing as this issue seems to be resolved on recent platforms and boot builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants