#648 mod_smacks broken in 0.9.x

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

    What steps will reproduce the problem? 1. Join a room. 2. Become disconnected and hibernating. 3. Wait for someone to write something to the room. What is the expected output? Message is queued and delivered upon reconnection. What do you see instead? Message is queued but an error stanza is returned to the room. A Prosody MUC responds by kicking you as part of ghost prevention. What version of the product are you using? Affects 0.9.x Either when using libevent or mod_smacks from prosody-modules after https://hg.prosody.im/prosody-modules/rev/e48dbb640408 Please provide any additional information below. mod_smacks prevents sending stanzas while hibernating by dropping them in a filter https://hg.prosody.im/prosody-modules/file/e48dbb640408/mod_smacks/mod_smacks.lua#l88 This results in session.send() skipping past the write() call and returning nil: https://hg.prosody.im/0.9/file/352270bc0439/core/sessionmanager.lua#l33 Previously, mod_smacks would return the empty string, which would "successfully" be written to the connection if using server_select. However, with libevent, this write call returns nil, "locked" when the connection is dead. After session.send() returns nil, in mod_message: https://hg.prosody.im/0.9/file/352270bc0439/plugins/mod_message.lua#l71 it proceeds to tailcall process_to_bare(), which hits this condition and returns an error: https://hg.prosody.im/0.9/file/352270bc0439/plugins/mod_message.lua#l24 This error then results in being kicked. Also see #523 and #559

  2. Zash on

    Changes
    • tags Status-Accepted Milestone-0.9
  3. Zash on

    https://hg.prosody.im/trunk/rev/eed846384178 is what fixes this in 0.10, backport?

  4. Zash on

    https://hg.prosody.im/0.9/rev/caee8a32983a

    Changes
    • owner Zash
    • tags Status-Fixed

New comment

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