Bug 8096 - Logs for autotests can contain confusing tracebacks
Summary: Logs for autotests can contain confusing tracebacks
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Automatic tests (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-14 11:14 CET by Linn
Modified: 2023-02-14 13:38 CET (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Linn cendio 2023-02-14 11:14:20 CET
When running our autotests, it is possible to get this kind of logging, where the test passes but a traceback is shown:

> Test that the agent allows a correct logon ... Exception ignored in: <bound method Mixin.__del__ of <disttest.stubprog.StubProgram object at 0x7f6c7bcc5dd8>>
> Traceback (most recent call last):
>   File "/autotests/lib/BackgroundSocketServer.py", line 18, in __del__
>     self.stop()
>   File "/autotests/lib/disttest/stubprog.py", line 93, in stop
>     getattr(self.__worker, 'stop')()
>   File "/usr/lib64/python3.6/xmlrpc/client.py", line 1112, in __call__
>     return self.__send(self.__name, args)
>   File "/autotests/lib/xmlcomlib.py", line 16, in __request
>     return self.__call(self, methodname, params)
>   File "/autotests/lib/xmlcomlib.py", line 73, in __request
>     return super().__getattr__(methodname)(*params)
>   File "/usr/lib64/python3.6/xmlrpc/client.py", line 1112, in __call__
>     return self.__send(self.__name, args)
>   File "/usr/lib64/python3.6/xmlrpc/client.py", line 1452, in __request   
>     verbose=self.__verbose
>   File "/usr/lib64/python3.6/xmlrpc/client.py", line 1154, in request
>     return self.single_request(host, handler, request_body, verbose)
>   File "/usr/lib64/python3.6/xmlrpc/client.py", line 1166, in single_request
>     http_conn = self.send_request(host, handler, request_body, verbose)
>   File "/usr/lib64/python3.6/xmlrpc/client.py", line 1272, in send_request
>     connection.putrequest("POST", handler, skip_accept_encoding=True)
>   File "/usr/lib64/python3.6/http/client.py", line 1118, in putrequest
>     raise CannotSendRequest(self.__state)
> http.client.CannotSendRequest: Request-sent
> ok
The traceback itself belongs to a destructor. Destructors in Python are not always called at the same time, so it is possible to get a traceback from them depending on when they were called, even if everything else went fine.

While this traceback in the logs is harmless, it is a bit confusing and clutters the output. It would be nice if we could prevent it from happening.

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