[Dovecot] Connection leak in sqlpool for ACL Dict Postgres in v2.1.15 (14907:b96df105ec55) and v2.2.beta1 (15857:07dfd4391d22)

Timo Sirainen tss at iki.fi
Fri Feb 22 12:15:03 EET 2013


On 20.2.2013, at 16.06, Steffen Kaiser <skdovecot at smail.inf.fh-brs.de> wrote:

> I'm using a postgres dict for ACL, when when use deleteacl or setacl I get a "not connected" error and (v2.2)
> Panic: file driver-pgsql.c: line 84 (driver_pgsql_set_state): assertion failed: (state == SQL_DB_STATE_BUSY || db->cur_result == NULL)
> and a rawdump eventually.
> 
> You can trigger the error with the "dict" socket easily:
> 
> while true; do
> ( echo -en "H2\t0\t0\t\tacl\nI1\tshared/shared-boxes/\n"
>   sleep 1
> ) | socat - unix:/var/run/dovecot2.2/dict
> done

Thanks for the easy test :) I've heard of these crashes for a quite a long time but haven't really figured out how to reproduce them. Also I always thought the bug was in driver-pgsql code, while it was really in dict-sql code. Fixed: http://hg.dovecot.org/dovecot-2.1/rev/0e0fd4b5a582

Although of course the driver-pgsql code is also quite ugly and complex and I wouldn't be surprised if there were some bugs in its error handling code paths. But I guess it can be left for later..




More information about the dovecot mailing list