#783 Traceback in server_select on attempt to write to closed connection

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

    Ubuntu 14.10 LTS, 0.10.x branch, nightly build. mod_pep causes the server to crash once in a few hours if turned on. I noticed the bug sometime around Nov 17. The error log output: mod_c2s error Traceback[c2s]: /usr/lib/prosody/net/server_select.lua:426: table index is nil stack traceback: /usr/lib/prosody/net/server_select.lua:426: in function 'w' /usr/lib/prosody/core/sessionmanager.lua:40: in function 'send' /usr/lib/prosody/modules/mod_message.lua:71: in function '?' /usr/lib/prosody/util/events.lua:78: in function </usr/lib/prosody/util/events.lua:74> (tail call): ? /usr/lib/prosody/core/stanza_router.lua:191: in function 'core_post_stanza' /usr/lib/prosody/modules/mod_pep.lua:77: in function '?' /usr/lib/prosody/util/events.lua:78: in function </usr/lib/prosody/util/events.lua:74> (tail call): ? (tail call): ? ... [C]: in function 'parse' /usr/lib/prosody/util/xmppstream.lua:271: in function 'feed' /usr/lib/prosody/modules/mod_c2s.lua:250: in function 'data' /usr/lib/prosody/modules/mod_c2s.lua:273: in function </usr/lib/prosody/modules/mod_c2s.lua:270> (tail call): ? /usr/lib/prosody/net/server_select.lua:878: in function </usr/lib/prosody/net/server_select.lua:860> [C]: in function 'xpcall' /usr/lib/prosody/../../bin/prosody:387: in function 'loop' /usr/lib/prosody/../../bin/prosody:418: in main chunk [C]: ?

  2. Zash on

    Tracebacks like this shouldn't be fatal, are you sure that prosody is no longer running after this? This traceback suggests that something is trying to write more data than allowed, and that this happens to a connection after it was closed. I don't think mod_pep is at fault here, other than having a lot of data to send. Looks like a net.server_select issue.

    Changes
    • owner Zash
  3. Zash on

    This should fix the traceback: https://hg.prosody.im/0.10/rev/5a07fe977002 However I don't know how it comes to this. Do you have debug logs of the events preceding this traceback?

    Changes
    • tags Milestone-0.10 Status-NeedInfo
  4. Zash on

    Changes
    • title Crash in mod_pep Traceback in server_select on attempt to write to closed connection
    • tags Milestone-0.9 Status-Fixed

New comment

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