Re: RFR: 8233674: JarURLConnection.getJarFile throws Exception if some process is holding the file
On Fri, 10 Sep 2021 09:23:52 GMT, Masanori Yano wrote: > Could you please review the 8233674 bug fixes? > This problem is caused by the antivirus software opening the file for a short > time, so CreateFile() should be retried. This will need discussion as to whether the JDK should put in retry loops to work around interference from virus checkers. I wonder if it possible to get any input from the Microsoft engineers on whether native applications are expected to do this or whether the issue here is actually a configuration issue or problem with a specific virus checker. If we are adding a workaround to the JDK then it will require much more broader changes that does proposed so I think more analysis and discussion will be required before deciding whether it is right to do anywhere here or not. - Changes requested by alanb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5460
Re: RFR: 8233674: JarURLConnection.getJarFile throws Exception if some process is holding the file
On Fri, 10 Sep 2021 09:23:52 GMT, Masanori Yano wrote: > Could you please review the 8233674 bug fixes? > This problem is caused by the antivirus software opening the file for a short > time, so CreateFile() should be retried. Thank you for your comment. According to Microsoft KB316609, CreateFile() should be tried again a short time later. I think JarURLConnection should also be retried when antivirus software holds some files. https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/316609 - PR: https://git.openjdk.java.net/jdk/pull/5460
Re: RFR: 8233674: JarURLConnection.getJarFile throws Exception if some process is holding the file
On Fri, 17 Sep 2021 08:46:52 GMT, Masanori Yano wrote: > Thank you for your comment. According to Microsoft KB316609, CreateFile() > should be tried again a short time later. I think JarURLConnection should > also be retried when antivirus software holds some files. > https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/316609 This seems to be just general advice about dealing with sharing violations. I think it would be useful to hear from the Microsoft folks on whether every application on Windows is expected to retry to workaround interference from virus checkers or whether this is something that should be fixed by the virus checker vendors. If the JDK ends up putting in a workaround then it will require more broader changes, things will work inconsistently if limited to opening zip files and java.io. - PR: https://git.openjdk.java.net/jdk/pull/5460
Re: RFR: 8233674: JarURLConnection.getJarFile throws Exception if some process is holding the file
On Fri, 10 Sep 2021 09:23:52 GMT, Masanori Yano wrote: > Could you please review the 8233674 bug fixes? > This problem is caused by the antivirus software opening the file for a short > time, so CreateFile() should be retried. It’s a good idea to ask the Microsoft folks about that, but I don't know the way to ask. Could you tell me how to do it? As you say, CreateFile function is used in other parts of the JDK, but it have a significant impact to fix all of that. Therefore, I fixed the problem about opening zip files and jar files which is reported in the JBS. - PR: https://git.openjdk.java.net/jdk/pull/5460
Re: RFR: 8233674: JarURLConnection.getJarFile throws Exception if some process is holding the file
On Mon, 27 Sep 2021 07:40:26 GMT, Masanori Yano wrote: > It’s a good idea to ask the Microsoft folks about that, but I don't know the > way to ask. Could you tell me how to do it? > > As you say, CreateFile function is used in other parts of the JDK, but it > have a significant impact to fix all of that. Therefore, I fixed the problem > about opening zip files and jar files which is reported in the JBS. I think we need to find out if the issue you are working around is a bug/issue with the virus checker or that Microsoft recommends that all applications should require to work these issues. As regards the patch then it is incomplete. If we are forced to put a workaround into the JDK code then I think it will have to do everywhere, not just for zip/JAR files. - PR: https://git.openjdk.java.net/jdk/pull/5460
Re: RFR: 8233674: JarURLConnection.getJarFile throws Exception if some process is holding the file
On Fri, 10 Sep 2021 09:23:52 GMT, Masanori Yano wrote: > Could you please review the 8233674 bug fixes? > This problem is caused by the antivirus software opening the file for a short > time, so CreateFile() should be retried. I inquired of the Microsoft Technical Support about this problem. They said that using a simple retry mechanism is the effective workaround for this problem as in the article. But, they are not sure which is wrong the application or the virus checker because it depends on the situation. Which method do you think is better, to fix the JDK or to change the configuration of the virus checker? - PR: https://git.openjdk.java.net/jdk/pull/5460
Re: RFR: 8233674: JarURLConnection.getJarFile throws Exception if some process is holding the file
On Mon, 27 Sep 2021 08:04:23 GMT, Alan Bateman wrote: >> It’s a good idea to ask the Microsoft folks about that, but I don't know the >> way to ask. Could you tell me how to do it? >> >> As you say, CreateFile function is used in other parts of the JDK, but it >> have a significant impact to fix all of that. Therefore, I fixed the problem >> about opening zip files and jar files which is reported in the JBS. > >> It’s a good idea to ask the Microsoft folks about that, but I don't know the >> way to ask. Could you tell me how to do it? >> >> As you say, CreateFile function is used in other parts of the JDK, but it >> have a significant impact to fix all of that. Therefore, I fixed the problem >> about opening zip files and jar files which is reported in the JBS. > > I think we need to find out if the issue you are working around is a > bug/issue with the virus checker or that Microsoft recommends that all > applications should put a retry to work around these issues. As regards the > patch then it is incomplete. If we are forced to put a workaround into the > JDK code then I think it will have to do everywhere, not just for zip/JAR > files. @AlanBateman Could you reply to the above comment? - PR: https://git.openjdk.java.net/jdk/pull/5460
Re: RFR: 8233674: JarURLConnection.getJarFile throws Exception if some process is holding the file
On Mon, 27 Sep 2021 08:04:23 GMT, Alan Bateman wrote: >> It’s a good idea to ask the Microsoft folks about that, but I don't know the >> way to ask. Could you tell me how to do it? >> >> As you say, CreateFile function is used in other parts of the JDK, but it >> have a significant impact to fix all of that. Therefore, I fixed the problem >> about opening zip files and jar files which is reported in the JBS. > >> It’s a good idea to ask the Microsoft folks about that, but I don't know the >> way to ask. Could you tell me how to do it? >> >> As you say, CreateFile function is used in other parts of the JDK, but it >> have a significant impact to fix all of that. Therefore, I fixed the problem >> about opening zip files and jar files which is reported in the JBS. > > I think we need to find out if the issue you are working around is a > bug/issue with the virus checker or that Microsoft recommends that all > applications should put a retry to work around these issues. As regards the > patch then it is incomplete. If we are forced to put a workaround into the > JDK code then I think it will have to do everywhere, not just for zip/JAR > files. > @AlanBateman Could you reply to the above comment? I view this issue as something for the anti-virus vendor to fix. It would be very disappointing to force the JDK to put in a workaround for this. A workaround would be very intrusive and require changes in many areas of the JDK. - PR: https://git.openjdk.java.net/jdk/pull/5460
Re: RFR: 8233674: JarURLConnection.getJarFile throws Exception if some process is holding the file
On Fri, 10 Sep 2021 09:23:52 GMT, Masanori Yano wrote: > Could you please review the 8233674 bug fixes? > This problem is caused by the antivirus software opening the file for a short > time, so CreateFile() should be retried. Thank you for your reply. I understand we have no need to fix the JDK. I will close this pull request. - PR: https://git.openjdk.java.net/jdk/pull/5460