#1923 mod_s2s crashes and prevents all s2s connections
Reporter
anybody
Owner
Nobody
Created
Updated
Stars
★★ (2)
Tags
Priority-Medium
Component-Community
Type-Defect
Status-New
anybody
on
What steps will reproduce the problem?
1. Block all clearnet connections (only allow Tor/i2p using eg mod_onions or mod_i2p)
2. Attempt to connect to a MUC on a different server
What is the expected output?
A successful connection (ie prior to recent updates).
What do you see instead?
Apr 17 06:06:12 runner6ka-XavJsHG2 debug changed state from ready to error (ready) [(nil) (nil)]
Apr 17 06:06:12 c2s74e50ca5730 error Traceback[c2s]: /usr/lib/prosody/modules/mod_s2s.lua:202: attempt to call a nil value (method 'push')
stack traceback:
/usr/lib/prosody/modules/mod_s2s.lua:202: in field '?'
/usr/lib/prosody/util/events.lua:81: in function </usr/lib/prosody/util/events.lua:77>
(...tail calls...)
/usr/lib/prosody/core/stanza_router.lua:214: in upvalue 'core_route_stanza'
/usr/lib/prosody/core/stanza_router.lua:192: in upvalue 'core_post_stanza'
/usr/lib/prosody/core/stanza_router.lua:128: in upvalue 'core_process_stanza'
/usr/lib/prosody/modules/mod_c2s.lua:366: in upvalue 'func'
/usr/lib/prosody/util/async.lua:149: in function </usr/lib/prosody/util/async.lua:147>
Apr 17 06:06:20 runnerwTTpYk3OhSED debug creating new coroutine
Apr 17 06:06:20 c2s74e50c8c560 debug Received[c2s]: <iq xml:lang='en' type='get' id='6b99f318-a749-4dec-bc8a-39aa3fcf4027' to='muc@muc.example.com'>
Apr 17 06:06:20 [redacted].onion:onions debug Onion routing something to muc.example.com
Apr 17 06:06:20 [redacted].onion:onions debug Connecting to [redacted].onion:5269
Apr 17 06:06:20 socket debug new connection id: 74e50d026a0
Apr 17 06:06:20 socket debug new connection established. id: 74e50d026a0
Apr 17 06:06:20 [redacted]:onions debug Connected to SOCKS5 proxy, sending SOCKS5 handshake.
Apr 17 06:06:21 socket debug connection failed in write event: connection refused
Apr 17 06:06:21 socket debug closing client with id: 74e50d026a0 connection refused
What version of the product are you using? On what operating system?
prosody 1:13.0.1-1 on Artix Linux.
Zash
on
A brief look suggests this is because mod_onions duplicates some code from Prosody that creates internal data structures, and those have changed a bit in Prosody 13.0. Here it's because of the sendq (queue of pending outgoing messages) that's in an old format.
What steps will reproduce the problem? 1. Block all clearnet connections (only allow Tor/i2p using eg mod_onions or mod_i2p) 2. Attempt to connect to a MUC on a different server What is the expected output? A successful connection (ie prior to recent updates). What do you see instead? Apr 17 06:06:12 runner6ka-XavJsHG2 debug changed state from ready to error (ready) [(nil) (nil)] Apr 17 06:06:12 c2s74e50ca5730 error Traceback[c2s]: /usr/lib/prosody/modules/mod_s2s.lua:202: attempt to call a nil value (method 'push') stack traceback: /usr/lib/prosody/modules/mod_s2s.lua:202: in field '?' /usr/lib/prosody/util/events.lua:81: in function </usr/lib/prosody/util/events.lua:77> (...tail calls...) /usr/lib/prosody/core/stanza_router.lua:214: in upvalue 'core_route_stanza' /usr/lib/prosody/core/stanza_router.lua:192: in upvalue 'core_post_stanza' /usr/lib/prosody/core/stanza_router.lua:128: in upvalue 'core_process_stanza' /usr/lib/prosody/modules/mod_c2s.lua:366: in upvalue 'func' /usr/lib/prosody/util/async.lua:149: in function </usr/lib/prosody/util/async.lua:147> Apr 17 06:06:20 runnerwTTpYk3OhSED debug creating new coroutine Apr 17 06:06:20 c2s74e50c8c560 debug Received[c2s]: <iq xml:lang='en' type='get' id='6b99f318-a749-4dec-bc8a-39aa3fcf4027' to='muc@muc.example.com'> Apr 17 06:06:20 [redacted].onion:onions debug Onion routing something to muc.example.com Apr 17 06:06:20 [redacted].onion:onions debug Connecting to [redacted].onion:5269 Apr 17 06:06:20 socket debug new connection id: 74e50d026a0 Apr 17 06:06:20 socket debug new connection established. id: 74e50d026a0 Apr 17 06:06:20 [redacted]:onions debug Connected to SOCKS5 proxy, sending SOCKS5 handshake. Apr 17 06:06:21 socket debug connection failed in write event: connection refused Apr 17 06:06:21 socket debug closing client with id: 74e50d026a0 connection refused What version of the product are you using? On what operating system? prosody 1:13.0.1-1 on Artix Linux.
A brief look suggests this is because mod_onions duplicates some code from Prosody that creates internal data structures, and those have changed a bit in Prosody 13.0. Here it's because of the sendq (queue of pending outgoing messages) that's in an old format.
Changes