Bug 7644 - Traceback in vsmserver if failing to get client ip
Summary: Traceback in vsmserver if failing to get client ip
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: 2021-02-12 14:01 CET by Pierre Ossman
Modified: 2021-06-08 12:41 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2021-02-12 14:01:47 CET
vsmserver tries to check the environment of the process creating a session by digging around in /proc. It doesn't seem to handle failures though as I get this traceback when it goes wrong:

> 2021-02-12 12:47:49 ERROR vsmserver.session: Unhandled exception trying to start new session for user1 on 127.0.0.1:904: <type 'exceptions.IOError'> [Errno 13] Permission denied: '/proc/3411/environ' Traceback (most recent call last):
>   File "/opt/thinlinc/modules/thinlinc/vsm/async.py", line 105, in i1Iii
>     obj . handle_read_event ( )
>   File "/usr/lib64/python2.7/asyncore.py", line 449, in handle_read_event
>     self.handle_read()
>   File "/usr/lib64/python2.7/asynchat.py", line 147, in handle_read
>     self.found_terminator()
>   File "/opt/thinlinc/modules/thinlinc/vsm/xmlrpc.py", line 447, in found_terminator
>     self . handle_response ( )
>   File "/opt/thinlinc/modules/thinlinc/vsm/xmlrpc.py", line 479, in handle_response
>     self . handle_returnvalue ( )
>   File "/opt/thinlinc/modules/thinlinc/vsm/call_reqsession.py", line 43, in handle_returnvalue
>     self . callback ( self . returnvalue )
>   File "/opt/thinlinc/modules/thinlinc/vsm/handler_newsession.py", line 196, in req_session_finished
>     self . handle_successful_sessionstart ( sessinfo )
>   File "/opt/thinlinc/modules/thinlinc/vsm/handler_newsession.py", line 203, in handle_successful_sessionstart
>     sessinfo [ 'client_ip' ] = self . get_client_ip ( )
>   File "/opt/thinlinc/modules/thinlinc/vsm/loginhandler_common.py", line 126, in get_client_ip
>     i11Iiii = open ( oo0oooooO0 , "r" )
> IOError: [Errno 13] Permission denied: '/proc/3411/environ'
> .

This happened in a test container and not in a real world scenario. Still, we shouldn't crash.

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