-
Notifications
You must be signed in to change notification settings - Fork 182
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
(server) Qubes: Conversion of medium-sized documents fills up /tmp #574
Comments
This was referenced Oct 4, 2023
2 tasks
deeplow
added a commit
that referenced
this issue
Nov 2, 2023
PDFtoPPM was producing RGB files faster than they were getting consumed. Since the RGB files were only getting removed after they were sent, this was leading to /tmp in the server getting clogged. This solution consists in processing and sending images in chunks of 50 pages. This solution is slightly inneficient since it can't process and send data simultaneously. That will be solved in a future commit. Fixes #574
deeplow
added a commit
that referenced
this issue
Nov 2, 2023
PDFtoPPM was producing RGB files faster than they were getting consumed. Since the RGB files were only getting removed after they were sent, this was leading to /tmp in the server getting clogged. This solution consists in processing and sending images in chunks of 50 pages. This solution is slightly inefficient since it can't process and send data simultaneously. That will be solved in a future commit. Fixes #574
This has been resolved by fixing #443. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
The Qubes converter currently handles
/tmp
in an inefficient way, leading to ENOSPC situations, when a document has more than 160 US letter pages.Background
We have a known problem regarding the way we store pixel data in
tmpfs
(see #526), which becomes even worse in Qubes. The reason is that Qubes mountstmpfs
under/tmp
this way:The size of the
/tmp
dir in app and disposable qubes is therefore max 1GiB. At the same time,pdftoppm
converts the pages at 150 DPI, which means each RGB page requires ~6.2MiB. Therefore, we can store at most ~165 pages in/tmp
.This limitation manifests both at the server-side, and at the client side. In the server-side,
pdftoppm
writes PPM files under/tmp/page*
. We have a callback that writes the final RGB buffer to stdout and then removes the original PPM file, but these two processes are not synchronized, especially if the client-side does not catch up:dangerzone/dangerzone/conversion/doc_to_pixels.py
Lines 336 to 342 in c4fdebc
In the client-side, we immediately write the received pixel data under
/tmp/dangerzone
, since this is where the pixels-to-pdf convert expects to find them:dangerzone/dangerzone/isolation_provider/qubes.py
Lines 132 to 144 in c4fdebc
Solution
We don't have a solid solution yet. If we fix the client-side issue, by converting the RGB files to PNG immediately, then the disposable qube can still run out of space, if the client-side does not catch up (e.g., due to the conversion). We need a solution that fixes both sides.
The text was updated successfully, but these errors were encountered: