#1405 mod_smacks.lua:179: attempt to perform arithmetic on field 'last_acknowledged_stanza' (a nil value)

Reporter Tim Makarios
Owner Nobody
Created
Updated
Stars ★★★ (4)
Tags
  • Priority-Medium
  • Status-Fixed
  • Component-Community
  • Type-Defect
  1. Tim Makarios on

    What steps will reproduce the problem? 1. Checkout revision b2f32b3c6ec1 of the community modules. 2. Restart a prosody server that uses mod_smacks. 3. Use Conversations to log in on a tablet to an account on that server. 4. Use the power button to lock the tablet. 5. Unlock the tablet again. 6. Use Conversations to log out of that account again. What is the expected output? Aug 03 17:51:29 c2s5561d27bfc20 info c2s stream for tim@test.freespoken.nz/Conversations.Zrx7 closed: session closed Aug 03 17:51:29 c2s5561d27bfc20 info Client disconnected: connection closed What do you see instead? Aug 03 17:51:29 c2s5561d27bfc20 info c2s stream for tim@test.freespoken.nz/Conversations.Zrx7 closed: session closed Aug 03 17:51:29 c2s5561d27bfc20 info Client disconnected: connection closed Aug 03 17:51:30 general error Top-level error, please report: .../local/lib/prosody-modules/mod_smacks/mod_smacks.lua:179: attempt to perform arithmetic on field 'last_acknowledged_stanza' (a nil value) Aug 03 17:51:30 general error stack traceback: .../local/lib/prosody-modules/mod_smacks/mod_smacks.lua:179: in function <.../local/lib/prosody-modules/mod_smacks/mod_smacks.lua:172> (tail call): ? (tail call): ? /usr/lib/prosody/util/timer.lua:51: in function '?' /usr/lib/prosody/net/server_select.lua:905: in function </usr/lib/prosody/net/server_select.lua:850> [C]: in function 'xpcall' /usr/bin/prosody:376: in function 'loop' /usr/bin/prosody:407: in main chunk [C]: ? What version of the product are you using? On what operating system? Prosody 0.9.12-2+deb9u2 on Debian Stretch. Conversations 2.5.5+fcr on Android AOSP 7.1.2

  2. bert on

    Can confirm, same issue for me.

  3. Andry on

    I have same problem. my config: admins = { "admin@xxxxxxxxxxx" , "zzzzzz@xxxxxxxxxxx"} use_libevent = true; plugin_paths = { "/usr/lib/prosody/prosody-modules" } modules_enabled = { "roster"; -- Allow users to have a roster. Recommended ;) "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in. "tls"; -- Add support for secure TLS on c2s/s2s connections "private"; -- Private XML storage (for room bookmarks, etc.) "vcard"; -- Allow users to set vCards "version"; -- Replies to server version requests "uptime"; -- Report how long server has been running "time"; -- Let others know the time here on this server "ping"; -- Replies to XMPP pings with pongs "pep"; -- Enables users to publish their mood, activity, playing music and more "register"; -- Allow users to register on this server using a client and change passwords "http_files"; -- Serve static files from a directory over HTTP "posix"; -- POSIX functionality, sends server to background, enables syslog, etc. "carbons"; -- for several client devices "mam"; -- archive "smacks"; -- need if bad internet "http_upload"; -- upload "csi"; -- Client State Indication "privacy"; -- to block specific users or groups "blocking"; -- blocking "cloud_notify"; -- notify "message_logging"; -- save messages in /var/lib/prosody/message_logs "listusers"; -- sudo prosodyctl mod_listusers }; modules_disabled = { "s2s"; -- Handle server-to-server connections }; allow_registration = false; daemonize = true; pidfile = "/var/run/prosody/prosody.pid"; ssl = { key = "/etc/prosody/certs/localhost.key"; certificate = "/etc/prosody/certs/localhost.crt"; } c2s_require_encryption = false c2s_ports = { 1883 } --c2s_ports = { 5322 } s2s_secure_auth = false authentication = "internal_plain" log = { -- Log files (change 'info' to 'debug' for debug logs): info = "/var/log/prosody/prosody.log"; error = "/var/log/prosody/prosody.err"; -- Syslog: { levels = { "error" }; to = "syslog"; }; } VirtualHost "xxxxxxxxxxx" ssl = { key = "/etc/prosody/certs/prosody.key"; certificate = "/etc/prosody/certs/prosody.crt"; } Component "conference.xxxxxxxxxxx" "muc" restrict_room_creation = "local" Include "conf.d/*.cfg.lua" Version is: Hello and welcome to Prosody version 0.9.12 Prosody is using the epoll backend for connection handling cat /var/log/prosody/prosody.err: Jun 22 01:13:07 general error Top-level error, please report: ...ib/prosody/prosody-modules/mod_smacks/mod_smacks.lua:179: attempt to perform arithmetic on field 'last_acknowledged_stanza' (a nil value) Jun 22 01:13:07 general error stack traceback: [C]: in function 'loop' /usr/lib/prosody/net/server_event.lua:797: in function </usr/lib/prosody/net/server_event.lua:796> [C]: in function 'xpcall' /usr/lib/prosody/../../bin/prosody:376: in function 'loop' /usr/lib/prosody/../../bin/prosody:407: in main chunk [C]: ? Thank you for your work and help!

  4. Zash on

    Thanks for the report. This is a community module, not maintained by the Prosody team. If you could try to reach the current maintainer, that'd be great.

    Changes
    • tags Component-Community Status-Accepted
  5. bert on

    The current maintainer seems to be tmolitor https://dev.gajim.org/tmolitor

  6. tmolitor on

    This seems special to prosody 0.9, prosody 0.11 works as expected (no backtraces) I don't know if I can fix this. Do you have any debug logs showing more info?

  7. tmolitor on

    @Andry: Using mod_cloud_notify and disabling s2s communication (by modules_disabled = { "s2s"; }; will effectively disable mod_cloud_notify because push needs s2s connections to the push server (appserver in XEP jargon)

  8. tmolitor on

    I think my latest commit will fix this bug :)

  9. Zash on

    Fixed in https://hg.prosody.im/prosody-modules/rev/58047d6f2b89

    Changes
    • tags Status-Fixed
  10. bert on

    Thank you for your quick fix, Thilo! Logs are looking fine for me now :)

  11. Tim Makarios on

    I can confirm that it appears to be fixed for me now. Thanks tmolitor! (I assume you don't need any debug logs now?)

  12. ibikk on

    I'm running Prosody 0.11 nightly build 52 (2019-07-28, 4b3c129e96f2) with prosody-modules b2f32b3c6ec1 (updated three days ago) and today I got this for the first time: prosody.err: Aug 11 12:29:54 timer error Traceback[timer]: .../lib/prosody-modules-0.11_used/mod_smacks/mod_smacks.lua:179: attempt to perform arithmetic on field 'last_acknowledged_stanza' (a nil value) prosody.err: stack traceback: prosody.err: .../lib/prosody-modules-0.11_used/mod_smacks/mod_smacks.lua:179: in function <.../lib/prosody-modules-0.11_used/mod_smacks/mod_smacks.lua:172> prosody.err: (...tail calls...) prosody.err: [C]: in function 'xpcall' prosody.err: /usr/lib/prosody/util/timer.lua:39: in function 'callback' prosody.err: /usr/lib/prosody/net/server_select.lua:876: in function '?' prosody.err: /usr/lib/prosody/net/server_select.lua:907: in function </usr/lib/prosody/net/server_select.lua:899> prosody.err: /usr/bin/prosody:80: in function 'loop' prosody.err: /usr/bin/prosody:90: in main chunk prosody.err: [C]: in ? So 0.11 seems to be affected as well. Updating to 58047d6f2b89 now.

  13. tmolitor on

    @Tim Makarios: No, no debug log needed unless this bug surfaces again @ibikk: Seems to be something that was timing related, then

New comment

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