#554 Unloading a global module that uses wrap_event causes traceback

Reporter Zash
Owner MattJ
Created
Updated
Stars (0)
Tags
  • Priority-Medium
  • Status-Fixed
  • Milestone-0.10
  • Type-Defect
  1. Zash on

    Traceback[c2s]: /usr/lib/prosody/util/events.lua:94: attempt to call a nil value stack traceback: /usr/lib/prosody/util/events.lua: in function 'fire_event' /usr/lib/prosody/core/modulemanager.lua:262: in function 'unload' /usr/lib/prosody/modules/mod_admin_adhoc.lua:725: in function 'handler' /usr/lib/prosody/modules/adhoc/adhoc.lib.lua:36: in function 'adhoc_handle_cmd' /usr/lib/prosody/modules/adhoc/mod_adhoc.lua:91: in function </usr/lib/prosody/modules/adhoc/mod_adhoc.lua:72> /usr/lib/prosody/util/events.lua:73: in function 'fire_event' /usr/lib/prosody/modules/mod_iq.lua:70: in function </usr/lib/prosody/modules/mod_iq.lua:62> /usr/lib/prosody/util/events.lua:73: in function 'handlers' /usr/src/prosody-modules/mod_debug_memory.lua:44: in function 'fire_event' /usr/lib/prosody/core/stanza_router.lua:187: in function 'core_post_stanza' /usr/lib/prosody/core/stanza_router.lua:135: in function 'core_process_stanza' /usr/lib/prosody/modules/mod_c2s.lua:244: in function 'func' /usr/lib/prosody/util/async.lua:88: in function </usr/lib/prosody/util/async.lua:86> Load and unload the following module: module:set_global(); module:wrap_event(false, function (handlers, event_name, event_data) return handlers(event_name, event_data); end); Further events may cause more tracebacks, break unloading of modules, prevent shutdown etc.

  2. Zash on

    Unloading a module that wraps HTTP events (eg https://modules.prosody.im/mod_http_logging.html ) breaks the HTTP server and causes a traceback on the next HTTP event. http.server debug Firing event: GET localhost/ http.server error Traceback[httpserver]: ./util/events.lua:99: attempt to call field '?' (a nil value) stack traceback: ./util/events.lua:99: in function 'fire_event' ./net/http/server.lua:223: in function <./net/http/server.lua:165> (tail call): ? [C]: in function 'xpcall' ./net/http/server.lua:109: in function 'process_next' ./net/http/server.lua:125: in function 'success_cb' ./net/http/parser.lua:154: in function 'feed' ./net/http/server.lua:151: in function 'onincoming' ./net/server_event.lua:602: in function <./net/server_event.lua:552> [C]: in function 'loop' ./net/server_event.lua:742: in function <./net/server_event.lua:741> [C]: in function 'xpcall' prosody:387: in function 'loop' prosody:418: in main chunk [C]: ? general error Top-level error, please report: ./util/events.lua:99: attempt to call field '?' (a nil value) general error stack traceback: [C]: in function 'loop' ./net/server_event.lua:742: in function <./net/server_event.lua:741> [C]: in function 'xpcall' prosody:387: in function 'loop' prosody:418: in main chunk [C]: ?

    Changes
    • tags Milestone-0.10
  3. MattJ on

    Fixed in ba83ff7d9bd7

    Changes
    • owner MattJ
    • tags Status-Fixed

New comment

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