Bug 8285 - thinlinc-login crashes if server closes connection prematurely
Summary: thinlinc-login crashes if server closes connection prematurely
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Server (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-08 10:19 CET by Pierre Ossman
Modified: 2024-01-09 13:10 CET (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2024-01-08 10:19:07 CET
If vsmserver decides to abort the XML-RPC connection, for whatever reason, then thinlinc-login is currently very unable to handle this scenario:

> 2024-01-08T10:06:47: ssh[E]: Traceback (most recent call last):
> 2024-01-08T10:06:47: ssh[E]:   File "/usr/bin/thinlinc-login", line 223, in <module>
> 2024-01-08T10:06:47: ssh[E]:     IIIi1111iiIi1 ( )
> 2024-01-08T10:06:47: ssh[E]:   File "/usr/bin/thinlinc-login", line 200, in IIIi1111iiIi1
> 2024-01-08T10:06:47: ssh[E]:     IIi1I1I1i . sendall ( Iii1I1I1 )
> 2024-01-08T10:06:47: ssh[E]: BrokenPipeError: [Errno 32] Broken pipe
> 2024-01-08T10:06:47: ssh[E]: sys:1: ResourceWarning: unclosed <socket.socket fd=4, family=1, type=1, proto=0, laddr=b'\x000d642', raddr=/var/run/thinlinc/master/1000>

In this case, I triggered the issue by sending an excessive amount of data.

Crashing also means we don't report anything sane back to the client, which causes it to misbehave as well (bug 8284). We should probably report an HTTP error code in these cases.
Comment 1 Pierre Ossman cendio 2024-01-08 10:20:28 CET
Note that this also triggered the ResourceWarning from bug 8283.

Note You need to log in before you can comment on or make changes to this bug.