Bug 6136 - errors in xmlrpc error handlers are silently ignored
Summary: errors in xmlrpc error handlers are silently ignored
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Server (show other bugs)
Version: 1.3.1
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.8.0
Assignee: Pierre Ossman
URL:
Keywords: prosaic, samuel_tester
Depends on:
Blocks:
 
Reported: 2017-01-13 12:15 CET by Pierre Ossman
Modified: 2017-03-20 16:54 CET (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2017-01-13 12:15:01 CET
Basically every XMLRPC class has its own error handler. But if something goes wrong in one of these handlers then the problem is silently ignored. We have this code in xmlrpc.py:

>         except:
>             # We want our server to continue its life, serving other
>             # clients, So we need to do a catch-all here. It is
>             # however always logged above (at least as long as the log
>             # function works).
>             pass

The principle of continuing is probably correct, but the statement about things being logged is not.

Found whilst fixing bug 5489.
Comment 3 Samuel Mannehed cendio 2017-01-16 12:00:04 CET
Tests pass and code looks good.
Comment 4 Samuel Mannehed cendio 2017-01-17 11:55:07 CET
Will do some more testing and manually provoke the issue before the fix.
Comment 5 Samuel Mannehed cendio 2017-01-18 16:48:37 CET
(In reply to comment #4)
> Will do some more testing and manually provoke the issue before the fix.

Modified xmlrpc.py to always call handle_error, and it does indeed not log anything when handle_error is called on a 4.7.0 installation.

After installing build 5349 and modifying the installed xmlrpc.py in the same way as above, I get:

> 017-01-18 16:42:18 ERROR vsmserver: Exception in error handler for...

followed by a traceback. LGTM.

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