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

Multithreading poppler utilities on windows yields errors #235

Closed
burgealex opened this issue Dec 21, 2018 · 4 comments
Closed

Multithreading poppler utilities on windows yields errors #235

burgealex opened this issue Dec 21, 2018 · 4 comments
Assignees
Milestone

Comments

@burgealex
Copy link

The package lwarp is using poppler utilities like pdfcrop etc in a multithreaded fashion. This generates FATAL errors on Windows 10 when run as administrator. When hacking out the multithreading it works, but it is undesirable due to the substantially increased build times.

Here are relevant logs from a single run of lwarpmk limages on a document with several images:
Logs.zip

Is this something that can be corrected? It seems to be file contention. Normally I'd just switch to user mode instead of admin, but in my case it is not something I have control over.

Note that this is using the [Core]AutoAdmin functionality implemented recently as part of another ticket I requested. I believe think this is the last hurdle I have to overcome...

Thanks for taking a look!

@edocevoli
Copy link
Member

Can you provide a minimal working example?

@edocevoli edocevoli added this to the 2.9.6930 milestone Dec 21, 2018
@burgealex
Copy link
Author

Here is my attempt to come up with a minimal example. Within this example are the following files:

  • document_html.pdf one of the artifacts of the lwarp tutorial. I added a few additional math expressions so that more threads will be needed
  • lwarp_one_limage.cmd a simplified version of what lwarp is doing with the poppler utilities
  • does_work.bat what lwarp normally does only sequential instead of multithreaded. should work in user or admin mode.
  • does_not_work.bat what lwarp normally does. usually works in user mode but sometimes gets hung up. rarely works in admin mode and often throws many errors. This is what I'd like to fix.
  • source/ contains a the files used to generate the pdf and various hashes used in my example. This is not needed to reproduce issue.
    mwe_issue_235.zip

Sorry this isn't even more minimal. It's not a particularly easy issue to narrow down on due to the nature of it. Going through this process of narrowing down on the part of the build that is failing has shed more light on the possibility of file contention between pdfseparate and pdfcrop while running in admin mode.

image

@edocevoli
Copy link
Member

Thank you. Part of the issue might be related to #222.

@edocevoli
Copy link
Member

I think this has been fixed with one of the latest updates.

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

2 participants