Problem with parallel execution of plantuml in Windows

0 votes
asked Jan 6 in Bug by jens.fudickar (360 points)

Hi All,
i have a multithreaded Application which can call multiple plantuml conversations in parallel threads.

One example call is this:


java -DPLANTUML_LIMIT_SIZE=16384 -jar "d:\VDFData\Json2Puml\plantuml\plantuml-1.2022.14.jar" "d:\VDFData\Json2Puml\output\1864\data\100000145100\summary.full.puml" -svg

This sometimes lead to the following errors in the log file (the errors are repeat more times, but I had to remove the repeats to fit the 8000 char limit).
Any idea how to solve/prevent that.

java.io.FileNotFoundException: C:\Windows\TEMP\_graphviz\dot.exe (The process cannot access the file because it is being used by another process)
  at java.base/java.io.FileOutputStream.open0(Native Method)
  at java.base/java.io.FileOutputStream.open(FileOutputStream.java:292)
  at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
  at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:185)
  at net.sourceforge.plantuml.windowsdot.WindowsDotArchive.extract(WindowsDotArchive.java:95)
  at net.sourceforge.plantuml.windowsdot.WindowsDotArchive.getWindowsExeLite(WindowsDotArchive.java:122)
  at net.sourceforge.plantuml.cucadiagram.dot.GraphvizWindowsLite.specificDotExe(GraphvizWindowsLite.java:56)
  at net.sourceforge.plantuml.cucadiagram.dot.AbstractGraphviz.searchDotExe(AbstractGraphviz.java:90)
  at net.sourceforge.plantuml.cucadiagram.dot.AbstractGraphviz.<init>(AbstractGraphviz.java:75)
  at net.sourceforge.plantuml.cucadiagram.dot.GraphvizWindowsLite.<init>(GraphvizWindowsLite.java:67)
  at net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils.create(GraphvizUtils.java:100)
  at net.sourceforge.plantuml.svek.DotStringFactory.getGraphvizVersionInternal(DotStringFactory.java:291)
  at net.sourceforge.plantuml.svek.DotStringFactory.getGraphvizVersion(DotStringFactory.java:285)
  at net.sourceforge.plantuml.svek.GeneralImageBuilder.printEntityInternal(GeneralImageBuilder.java:551)
  at net.sourceforge.plantuml.svek.GeneralImageBuilder.printEntity(GeneralImageBuilder.java:533)
  at net.sourceforge.plantuml.svek.GeneralImageBuilder.printEntities(GeneralImageBuilder.java:525)
  at net.sourceforge.plantuml.svek.GeneralImageBuilder.buildImage(GeneralImageBuilder.java:399)
  at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFileInternal(CucaDiagramFileMakerSvek.java:100)
  at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFile(CucaDiagramFileMakerSvek.java:69)
  at net.sourceforge.plantuml.baraye.CucaDiagram.exportDiagramInternal(CucaDiagram.java:646)
  at net.sourceforge.plantuml.classdiagram.ClassDiagram.exportDiagramInternal(ClassDiagram.java:188)
  at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:135)
  at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:179)
  at net.sourceforge.plantuml.PSystemUtils.exportDiagramsDefault(PSystemUtils.java:196)
  at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:87)
  at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:186)
  at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:518)
  at net.sourceforge.plantuml.Run.processArgs(Run.java:401)
  at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:368)
  at net.sourceforge.plantuml.Run.main(Run.java:203)
