-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Comments
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) |
I've reported that one on the clojure's jira: http://dev.clojure.org/jira/browse/CLJ-1659 |
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? |
moving files also won't work. what about using a new empty directory? would that possibly work? |
Yes, I think we can do that. It requires some modifications in |
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. |
I will try that. But I'm sure it won't help. |
The problem still exists. The issue is that compile relies on garbage 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 ... |
FWIW I'm getting these on OSX as well: https://gist.github.com/zk/6d5b841174a795dc238c
|
Is there a way I could reproduce the issue on OS X? |
@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. |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 |
Has anyone tested if this is gone with one of 1.8's RCs? |
I've tested that with a version from git when I wrote that patch. |
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? |
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? |
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 :) |
Closing as this issue seems to be resolved on recent platforms and boot builds. |
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
(Windows can't delete files that are in use)
The text was updated successfully, but these errors were encountered: