#1111 Top-level error in sessionmanager.destroy_session
Reporter
Zash
Owner
Nobody
Created
Updated
Stars
★ (1)
Tags
Priority-Medium
Type-Defect
Status-Accepted
Zash
on
What steps will reproduce the problem?
1. Shut down during upgrade
What is the expected output?
No tracebacks
What do you see instead?
Traceback
What version of the product are you using? On what operating system?
trunk 1nightly862-1~trusty on ubuntu 14.04
Please provide any additional information below.
Mar 24 13:19:03 general error Top-level error, please report:
/usr/lib/prosody/core/sessionmanager.lua:97: attempt to index field '?' (a nil value)
Mar 24 13:19:03 general error
stack traceback:
/usr/lib/prosody/core/sessionmanager.lua:97: in function 'sm_destroy_session'
/usr/lib/prosody/modules/mod_c2s.lua:183: in function 'close'
/usr/lib/prosody/modules/mod_c2s.lua:336: in function '?'
/usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75>
(tail call): ?
/usr/bin/prosody:285: in function 'shutdown'
/usr/lib/prosody/modules/mod_posix.lua:167: in function </usr/lib/prosody/modules/mod_posix.lua:164>
[C]: in function 'resume'
/usr/lib/prosody/util/async.lua:145: in function 'run'
/usr/lib/prosody/modules/mod_c2s.lua:133: in function 'dispatch_stanza'
...
/usr/lib/prosody/core/sessionmanager.lua:106: in function 'sm_destroy_session'
/usr/lib/prosody/modules/mod_c2s.lua:303: in function 'disconnect'
/usr/lib/prosody/net/server_select.lua:395: in function </usr/lib/prosody/net/server_select.lua:366>
(tail call): ?
/usr/lib/prosody/net/server_select.lua:515: in function 'readbuffer'
/usr/lib/prosody/net/server_select.lua:911: in function </usr/lib/prosody/net/server_select.lua:895>
[C]: in function 'xpcall'
/usr/bin/prosody:398: in function 'loop'
/usr/bin/prosody:429: in main chunk
[C]: ?
Zash
on
So this looks like the shutdown signal was triggered in the middle of destroying a disconnecting session. The signal makes mod_c2s close all sessions, and it chockes on the already half-destroyed session.
libevent handling signals on the same level as other events means it is not affected, only server_select and server_epoll.
MattJ
on
This is a rare edge case, that only happens on shutdown anyway. Pushing to 0.12.
Changes
tagsMilestone-0.11 Milestone-0.12
Zash
on
Same as above, unlikely to make 0.12, dropping milestone.
What steps will reproduce the problem? 1. Shut down during upgrade What is the expected output? No tracebacks What do you see instead? Traceback What version of the product are you using? On what operating system? trunk 1nightly862-1~trusty on ubuntu 14.04 Please provide any additional information below. Mar 24 13:19:03 general error Top-level error, please report: /usr/lib/prosody/core/sessionmanager.lua:97: attempt to index field '?' (a nil value) Mar 24 13:19:03 general error stack traceback: /usr/lib/prosody/core/sessionmanager.lua:97: in function 'sm_destroy_session' /usr/lib/prosody/modules/mod_c2s.lua:183: in function 'close' /usr/lib/prosody/modules/mod_c2s.lua:336: in function '?' /usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75> (tail call): ? /usr/bin/prosody:285: in function 'shutdown' /usr/lib/prosody/modules/mod_posix.lua:167: in function </usr/lib/prosody/modules/mod_posix.lua:164> [C]: in function 'resume' /usr/lib/prosody/util/async.lua:145: in function 'run' /usr/lib/prosody/modules/mod_c2s.lua:133: in function 'dispatch_stanza' ... /usr/lib/prosody/core/sessionmanager.lua:106: in function 'sm_destroy_session' /usr/lib/prosody/modules/mod_c2s.lua:303: in function 'disconnect' /usr/lib/prosody/net/server_select.lua:395: in function </usr/lib/prosody/net/server_select.lua:366> (tail call): ? /usr/lib/prosody/net/server_select.lua:515: in function 'readbuffer' /usr/lib/prosody/net/server_select.lua:911: in function </usr/lib/prosody/net/server_select.lua:895> [C]: in function 'xpcall' /usr/bin/prosody:398: in function 'loop' /usr/bin/prosody:429: in main chunk [C]: ?
So this looks like the shutdown signal was triggered in the middle of destroying a disconnecting session. The signal makes mod_c2s close all sessions, and it chockes on the already half-destroyed session. libevent handling signals on the same level as other events means it is not affected, only server_select and server_epoll.
This is a rare edge case, that only happens on shutdown anyway. Pushing to 0.12.
ChangesMilestone-0.11Milestone-0.12Same as above, unlikely to make 0.12, dropping milestone.
ChangesMilestone-0.12