Skip to content

Conversation

robhoes
Copy link
Member

@robhoes robhoes commented May 19, 2023

Currently, if a session check fails and a SESSION_INVALID error is raised, the message "Session check failed: missing reference; tbl = session, ref = XX" plus a full strack trace is written to the logs. The stack trace is usually from session_check.ml and looks the same each time.

These logs are not very interesting, but unfortunately attact the attention of people triaging issue by browsing the logs. Because the SESSION_INVALID lines in xapi's logs look so worrying, they often make people suspect bugs in xapi. However, the errors just mean that a client has used an illegal or (more often) expired session. These logs are especially common when the coordinator xapi is restarted and all old sessions are automatically removed.

This patch improves logging of session errors by putting the blame where it belongs: the client (note that clients can be internal). The stack trace is suppressed, and the log line changed as follows:

Session check failed: the client used an illegal or expired session
'X'

Currently, if a session check fails and a SESSION_INVALID error is
raised, the message "Session check failed: missing reference; tbl =
session, ref = XX" plus a full strack trace is written to the logs. The
stack trace is usually from session_check.ml and looks the same each
time.

These logs are not very interesting, but unfortunately attact the
attention of people triaging issue by browsing the logs. Because the
SESSION_INVALID lines in xapi's logs look so worrying, they often make
people suspect bugs in xapi. However, the errors just mean that a client
has used an illegal or (more often) expired session. These logs are
especially common when the coordinator xapi is restarted and all old
sessions are automatically removed.

This patch improves logging of session errors by putting the blame where
it belongs: the client (note that clients can be internal). The stack
trace is suppressed, and the log line changed as follows:

    Session check failed: the client used an illegal or expired session
    'X'

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
@robhoes robhoes merged commit 1ba81e3 into xapi-project:master May 23, 2023
@robhoes robhoes deleted the scary-sessions branch May 23, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants