Open antcoder opened 2 years ago
Is it always the same image that's failing? Is it used in multiple places?
Thanks for the reply! Not always the same image failing.
The same image appears in the article content and the article list at the same time.
error capture
(Zola 0.14.1 on Windows 10 20H2)
I have yet to have build
succeed on Windows with more than one CPU core enabled due to this issue; disabling all but one core (as well as SMT) in the BIOS makes it work every time. Even two cores is too much.
serve
works with all cores enabled, but only on the second try. (The first try always fails and if rerun quickly enough the second try always succeeds.)
I am not using image shortcodes. When the error messages show filenames, it's always image copies from content to public that fail, but (as in antcoder's screenshot above) they don't always show filenames. On Zola 0.11.0 (as far back as I can go without errors due to missing features), it always throws the error that doesn't include the filenames.
According to Process Monitor, Zola tries to open the destination file multiple times concurrently, but with ShareMode none, resulting in a sharing violation:
That seems a Windows only issue? Can anyone on Windows try to figure it out?
I'll look at it more when I have the time, but I'm not all that familiar with Rust and it's slow going.
As far as I can tell, the problem is that when there are transparent sections, the pages in those sections get rendered twice (once for the transparent section and once for the opaque ancestor). When I turn all my transparent sections opaque, render_page()
gets called the correct number of times and copies the correct number of assets (and the build succeeds). With transparent sections, both those numbers don't quite double, presumably because it crashes first. render_section()
always gets called the correct number of times regardless and correctly doesn't copy any assets for my site.
Ah very interesting.
the pages in those sections get rendered twice
that does sounds like a bug
Looks like this happens on Windows CI as well now: https://dev.azure.com/getzola/zola/_build/results?buildId=1722&view=logs&jobId=d2980ad8-b87d-5294-4faf-0af1145b0486&j=d2980ad8-b87d-5294-4faf-0af1145b0486&t=51335d98-55c5-5f23-ce15-2dc0b362ed54
Bug Report
Environment
windows 10 Zola version:0.14.0
Expected Behavior
filename.md add many images_resize short_code:
filename.md
Current Behavior
Failed to build the site Error: Was not able to copy file D:/web/www/temp/site_framework/content/entertainment\filename\2.png to D:\web\www\temp\site_framework\public\entertainment\filename\2.png
Reason:Another program is using this file and the process cannot access it(os error 32)
Step to reproduce
Build site succeed by chance, I guess image is not normal close or async. But zola serve is ok.