Skip to Content.
Sympa Menu

en - RE: [sympa-users] Sympa duplicates emails sent to lists

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Steve Shipway <address@concealed>
  • To: "Lorenz, Sabine (SCC)" <address@concealed>, "address@concealed" <address@concealed>
  • Subject: RE: [sympa-users] Sympa duplicates emails sent to lists
  • Date: Wed, 18 Mar 2015 21:09:09 +0000

I’ve not seen this before; it looks as if two bulk threads are picking up the same incoming message at precisely the same time, and so it is being processed twice.

 

I suppose you could limit your Sympa to a single bulk delivery thread in the Sympa.conf, but that is just a workaround.  The real problems seems to be that there is a race condition because the locking is not working.

 

The locking is done in the database, using hostname+PID which is unique between the threads.  Possibly this is failing, though that should be caught. 

 

The code around line 137 of next() in Bulk.pm seems to catch the race condition if two threads attempt to lock the same message, so it is unclear how two threads could grab the same thing.   

 

Does your host have a very long name, IE longer than 30 characters?  The locking field in the database is only 30 characters long,  and though tools.pm:get_lockname() seems to use substr to proper effect,  this may not be the case in 6.0.1 and we’re getting overflow and collisions.

 

I’ve not seen Sympa 6.0.1 – we’re using 6.1.23 here – and the things I can see in the code may not have been there in your version!

 

·         Check lib/tools.pm and make sure get_lockname() truncates hostname() to 20 characters.

·         Check the database to make sure the field lock_bulkmailer in bulkmailer_table is at least varacher(30).  There’s no harm in making it longer if you want to.

·         Check lib/Bulk.pm to make sure that function next() correctly uses “AND lock_bulkmailer IS NULL” in the UPDATE statement to avoid race conditions; the following code should also check $sth->rows and return undef if no rows were affected.

 

It may be that you will need to update to a later version to avoid this; however if the problem is this, you might be able to work around it simply by making the lock_bulkmailer field into a varchar(60).

 

Hope this helps…

 

Steve

 

Steve Shipway

address@concealed

(GNU Terry Pratchett)

 

From: address@concealed [mailto:address@concealed] On Behalf Of Lorenz, Sabine (SCC)
Sent: Wednesday, 18 March 2015 10:18 p.m.
To: address@concealed
Subject: [sympa-users] Sympa duplicates emails sent to lists

 

Hi all,

 

we have a problem in our system (Sympa 6.0.1 as Debian package; exim4):

 

In some cases Sympa duplicates emails sent to lists so that the subscribers get the email twice.

This does not appear in all cases but only in some cases.



Hermann von Helmholtz Platz 1
76344 Eggenstein-Leopoldshafen

E-Mail: address@concealed

www.kit.edu/scc

KIT - Universität des Landes Baden-Württemberg und
nationales Großforschungszentrum in der Helmholtz-Gemeinschaft

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature




Archive powered by MHonArc 2.6.19+.

Top of Page