#1781 sessionmanager traceback during shutdown

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

    After one or two restarts via `systemctl restart prosody` the prompt hangs and prosody is throwing errors, see debug log file attached. (Mattj was already involved in that issue) Dump file send to developers email. What version of the product are you using? On what operating system? s. below Please provide any additional information below. My prosodyctl about: Prosody 0.12.1 # Prosody directories Data directory: /var/lib/prosody Config directory: /etc/prosody Source directory: /usr/lib/prosody Plugin directories: /var/lib/prosody/custom_plugins - not a directory! /usr/lib/prosody/modules /usr/local/lib/prosody-modules - prosody-modules rev: 660160fe97fa /usr/lib/prosody/modules/ # Operating system Linux 5.15.74-v7+ # Lua environment Lua version: Lua 5.4 Lua module search paths: /usr/local/share/lua/5.4/prosody/?.lua /usr/local/share/lua/5.4/?.lua /usr/local/share/lua/5.4/prosody/?/init.lua /usr/local/share/lua/5.4/?/init.lua /usr/local/lib/lua/5.4/prosody/?.lua /usr/local/lib/lua/5.4/?.lua /usr/local/lib/lua/5.4/prosody/?/init.lua /usr/local/lib/lua/5.4/?/init.lua /usr/share/lua/5.4/prosody/?.lua /usr/share/lua/5.4/?.lua /usr/share/lua/5.4/prosody/?/init.lua /usr/share/lua/5.4/?/init.lua ./prosody/?.lua ./?.lua ./prosody/?/init.lua ./?/init.lua /root/.luarocks/share/lua/5.4/?.lua /root/.luarocks/share/lua/5.4/?/init.lua /var/lib/prosody/custom_plugins/share/lua/5.4/?.lua /var/lib/prosody/custom_plugins/share/lua/5.4/?/init.lua Lua C module search paths: /usr/local/lib/lua/5.4/prosody/?.so /usr/local/lib/lua/5.4/?.so /usr/lib/arm-linux-gnueabihf/lua/5.4/prosody/?.so /usr/lib/arm-linux-gnueabihf/lua/5.4/?.so /usr/lib/lua/5.4/prosody/?.so /usr/lib/lua/5.4/?.so /usr/local/lib/lua/5.4/loadall.so ./prosody/?.so ./?.so /root/.luarocks/lib/lua/5.4/?.so LuaRocks: Installed (2.x+) # Network Backend: epoll # Lua module versions LuaExpat: 1.3.0 LuaFileSystem: 1.8.0 LuaSec: 1.0.2 LuaSocket: 3.0-rc1 luaunbound: 0.5 (?) readline: 2.7 # library versions libcrypto: OpenSSL 1.1.1n 15 Mar 2022 libexpat: expat_2.2.10 libunbound: 1.13.1

  2. mirux on

    Direct error log: Nov 04 23:11:19 runnert_5YUEwyVmnL  error   Encountered error: /usr/share/lua/5.4/prosody/core/sessionmanager.lua:111: attempt to index a nil value (field '?')     stack traceback:     /usr/share/lua/5.4/prosody/core/sessionmanager.lua:111: in function 'core.sessionmanager.destroy_session'     /usr/lib/prosody/modules/mod_c2s.lua:237: in method 'close'     /usr/lib/prosody/modules/mod_c2s.lua:444: in field '?'     /usr/share/lua/5.4/prosody/util/events.lua:81: in function </usr/share/lua/5.4/prosody/util/events.lua:77>     (...tail calls...)     /usr/share/lua/5.4/prosody/util/startup.lua:352: in field 'shutdown'     /usr/lib/prosody/modules/mod_posix.lua:135: in local 'f'     /usr/share/lua/5.4/prosody/util/async.lua:156: in upvalue 'func'     /usr/share/lua/5.4/prosody/util/async.lua:144: in function </usr/share/lua/5.4/prosody/util/async.lua:142> Nov 04 23:11:19 connjmqqPYjqACHk    error   Error calling ondisconnect: /usr/share/lua/5.4/prosody/util/async.lua:154: /usr/share/lua/5.4/prosody/core/sessionmanager.lua:111: attempt to index a nil value (field '?')     stack traceback:     /usr/share/lua/5.4/prosody/core/sessionmanager.lua:111: in function 'core.sessionmanager.destroy_session'     /usr/lib/prosody/modules/mod_c2s.lua:237: in method 'close'     /usr/lib/prosody/modules/mod_c2s.lua:444: in field '?'     /usr/share/lua/5.4/prosody/util/events.lua:81: in function </usr/share/lua/5.4/prosody/util/events.lua:77>     (...tail calls...)     /usr/share/lua/5.4/prosody/util/startup.lua:352: in field 'shutdown'     /usr/lib/prosody/modules/mod_posix.lua:135: in local 'f'     /usr/share/lua/5.4/prosody/util/async.lua:156: in upvalue 'func'     /usr/share/lua/5.4/prosody/util/async.lua:144: in function </usr/share/lua/5.4/prosody/util/async.lua:142>     stack traceback:     [C]: in function 'error'     /usr/share/lua/5.4/prosody/util/async.lua:154: in local 'handler'     /usr/share/lua/5.4/prosody/util/async.lua:232: in method 'run'     /usr/lib/prosody/modules/mod_posix.lua:133: in function </usr/lib/prosody/modules/mod_posix.lua:131>     [C]: in function 'table.insert'     /usr/share/lua/5.4/prosody/util/stanza.lua:324: in upvalue '_dostring'     /usr/share/lua/5.4/prosody/util/stanza.lua:340: in function </usr/share/lua/5.4/prosody/util/stanza.lua:338>     [C]: in function 'tostring'     /usr/share/lua/5.4/prosody/util/stanza.lua:346: in method 'top_tag'     ...rosody-modules/mod_presence_cache/mod_presence_cache.lua:37: in field '?'     ... (skipping 8 levels)     /usr/share/lua/5.4/prosody/core/sessionmanager.lua:120: in function 'core.sessionmanager.destroy_session'     /usr/lib/prosody/modules/mod_c2s.lua:382: in function </usr/lib/prosody/modules/mod_c2s.lua:378>     [C]: in function 'util.xpcall.xpcall'     /usr/share/lua/5.4/prosody/net/server_epoll.lua:240: in method 'on'     /usr/share/lua/5.4/prosody/net/server_epoll.lua:591: in method 'close'     /usr/share/lua/5.4/prosody/net/server_epoll.lua:460: in method 'onreadable'     /usr/share/lua/5.4/prosody/net/server_epoll.lua:1044: in function 'net.server_epoll.loop'     [C]: in function 'util.xpcall.xpcall'     /usr/bin/prosody:78: in local 'loop'     /usr/bin/prosody:83: in main chunk     [C]: in ?

  3. mirux on

    comment: same behavior even without "mod_presence_cache" enabled

  4. mirux on

    Nov 30 15:07:37 runnerl4gU6Ryjk1cA error Encountered error: /usr/share/lua/5.4/prosody/core/sessionmanager.lua:111: attempt to index a nil value (field '?') 2 stack traceback: 3 /usr/share/lua/5.4/prosody/core/sessionmanager.lua:111: in function 'core.sessionmanager.destroy_session' 4 /usr/lib/prosody/modules/mod_c2s.lua:237: in method 'close' 5 /usr/lib/prosody/modules/mod_c2s.lua:444: in field '?' 6 /usr/share/lua/5.4/prosody/util/events.lua:81: in function </usr/share/lua/5.4/prosody/util/events.lua:77> 7 (...tail calls...) 8 /usr/share/lua/5.4/prosody/util/startup.lua:352: in field 'shutdown' 9 /usr/lib/prosody/modules/mod_posix.lua:135: in local 'f' 10 /usr/share/lua/5.4/prosody/util/async.lua:156: in upvalue 'func' 11 /usr/share/lua/5.4/prosody/util/async.lua:144: in function </usr/share/lua/5.4/prosody/util/async.lua:142> 12 Nov 30 15:07:37 datamanager error Failed to load roster storage ('/usr/share/lua/5.4/prosody/util/async.lua:154: /usr/share/lua/5.4/prosody/core/sessionmanager.lua:111: attempt to index> 13 stack traceback: 14 /usr/share/lua/5.4/prosody/core/sessionmanager.lua:111: in function 'core.sessionmanager.destroy_session' 15 /usr/lib/prosody/modules/mod_c2s.lua:237: in method 'close' 16 /usr/lib/prosody/modules/mod_c2s.lua:444: in field '?' 17 /usr/share/lua/5.4/prosody/util/events.lua:81: in function </usr/share/lua/5.4/prosody/util/events.lua:77> 18 (...tail calls...) 19 /usr/share/lua/5.4/prosody/util/startup.lua:352: in field 'shutdown' 20 /usr/lib/prosody/modules/mod_posix.lua:135: in local 'f' 21 /usr/share/lua/5.4/prosody/util/async.lua:156: in upvalue 'func' 22 /usr/share/lua/5.4/prosody/util/async.lua:144: in function </usr/share/lua/5.4/prosody/util/async.lua:142> 23 stack traceback: 24 [C]: in function 'error' 25 /usr/share/lua/5.4/prosody/util/async.lua:154: in local 'handler' 26 /usr/share/lua/5.4/prosody/util/async.lua:232: in method 'run' 27 /usr/lib/prosody/modules/mod_posix.lua:133: in function </usr/lib/prosody/modules/mod_posix.lua:131> 28 [C]: in ? 29 [C]: in ? 30 [C]: in function 'load' 31 /usr/share/lua/5.4/prosody/util/envload.lua:37: in function 'util.envload.envloadfile' 32 /usr/share/lua/5.4/prosody/util/datamanager.lua:140: in function </usr/share/lua/5.4/prosody/util/datamanager.lua:139> 33 (...tail calls...) 34 /usr/share/lua/5.4/prosody/core/rostermanager.lua:133: in function 'core.rostermanager.load_roster' 35 ... (skipping 12 levels) 36 /usr/share/lua/5.4/prosody/core/sessionmanager.lua:120: in function 'core.sessionmanager.destroy_session' 37 /usr/lib/prosody/modules/mod_c2s.lua:382: in function </usr/lib/prosody/modules/mod_c2s.lua:378> 38 [C]: in function 'util.xpcall.xpcall' 39 /usr/share/lua/5.4/prosody/net/server_epoll.lua:240: in method 'on' 40 /usr/share/lua/5.4/prosody/net/server_epoll.lua:591: in method 'close' 41 /usr/share/lua/5.4/prosody/net/server_epoll.lua:460: in method 'onreadable' 42 /usr/share/lua/5.4/prosody/net/server_epoll.lua:1044: in function 'net.server.loop' 43 [C]: in function 'util.xpcall.xpcall' 44 /usr/bin/prosody:78: in local 'loop' 45 /usr/bin/prosody:83: in main chunk 46 [C]: in ?') for user: user@example.com

  5. MattJ on

    Hi! Thanks for your patience on this. It would be great if you could upgrade to the latest nightly build (prosody-0.12 or prosody-trunk) and see if this issue still happens. We believe it should be fixed now.

    Changes
    • tags Status-NeedInfo
  6. mirux on

    Many thanks for providing a fix for the error, I have tested with "Prosody version 0.12 nightly build 192 (2023-02-10, 9ed628635dc6)". As of now I haven't faced the error again. From my side it can be considered as fixed.

  7. Zash on

    considering it fixed then

    Changes
    • tags Status-Fixed

New comment

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