We have been running this patch for more than a month without noticing any
major issues ... one thing I noticed today is this error, have seen it only
once:
Feb 17 13:44:22 c2s5619c63eb520 error Traceback[c2s]:
/usr/lib/prosody/modules/mod_smacks.lua:608: attempt to index local 'queue'
(a nil value)
stack traceback:
/usr/lib/prosody/modules/mod_smacks.lua:608: in function
</usr/lib/prosody/modules/mod_smacks.lua:530>
(...tail calls...)
/usr/share/lua/5.2/prosody/util/events.lua:81: in function
</usr/share/lua/5.2/prosody/util/events.lua:77>
(...tail calls...)
/usr/share/lua/5.2/prosody/core/stanza_router.lua:143: in function
'core_process_stanza'
/usr/lib/prosody/modules/mod_c2s.lua:326: in function 'func'
/usr/share/lua/5.2/prosody/util/async.lua:144: in function
</usr/share/lua/5.2/prosody/util/async.lua:142>
On Friday, December 30, 2022 at 2:25:43 AM UTC-6 Damian Minkov wrote:
> Hi again,
>
> And what about and this fix, do you think this can be applied?
>
> Thank you
> damencho
>
>
> On Saturday, December 10, 2022 at 7:23:59 AM UTC+2 Damian Minkov wrote:
>
>> I think this fixes it:
>>
>> Index: plugins/mod_smacks.lua
>> IDEA additional info:
>> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
>> <+>UTF-8
>> ===================================================================
>> diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua
>> --- a/plugins/mod_smacks.lua (revision
>> d4daf40caa518a89e51222e6e1d9c230db02839a)
>> +++ b/plugins/mod_smacks.lua (date 1670649730425)
>> @@ -493,13 +493,13 @@
>> sessionmanager.destroy_session(session, "Hibernating too long");
>> sessions_expired(1);
>> end);
>> + -- we need the queue in advance because on conn:close the session
>> will be destroyed and queue cleaned
>> + local queue = session.outgoing_stanza_queue;
>> if session.conn then
>> local conn = session.conn;
>> - c2s_sessions[conn] = nil;
>> - session.conn = nil;
>> conn:close();
>> end
>> - module:fire_event("smacks-hibernation-start", { origin = session;
>> queue = session.outgoing_stanza_queue:table() });
>> + module:fire_event("smacks-hibernation-start", { origin = session;
>> queue = queue:table() });
>> return true; -- Postpone destruction for now
>> end);
>>
>>
>> Clearing the shared sessions table and the conn in session is done in
>> listener.ondisconnect in mod_c2s if session is found.
>> But if we first clear the shared table and then call conn:close() the
>> session is not found in the cache to be destroyed.
>>
>>
>> On Friday, December 9, 2022 at 6:46:41 PM UTC-6 Damian Minkov wrote:
>>
>>> We(the Jitsi Team) have noticed that many sessions in prosody are unbind
>>> (the hook pre-resource-unbind) with an error "Hibernating too long". We are
>>> using mod_smacks that comes with prosody 0.12.1.
>>>
>>> While debugging we found out that the old mod_smack module from the
>>> community modules does not have this problem.
>>>
>>> The simplest scenario is when we open the prejoin page of jitsi-meet,
>>> that establishes an xmpp connection over websocket and we close the browser
>>> tab.
>>>
>>> Without loading mod_smacks or when you load the old community module you
>>> can see in the logs "Dec 10 00:17:30 c2s55d7399259e0 info Client
>>> disconnected: connection closed" when you close the tab. With the smacks
>>> module from latest prosody that log is not printed.
>>> Have you seen this? Do you want more information or some debug info to
>>> track it down?
>>>
>>> Thank you
>>> damencho
>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prosody-dev/9e4642d7-5487-416e-9d74-ef4e5568ea88n%40googlegroups.com.