Bug 7592 - Crash in a delayed call kills vsmserver/vsmagent
Summary: Crash in a delayed call kills vsmserver/vsmagent
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: 2020-11-19 09:34 CET by Pierre Ossman
Modified: 2022-07-07 09:36 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2020-11-19 09:34:04 CET
The crash in bug 6178 is fatal, which is probably not a good idea:

> Traceback (most recent call last):
>   File "/opt/thinlinc/sbin/vsmagent", line 23, in <module>
>     VSMAgent ( sys . argv )
>   File "/opt/thinlinc/modules/thinlinc/vsm/vsmagent.py", line 169, in __init__
>     self . loop ( )
>   File "/opt/thinlinc/modules/thinlinc/vsm/async.py", line 423, in loop
>     I11I11i1I = self . run_delayed_calls ( )
>   File "/opt/thinlinc/modules/thinlinc/vsm/async.py", line 381, in run_delayed_calls
>     oOO0OOOo . func ( * oOO0OOOo . args , ** oOO0OOOo . kw )
>   File "/opt/thinlinc/modules/thinlinc/vsm/handler_reqsession.py", line 397, in wait_on_vnc_port
>     self . wait_on_vnc_port , O0ooooOOoo0O )
>   File "/opt/thinlinc/modules/thinlinc/vsm/portopencheck.py", line 40, in __init__
>     self . connect ( addr )
>   File "/usr/lib64/python2.7/asyncore.py", line 354, in connect
>     self.handle_connect_event()
>   File "/usr/lib64/python2.7/asyncore.py", line 455, in handle_connect_event
>     self.handle_connect()
>   File "/opt/thinlinc/modules/thinlinc/vsm/portopencheck.py", line 55, in handle_connect
>     self . callback ( Ii1iI )
>   File "/opt/thinlinc/modules/thinlinc/vsm/handler_reqsession.py", line 386, in wait_on_vnc_port
>     self . xvnc_ready ( )
>   File "/opt/thinlinc/modules/thinlinc/vsm/handler_reqsession.py", line 420, in xvnc_ready
>     self . parent . update_sshd_permitopen ( )
>   File "/opt/thinlinc/modules/thinlinc/vsm/vsmagent.py", line 407, in update_sshd_permitopen
>     OOoo = locale_encode ( pwd . getpwuid ( iIiIiIiI ) . pw_name )
>   File "/opt/thinlinc/modules/thinlinc/locale.py", line 19, in locale_encode
>     return s . encode ( i1ii1 )
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
> 

We should probably try to limp along in a case like this, just like we do when a handler crashes.
Comment 1 Pierre Ossman cendio 2021-04-20 14:30:11 CEST
We want to log the crash though, which is currently problematic as this code is too low level to have access to the logging. Some redesign is needed first.
Comment 2 Linn cendio 2022-05-19 09:05:31 CEST
When doing bug 7847, the function update_sshd_permitopen was restructured so the call to it is inside a try/catch. This likely solves this bug as well since that should remove the fatalness of the crashes, but testing is needed.

About the logging, we do log a message and the traceback if we catch such a crash, so I don't believe there are any issues on that part.

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