#936 mod_mam is not working with the latest trunk nightly build 787

Reporter Kai
Owner Zash
Stars ★ (1)  
  • Priority-Medium
  • Type-Defect
  • Status-NeedInfo
  1. Kai on

    Module mod_mam is not working coorrectly on the latest trunk nightly build 787. Jun 20 12:42:55 c2s16f4068 error Traceback[c2s]: /home/prosody-modules/mod_mam/mod_mam.lua:191: attempt to index local 'item' (a nil value) stack traceback: /home/prosody-modules/mod_mam/mod_mam.lua:191: in function '?' /usr/lib/prosody/util/events.lua:78: in function </usr/lib/prosody/util/events.lua:74> (tail call): ? (tail call): ? (tail call): ? /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:190: in function 'core_post_stanza' /usr/lib/prosody/core/stanza_router.lua:137: in function 'core_process_stanza' /usr/lib/prosody/modules/mod_c2s.lua:253: in function 'func' /usr/lib/prosody/util/async.lua:90: in function </usr/lib/prosody/util/async.lua:88> System: Raspian 8 Client(s): Conversation 1.18.5

  2. Zash on

    Thanks for the report. It looks like something invalid was returned from storage, can you please include information about your storage configuration.

    • tags Status-NeedInfo
    • owner Zash
  3. Kai on

    Thank you so much for your reply. I'm using "mysql Ver 14.14 Distrib 5.5.55, for debian-linux-gnu (armv7l) using readline 6." running on a Raspberry Pi 2 Please let me know if you need further information. Here is a abstract of my config: *************************************** authentication = "internal_plain" storage = { archive2 = "sql"; } storage = "sql" sql = { driver = "MySQL"; database = "prosody"; host = "localhost"; username = "XXXXXXX password = "XXXXXXXX } -- MAM settings default_archive_policy = true; archive_expires_after = "never"; ***************************************

  4. Zash on

    My theory is that you have corrupt data in your database, or possibly that something is corrupted when it's sent to Prosody.There are two things I would like you to try. 1. This query: SELECT * FROM `prosodyarchive` WHERE ExtractValue(`value`, '/') IS NULL I'm no MySQL expert, but I believe this should return rows that could be corrupted. 2. This patch: diff -r 45be94611593 plugins/mod_storage_sql.lua --- a/plugins/mod_storage_sql.lua Tue Jun 13 20:14:06 2017 +0200 +++ b/plugins/mod_storage_sql.lua Fri Jun 23 03:03:00 2017 +0200 @@ -356,7 +356,7 @@ function archive_store:find(username, qu return function() local row = result(); if row ~= nil then - return row[1], deserialize(row[2], row[3]), row[4], row[5]; + return row[1], assert(deserialize(row[2], row[3])), row[4], row[5]; end end, total; end The above patch should produce a traceback if there's a problem with parsing data from the database.

  5. Zash on

    Forgot to tag with needinfo

    • tags

New comment