#1515 Backtrace in saslhandler

Reporter Thilo Molitor
Owner Nobody
Created
Updated
Stars ★ (1)
Tags
  • Priority-Medium
  • Status-NeedInfo
  • Type-Defect
  1. Thilo Molitor on

    I got the following backtrace in prosody trunk: Mar 25 02:12:26 c2s555587e9cda0 error Traceback[c2s]: /usr/lib/prosody/modules/mod_saslauth.lua:52: attempt to index field 'sasl_handler' (a nil value) stack traceback: /usr/lib/prosody/modules/mod_saslauth.lua:52: in function 'handle_status' /usr/lib/prosody/modules/mod_saslauth.lua:78: in function </usr/lib/prosody/modules/mod_saslauth.lua:67> (tail call): ? /usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75> (tail call): ? /usr/lib/prosody/core/stanza_router.lua:143: in function 'core_process_stanza' /usr/lib/prosody/modules/mod_c2s.lua:283: in function 'func' /usr/lib/prosody/util/async.lua:127: in function </usr/lib/prosody/util/async.lua:125> Mar 25 02:12:26 http error Traceback[http]: /usr/lib/prosody/modules/mod_c2s.lua:238: attempt to index field 'conn' (a nil value) stack traceback: /usr/lib/prosody/modules/mod_c2s.lua:238: in function 'handler' /usr/lib/prosody/util/async.lua:211: in function </usr/lib/prosody/util/async.lua:149> (tail call): ? /usr/lib/prosody/util/async.lua:79: in function 'done' ...usr/local/lib/prosody-modules.local/mod_auth_kwo.lua:103: in function <...usr/local/lib/prosody-modules.local/mod_auth_kwo.lua:101> [C]: in function 'xpcall' /usr/lib/prosody/net/http.lua:104: in function 'callback' /usr/lib/prosody/net/http.lua:76: in function 'success_cb' /usr/lib/prosody/net/http/parser.lua:171: in function 'feed' /usr/lib/prosody/net/http.lua:86: in function 'reader' /usr/lib/prosody/net/http.lua:158: in function 'onincoming' /usr/lib/prosody/net/server_event.lua:641: in function </usr/lib/prosody/net/server_event.lua:590> [C]: in function 'loop' /usr/lib/prosody/net/server_event.lua:796: in function </usr/lib/prosody/net/server_event.lua:795> [C]: in function 'xpcall' /usr/bin/prosody:76: in function 'loop' /usr/bin/prosody:86: in main chunk [C]: ? Mar 25 02:12:26 http error Request '<nil>': error in callback: /usr/lib/prosody/modules/mod_c2s.lua:238: attempt to index field 'conn' (a nil value) Mar 25 02:12:26 general error Top-level error, please report: /usr/lib/prosody/net/http.lua:45: /usr/lib/prosody/modules/mod_c2s.lua:238: attempt to index field 'conn' (a nil value) stack traceback: [C]: in function 'error' /usr/lib/prosody/net/http.lua:45: in function </usr/lib/prosody/net/http.lua:41> (tail call): ? /usr/lib/prosody/net/http.lua:76: in function 'success_cb' /usr/lib/prosody/net/http/parser.lua:171: in function 'feed' /usr/lib/prosody/net/http.lua:86: in function 'reader' /usr/lib/prosody/net/http.lua:158: in function 'onincoming' /usr/lib/prosody/net/server_event.lua:641: in function </usr/lib/prosody/net/server_event.lua:590> [C]: in function 'loop' /usr/lib/prosody/net/server_event.lua:796: in function </usr/lib/prosody/net/server_event.lua:795> [C]: in function 'xpcall' /usr/bin/prosody:76: in function 'loop' /usr/bin/prosody:86: in main chunk [C]: ? Mar 25 02:12:26 general error stack traceback: [C]: in function 'loop' /usr/lib/prosody/net/server_event.lua:796: in function </usr/lib/prosody/net/server_event.lua:795> [C]: in function 'xpcall' /usr/bin/prosody:76: in function 'loop' /usr/bin/prosody:86: in main chunk [C]: ?

  2. Zash on

    Looks like either a dupe of #1507 or problems caused by it. Other than that this is lacking in context and details, and it involves a non-public module.

    Changes
    • tags Status-NeedInfo
  3. Thilo Molitor on

    the non public module (mod_auth_kwo) only does an util.http call and calls async.done() in the http.request() callback, nothing special here. The http request is made in plain_test_password() which is registered here: function provider.get_sasl_handler(session) return new_sasl(host, { plain_test = function(sasl, username, password, realm) return plain_test_password(session, username, password), true; end, }); end But yes, this could be a duplicate.

  4. Thilo Molitor on

    Okay, after looking at the other backtrace I don't think this is a duplicate. Both traces show a timing issue because util.hhtp is used in combination with util.async to stop the current code flow and resume it later on at which stage it could be that underlying data has changed (the connection got closed etc.).

New comment

Not published. Used for spam prevention and optional update notifications.