java.io.FileNotFoundException: C:\Windows\TEMP\_graphviz\cdt.dll (The process cannot access the file because it is being used by another process)
  at java.base/java.io.FileOutputStream.open0(Native Method)
  at java.base/java.io.FileOutputStream.open(FileOutputStream.java:292)
  at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
  at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:185)
  at net.sourceforge.plantuml.windowsdot.WindowsDotArchive.extract(WindowsDotArchive.java:95)
  at net.sourceforge.plantuml.windowsdot.WindowsDotArchive.getWindowsExeLite(WindowsDotArchive.java:122)
  at net.sourceforge.plantuml.cucadiagram.dot.GraphvizWindowsLite.specificDotExe(GraphvizWindowsLite.java:56)
  at net.sourceforge.plantuml.cucadiagram.dot.AbstractGraphviz.searchDotExe(AbstractGraphviz.java:90)
  at net.sourceforge.plantuml.cucadiagram.dot.AbstractGraphviz.<init>(AbstractGraphviz.java:75)
  at net.sourceforge.plantuml.cucadiagram.dot.GraphvizWindowsLite.<init>(GraphvizWindowsLite.java:67)
  at net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils.create(GraphvizUtils.java:100)
  at net.sourceforge.plantuml.svek.DotStringFactory.getGraphvizVersionInternal(DotStringFactory.java:291)
  at net.sourceforge.plantuml.svek.DotStringFactory.getGraphvizVersion(DotStringFactory.java:285)
  at net.sourceforge.plantuml.svek.GeneralImageBuilder.printEntityInternal(GeneralImageBuilder.java:551)
  at net.sourceforge.plantuml.svek.GeneralImageBuilder.printEntity(GeneralImageBuilder.java:533)
  at net.sourceforge.plantuml.svek.GeneralImageBuilder.printEntities(GeneralImageBuilder.java:525)
  at net.sourceforge.plantuml.svek.GeneralImageBuilder.buildImage(GeneralImageBuilder.java:399)
  at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFileInternal(CucaDiagramFileMakerSvek.java:100)
  at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFile(CucaDiagramFileMakerSvek.java:69)
  at net.sourceforge.plantuml.baraye.CucaDiagram.exportDiagramInternal(CucaDiagram.java:646)
  at net.sourceforge.plantuml.classdiagram.ClassDiagram.exportDiagramInternal(ClassDiagram.java:188)
  at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:135)
  at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:179)
  at net.sourceforge.plantuml.PSystemUtils.exportDiagramsDefault(PSystemUtils.java:196)
  at net.sourceforge.plantuml.PSystemUtils.exportDiagrams(PSystemUtils.java:87)
  at net.sourceforge.plantuml.SourceFileReaderAbstract.getGeneratedImages(SourceFileReaderAbstract.java:186)
  at net.sourceforge.plantuml.Run.manageFileInternal(Run.java:518)
  at net.sourceforge.plantuml.Run.processArgs(Run.java:401)
  at net.sourceforge.plantuml.Run.manageAllFiles(Run.java:368)
  at net.sourceforge.plantuml.Run.main(Run.java:203)

Regards

Jens



 

3 Answers

+1 vote
answered Jan 10 by plantuml (293,520 points)
selected Mar 12 by jens.fudickar
 
Best answer
This should be fixed in version V1.2023.0

Tell us if it's not working for you!
commented Jan 10 by jens.fudickar (360 points)
Thanks, I will test it in when the new version is available.
commented Mar 12 by jens.fudickar (360 points)
Forget to comment: I'm no longer able to reproduce this.
Thanks a lot for the fast fix
0 votes
answered Jan 6 by Todd Musheno (2,680 points)
Sounds like a window$ issue, parallel processing in window$ is buggy in general.

I would first check the graphviz group, and see if this is a known bug from there end.

You could also try window$ support, but I would not hold my breath there.
commented Jan 6 by jens.fudickar (360 points)
commented Jan 6 by jens.fudickar (360 points)
The answer was that they see it as a bug in plantuml which is trying to modify a file which is already in use by a different process.

The main question is: if there are temporary files generated in the folder "C:\Windows\TEMP_graphviz\", do this files always have the same name, or are they more unique per process or so?
0 votes
answered Jan 7 by plantuml (293,520 points)
Thanks for the feedback: I think we understand the issue.

We're going to fix it.
...