Underscore in SERVICES-names can cause deadlocks.
Eric.Luyten at vub.ac.be
Wed Mar 21 08:37:59 EDT 2012
On Tue, March 20, 2012 5:07 pm, Robert Linden wrote:
> I just encountered a rather tricky problem and maybe somebody can benefit
> from the solution.
> If one wants to have multiple instances of imapd, for example to support IMAP
> and IMAPS, or to listen on multiple interfaces (but not all/0.0.0.0, or if
> one needs different configurations for the separate services), then the
> recommended way is to just have multiple lines in the SERVICES section.
> The name of the service (first parameter in the line) is also used in the
> filename of a lockfile, that needs to be unique for each service, otherwise a
> deadlock can occur, where multiple services want to hold a lock on the same
> file. The result will be 1-2 minute long freezes on any connection attempt.
> This problem was already described by Tuomas Toropainen in this mail:
> The tricky part is, that not all names that look distinct really are treated
> differently by cyrus. Notable example: "imap" and "imap_remote" result in the
> same lockfile (/var/imapd/socket/imap-0.lock), because the name is truncated
> at the '_'. The '_' doesn't seem to be illegal per se, because cyrus does not
> complain and the service runs ok most of the time, i.e. as long as no
> concurrent connections are created on the 2 interfaces to trigger the race-
> Maybe other characters cause this problem as well, so if one is unsure about
> this it would be best to just stick to alphanumeric characters.
The hyphen ("-") is also known to create issues.
I reported this to info-cyrus on Wed, October 27, 2010
Eric Luyten, Computing Centre VUB/ULB.
More information about the Info-cyrus