sympa
sympa copied to clipboard
Moderated message lost if someone clicks on "distribute" link twice in quick succession,
Version
6.2.72
Installation method
My own rpm, derived from "official" rpm for RHEL 9.
Expected behavior
Moderation messages contain some some text of the form:
To distribute the attached message in list ucam-language-sciences:
https://lists.cam.ac.uk/sympa/distribute/ucam-language-sciences/e9f3e269192343c654798f6681a91f37
If someone clicks on that link twice in rapid succession, I would expect the first click to distribute the message, and the second click to generate an error page.
Actual behavior
The user reported the error page, but the message was not distributed.
I did find the following in /var/spool/sympa/moderation/
-rw-r----- 1 sympa sympa 17859 Sep 2 09:29 [email protected]_e9f3e269192343c654798f6681a91f37.distribute
I don't know what these ".distribute" files are used for, but this is the only file with that suffix in /var/spool/sympa/moderation on a busy server, and it is still there 7 hours later. So I think and hope that this might be a smoking gun for whatever went wrong.
Additional information
Here are the two incoming do_distribute requests for e9f3e269192343c654798f6681a91f37
Sep 2 09:29:36 lists-1 wwsympa[3097526]: info main::do_distribute(e9f3e269192343c654798f6681a91f37) [robot lists.cam.ac.uk] [session 95252205934297] [client 10.249.206.106] [user [email protected]] [list ucam-language-sciences]
Sep 2 09:29:40 lists-1 wwsympa[3097453]: info main::do_distribute(e9f3e269192343c654798f6681a91f37) [robot lists.cam.ac.uk] [session 95252205934297] [client 10.249.206.106] [user [email protected]] [list ucam-language-sciences]
sympa_msg generated the following error at 09:29:40
Sep 2 09:29:40 lists-1 sympa_msg[1946661]: err main::#247 > Sympa::Spindle::spin#95 > Sympa::Spindle::DoCommand::_twist#120 > Sympa::Spindle::spin#95 > Sympa::Request::Handler::distribute::_twist#61 Unable to find message with key
That is the only time that "Unable to find message with key" appears in my logs in the last 28 days. (I have lots of "Unable to find message with" from wwsympa, but nothing similar from sympa_msg).
This feels very much like a race condition when wwsympa and sympa_msg are trying to work on the same moderation files at the same time. I hope that the single "Unable to find message with key" error combined with the single distribute file in /var/spool/sympa/moderation/ will be enough to narrow down a cause.
I will attach the full logs as a text attachment to this ticket