[
https://issues.apache.org/jira/browse/GUACAMOLE-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17353575#comment-17353575
]
Mike Jumper commented on GUACAMOLE-1354:
----------------------------------------
{quote}
When the guacd doesn't receive GUAC_RDP_PRINT_JOB_ACK_RECEIVED from the
guacamole client due to unknown reason, guac_rdp_print_job_wait_for_ack()
function suspends execution of the guac_rdp_print_job_output_thread() thread
for ever.
{quote}
It is only safe for the RDP support to send the contents of the print stream
once the client has sent an "ack" confirming that it is ready to receive the
stream. Until that happens, the output print filter will block. Doing otherwise
would require potentially buffering the entire print job.
>From your video, the browser is just waiting for the stream of printed data to
>start. The connection process isn't blocked or hung, nor is guacd itself
>blocked or hung - only printing within that specific connection is blocked.
If the issue here is that the required "ack" is (somehow) not sent, that would
produce the behavior you're seeing. The overall chain that does this is:
# Client side of webapp issues a request for the server to intercept the
received stream so that it may be downloaded via HTTP
([ManagedClient.js:L604|https://github.com/apache/guacamole-client/blob/3ec0bdbc576352483e4d82d3e03a722224dc7f8b/guacamole/src/main/webapp/app/client/types/ManagedClient.js#L604])
# Server side of webapp receives request to intercept stream and begins doing
so
([StreamResource.java:97|https://github.com/apache/guacamole-client/blob/master/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/StreamResource.java#L97])
# Successful "ack" is sent
([OutputStreamInterceptingFilter.java:226|https://github.com/apache/guacamole-client/blob/3ec0bdbc576352483e4d82d3e03a722224dc7f8b/guacamole/src/main/java/org/apache/guacamole/tunnel/OutputStreamInterceptingFilter.java#L226])
Except for something between the browser and the server blocking the relevant
HTTP request, I don't immediately see why that wouldn't occur.
{quote}
Also, as you see the following image, you can see that the relevant RDP
connection isn't killed still after killing the entire connection by Ctrl+C.
{quote}
When running guacd in the foreground, Ctrl+C will break out of the absolute
parent guacd process, not the child connection processes. This has no bearing
on the behavior you're seeing.
> Printing problem that freezes the guacd
> ---------------------------------------
>
> Key: GUACAMOLE-1354
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-1354
> Project: Guacamole
> Issue Type: Bug
> Components: guacamole-client, guacamole-server
> Affects Versions: 1.3.0
> Environment: Windows Server 2019 Datacenter, Ubuntu 18.04, Chrome:
> 90.0.4430.212, Windows 10 Pro 20H2
> Reporter: Jimmy
> Priority: Major
> Fix For: 1.4.0
>
> Attachments: guacd-printing.log, image-2021-05-25-11-05-36-823.png,
> image-2021-05-28-16-15-17-531.png
>
>
> I found the printing problem that freezes the guacd when printing quickly and
> successively.
>
> *[Test environment]*
> RDP Server: Windows Server 2019 Datacenter
> Server: Ubuntu 18.04
> Guacamole Client:
> [#6644955f|https://github.com/apache/guacamole-client/commit/6644955fff07db7844f0b495b4abfabf2b700e21]
> on master branch
> Guacamole Server:
> [#44145f68|https://github.com/apache/guacamole-server/commit/44145f681aa3cf08e9cf01e99a68096c77bcab39]
> on master branch
> Chrome: 90.0.4430.212
> User: Windows 10 Pro, 20H2
> *[Test case]*
> # Connect to Windows Server 2019 through Apache guacamole.
> # Open *Notepad*.
> # Type some text.
> # Press Ctrl+P and select *Guacamole Printer.*
> # Click *"Print"* button.
> !image-2021-05-25-11-05-36-823.png!
> When repeating step 4 and 5 quickly and successively, we can see this issue
> soon.
> I attach the guacamole server log when encountering the freeze issue.
> *[Rough Analysis]*
> When the guacd doesn't receive *GUAC_RDP_PRINT_JOB_ACK_RECEIVED* from the
> guacamole client due to unknown reason, *guac_rdp_print_job_wait_for_ack()*
> function suspends execution of the *guac_rdp_print_job_output_thread()*
> thread for ever.
>
> Thanks.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)