#1913 Prosody fails to completely stop while shell watch:log is active

Reporter Zash
Owner Nobody
Created
Updated
Stars ★ (1)
Tags
  • Milestone-0.13
  • Priority-Medium
  • Type-Defect
  • Status-Accepted
  1. Zash on

    Steps to reproduce: 1. Run Prosody in the foreground in one terminal. 2. Run `prosodyctl shell watch log` in another. 3. Hit Ctrl-C in the terminal running Prosody 4. Observe traceback 5. Observe that Prosody is still running 6. Observe that Prosody no longer responds to Ctrl-C 7. Observe that Prosody does respond to prosodyctl stop 12:07:33 runnerzWsL54lWChb4 error Encountered error: ./util/adminstream.lua:130: attempt to index a nil value (local 'conn') stack traceback: ./util/adminstream.lua:130: in method 'close' plugins/mod_admin_socket.lua:48: in field '?' ./util/events.lua:81: in function <./util/events.lua:77> (...tail calls...) ./util/startup.lua:370: in field 'shutdown' ./util/startup.lua:821: in local 'f' ./util/async.lua:161: in function 'prosody.util.async.default_runner_func' ./util/async.lua:149: in function <./util/async.lua:147> 12:07:33 fdwatchOBDtOXpw3Uk1 error Closing due to error calling onsignal: ./util/async.lua:159: ./util/adminstream.lua:130: attempt to index a nil value (local 'conn') stack traceback: ./util/adminstream.lua:130: in method 'close' plugins/mod_admin_socket.lua:48: in field '?' ./util/events.lua:81: in function <./util/events.lua:77> (...tail calls...) ./util/startup.lua:370: in field 'shutdown' ./util/startup.lua:821: in local 'f' ./util/async.lua:161: in function 'prosody.util.async.default_runner_func' ./util/async.lua:149: in function <./util/async.lua:147> stack traceback: [C]: in function 'error' ./util/async.lua:159: in local 'handler' ./util/async.lua:244: in method 'run' ./util/startup.lua:819: in function <./util/startup.lua:817> [C]: in function 'prosody.util.xpcall.xpcall' ./net/server_epoll.lua:288: in function <./net/server_epoll.lua:274> (...tail calls...) ./net/server_epoll.lua:1228: in function 'prosody.net.server.loop' [C]: in function 'prosody.util.xpcall.xpcall' ./prosody:88: in local 'loop' ./prosody:93: in main chunk [C]: in ? 12:07:33 fdwatchOBDtOXpw3Uk1 debug Unregistered from poller Since signals are handled the same way as connections, and connections are terminated on error in server_epoll (configurable), an error in the signal handler disables that signal handler.

New comment

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