-
Notifications
You must be signed in to change notification settings - Fork 181
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
Timeout after 3 seconds #749
Comments
Thank you for reporting the issue, we'll look into it, potentially next week. We do not officially support Fedora Silverblue, but the behavior may be similar to Fedora 39. For reference @apyrgio I belive this issue happens on this line: This means that somehow the conversion process is not terminating, it seems. |
Thanks for the report @larus-argentatus-sec. I guess we need a Fedora Silverblue machine to test it out, but I haven't got to it yet. In the meantime, can you give us the output of the following commands?
Also, if you haven't done so already, can you please run Dangerzone from CLI (see |
Yes!
|
(@zyberzebra CC'ing you here, so that we can use a single issue for investigating this error) Thank you both for the CLI output. We now know that this error happens here:
This was introduced as a sanity check, in case the conversion had finished successfully, but a Podman/Docker process was still lingering. My guess is that this happens because we don't close the container's dangerzone/dangerzone/isolation_provider/base.py Lines 141 to 142 in 29d6854
Still, we haven't encountered yet a conversion run that has generated that much output to So, let's dig a bit deeper. @larus-argentatus-sec: Can you verify in your system that you can convert a simple .doc? Also, questions to all:
|
Thankfully, this is not the case. When a user runs Dangerzone, we pipe dangerzone/dangerzone/isolation_provider/base.py Lines 54 to 57 in 29d6854
The only operation that happens right before the conversion ends is printing the LibreOffice output to dangerzone/dangerzone/conversion/doc_to_pixels.py Lines 287 to 288 in 29d6854
Again though, |
@larus-argentatus-sec I've installed Dangerzone using |
|
Ok, so fairly large files. Are they in the order of 100s / 1000s of pages? If not, do they contain any multimedia? |
<400 but a lot of pictures |
Thanks @zyberzebra. I just sanitized a 5000 pages document where each page has a picture. Still not being able to reproduce it. Will look into it more. In the meantime, any extra hint helps. |
The following is in response to #754 (comment):
@banerian Thanks a lot for this extra info. This shows that whatever is blocking the container from quitting, does not stay on indefinitely. However, the proper fix here is to find out what's the blocker in the first place. Waiting for an arbitrary number of seconds during each conversion will not cut it, I'm afraid. I have some questions, if you have some time:
(the above applies to anyone affected by this issue, thanks in advance) |
the OS is linux, debian 12, kernel in a VM6.1.0-18-amd64 after resetting timeout to 3, and with the diff above, I got:
I also tried, using a MS docx file, and got similar:
|
Thank you very much for the updated info. From the logs you have provided above, it seems that the container does not log anything unexpected to
This line is the last one before the conversion exits (along with the finalizer of I'll try to sum up here all the data points from this thread:
|
Previously, we always assumed that the spawned process would quit within 3 seconds. This was an arbitrary call, and did not work in practice. We can improve our standing here by doing the following: 1. Make `Popen.wait()` calls take a generous amount of time (since they are usually on the sad path), and handle any timeout errors that they throw. This way, a slow conversion process cleanup does not take too much of our users time, nor is it reported as an error. 2. Always make sure that once the conversion of doc to pixels is over, the corresponding process will finish within a reasonable amount of time as well. Fixes #749
Previously, we always assumed that the spawned process would quit within 3 seconds. This was an arbitrary call, and did not work in practice. We can improve our standing here by doing the following: 1. Make `Popen.wait()` calls take a generous amount of time (since they are usually on the sad path), and handle any timeout errors that they throw. This way, a slow conversion process cleanup does not take too much of our users time, nor is it reported as an error. 2. Always make sure that once the conversion of doc to pixels is over, the corresponding process will finish within a reasonable amount of time as well. Fixes #749
Update on this situation. We have merged a fix for the bulk of the cases, which will be available in 0.6.1. We've also uncovered a minor bug that affects documents with more than 10,000 pages, or whose dimensions exceed 10,000 pixels on either side (#791). If you have such a document, from now on it will fail immediately with a proper error message, instead of getting stuck for 15 seconds. (That is, we assume that we should fail these types of documents. If you have a valid use case for them, do let us know) We will send soon a PR that fixes the above, and hopefully after that we will be able to release 0.6.1. |
I recently installed Dangerzone (
Version 0.6.0
) from the Dangerzone Repo in Fedora 39 (Silverblue).When converting a document (tested with
.pdf
and.png
) the document fails to convert. Always at 49% (when it starts converting the document to pixels).The error message is
[ERROR] [doc 6XF2yi] 0% Command '['/usr/bin/podman', 'run', '--network', 'none', '-u', 'dangerzone', '--log-driver', 'none', '--security-opt', 'no-new-privileges', '--userns', 'keep-id', '--cap-drop', 'all', '--rm', '-i', 'dangerzone.rocks/dangerzone', '/usr/bin/python3', '-m', 'dangerzone.conversion.doc_to_pixels']' timed out after 3 seconds
Fedora Silverblue comes with Podman pre-installed. I am not sure if this is useful information.
Thank you and let me know if you need anything else.
The text was updated successfully, but these errors were encountered: