Steffen Kaiser
2013-Jan-24 10:44 UTC
[Dovecot] Again ACL Postgres dict trouble, no update and raw backtrace
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I have ACL-dict-postgres trouble again. Eventually a session does not update the ACL dictionary no longer. I execute (for testing) this script: for a in $(seq 1 ${1-4}); do echo 3-$a deleteAcl Junk dvtest1 sleep 30 echo 3-$a SetAcl Junk dvtest1 kxilrsc sleep 30 done It works two loops 2013-01-24 11:07:59 dict: Info: pgsql(localhost): Connected to database dovecot 2013-01-24 11:07:59 dict: Info: pgsql(localhost): Connected to database dovecot 2013-01-24 11:07:59 dict: Info: pgsql(localhost): Connected to database dovecot 2013-01-24 11:08:59 dict: Info: pgsql(localhost): Connected to database dovecot 2013-01-24 11:09:29 dict: Info: pgsql(localhost): Connected to database dovecot , then dies with: 2013-01-24 11:09:59 dict: Error: dict sql iterate failed: Not connected to database 2013-01-24 11:09:59 IMAP(dvtest6) [22740]: Error: acl: dict iteration failed, can't update dict 2013-01-24 11:10:02 IMAP(dvtest6) [22740]: Info: Connection closed in=159 out=572 2013-01-24 11:11:00 dict: Panic: file driver-pgsql.c: line 84 (driver_pgsql_set_state): assertion failed: (state == SQL_DB_STATE_BUSY || db->cur_result == NULL) 2013-01-24 11:11:00 dict: Error: Raw backtrace: /usr/local/dovecot-2.1.13/lib/dovecot/libdovecot.so.0(+0x4881a) [0x7f465693181a] -> /usr/local/dovecot-2.1.13/lib/dovecot/libdovecot.so.0(+0x48866) [0x7f4656931866] -> /usr/local/dovecot-2.1.13/lib/dovecot/libdovecot.so.0(i_error+0) [0x7f4656904f7f] -> dovecot2.1/dict() [0x40aa36] -> dovecot2.1/dict() [0x40aa91] -> dovecot2.1/dict() [0x40bed3] -> dovecot2.1/dict() [0x409504] -> dovecot2.1/dict(sql_db_cache_deinit+0x20) [0x408a60] -> dovecot2.1/dict(main+0x169) [0x405a59] -> /lib/libc.so.6(__libc_start_main+0xfd) [0x7f465637cc8d] -> dovecot2.1/dict() [0x404bb9] 2013-01-24 11:11:00 dict: Fatal: master: service(dict): child 22744 killed with signal 6 (core not dumped) There are two different Panic messages: Panic: file driver-pgsql.c: line 587: unreached Panic: file driver-pgsql.c: line 84 (driver_pgsql_set_state): assertion failed: (state == SQL_DB_STATE_BUSY || db->cur_result == NULL) I have ulimit -c unlimited set, at start up Dovecot says: 2013-01-23 16:33:20 master: Info: Dovecot v2.1.13 (6eabf0c738d7) starting up but I do not get no core dumps. The last SQL statement executed by Posgres is (log level debug5): 2013-01-24 11:09:59 CET DEBUG: StartTransactionCommand 2013-01-24 11:09:59 CET STATEMENT: SELECT dummy,to_user,from_user FROM user_shares 2013-01-24 11:09:59 CET DEBUG: StartTransaction 2013-01-24 11:09:59 CET STATEMENT: SELECT dummy,to_user,from_user FROM user_shares 2013-01-24 11:09:59 CET DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 2013-01-24 11:09:59 CET STATEMENT: SELECT dummy,to_user,from_user FROM user_shares 2013-01-24 11:09:59 CET LOG: statement: SELECT dummy,to_user,from_user FROM user_shares 2013-01-24 11:09:59 CET DEBUG: CommitTransactionCommand 2013-01-24 11:09:59 CET STATEMENT: SELECT dummy,to_user,from_user FROM user_shares 2013-01-24 11:09:59 CET DEBUG: CommitTransaction 2013-01-24 11:09:59 CET STATEMENT: SELECT dummy,to_user,from_user FROM user_shares 2013-01-24 11:09:59 CET DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: 2013-01-24 11:09:59 CET STATEMENT: SELECT dummy,to_user,from_user FROM user_shares 2013-01-24 11:09:59 CET LOG: duration: 0.205 ms Dovecot conf: SQL /usr/local/dovecot-2.1.13/etc/dovecot/dovecot-dict-sql.conf.ext connect = host=localhost dbname=dovecot user=dovecot pass=XYZ # CREATE TABLE user_shares ( # from_user varchar(100) not null, # to_user varchar(100) not null, # dummy char(1) DEFAULT '1', -- always '1' currently # primary key (from_user, to_user) # ); # COMMENT ON TABLE user_shares IS 'User from_user shares folders to user to_user.'; # # CREATE INDEX to_user # ON user_shares (to_user); -- because we always search for to_user # # CREATE TABLE anyone_shares ( # from_user varchar(100) not null, # dummy char(1) DEFAULT '1', -- always '1' currently # primary key (from_user) # ); # COMMENT ON TABLE anyone_shares IS 'User from_user shares folders to anyone.'; map { pattern = shared/shared-boxes/user/$to/$from table = user_shares value_field = dummy fields { from_user = $from to_user = $to } } map { pattern = shared/shared-boxes/anyone/$from table = anyone_shares value_field = dummy fields { from_user = $from } } # 2.1.13 (6eabf0c738d7): /usr/local/dovecot-2.1.13/etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.6 auth_cache_size = 10 M auth_debug = yes auth_mechanisms = plain login auth_verbose = yes base_dir = /var/run/dovecot2.1/ deliver_log_format = msgid=%m: %$ %p/%w "%f" "%s" dict { acl = pgsql:/usr/local/dovecot-2.1.13/etc/dovecot/dovecot-dict-sql.conf.ext quota = pgsql:/usr/local/dovecot-2.1.13/etc/dovecot/dovecot-dict-sql.conf.ext } instance_name = dovecot2.1 lda_mailbox_autocreate = yes lmtp_save_to_detail_mailbox = yes log_path = /var/log/dovecot/dovecot2.1.log log_timestamp = "%F %H:%M:%S " mail_debug = yes mail_gid = vmail mail_log_prefix = "%Us(%u) [%p]: " mail_plugins = " quota notify mail_log zlib acl" mail_uid = vmail managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave imapflags namespace { list = children location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u prefix = users.%%u. separator = . type = shared } namespace inbox { inbox = yes location mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = /usr/local/dovecot-2.1.13/etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { acl = vfile acl_shared_dict = proxy::acl antispam_allow_append_to_spam = true antispam_backend = spool2dir antispam_spam = SPAM+ReportAsSPAM antispam_spool2dir_notspam = /tmp/spamspool/%%020lu-%%05lu-%u-H antispam_spool2dir_spam = /tmp/spamspool/%%020lu-%%05lu-%u-S antispam_trash = trash;TRASH;Trash;spam;SPAM;Spam;junk;JUNK;Junk;Deleted Items;Deleted Messages;Gel&APY-schte Elemente;Gel&APY-schte Objekte;Junk E-mail;Junk-E-Mail;INBOX.Trash;INBOX.TRASH;INBOX.trash mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename mail_log_fields = uid box msgid size vsize from subject quota = dict:User quota::proxy::quota quota_rule = *:storage=300MB quota_rule2 = Trash:storage=+30M recipient_delimiter = + sieve = ~/.dovecot.sieve sieve_dir = ~/sieve sieve_extensions = +imapflags sieve_max_actions = 0 sieve_quota_max_storage = 3M } protocols = imap pop3 lmtp sieve quota_full_tempfail = yes service auth { unix_listener auth-userdb { mode = 0766 user = vmail } } service dict { unix_listener dict { group = vmail mode = 0660 user = vmail } } service doveadm { unix_listener doveadm-server { mode = 0666 } } service managesieve-login { inet_listener sieve { port = 4190 } inet_listener sieve_deprecated { port = 2000 } } ssl_ca = </etc/ssl/certs/ca.crt ssl_cert = </etc/ssl/certs/imap.pem ssl_key = </etc/ssl/private/imap.key userdb { driver = prefetch } userdb { args = /usr/local/dovecot-2.1.13/etc/dovecot/dovecot-ldap.conf.ext default_fields = home=/home/%u driver = ldap } verbose_proctitle = yes verbose_ssl = yes protocol lmtp { mail_plugins = " quota notify mail_log zlib acl quota sieve" } protocol lda { mail_plugins = " quota notify mail_log zlib acl quota sieve" } protocol imap { mail_plugins = " quota notify mail_log zlib acl imap_quota imap_zlib imap_acl antispam" } - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUQEQdF3r2wJMiz2NAQL62AgAsXfP01TYvGjsu9Tcny8vCHMEOhBw0QVO rvx7YDdYgyVLb/JwHQseq5XGPzRHh6PFn5HrrUFpnG87E52ZKTH1rkwYiuyM8fso HAsUM0mlz9fGGPucMa9HoTbw5turbqbjVags8x6Om4W4sgp+RITd4UZq/Qcu/ShF jfI5KDEK9bnPh9WwVKV6Yfd/1auZH+SCacb69Bb/cyVDiwbxOUTAEZikgWYgFOG2 /B1KzUPrjtumAS9myswIJxEG/4DmEt0In5fgQLM7cDdbGQl400JzR2rEa4bd3C1b 3DImA3J/YUfLpuqGS60rhx1rpSfad61Us2dh5kGgbswtbwKj2FtnTg==Jpqg -----END PGP SIGNATURE-----
Apparently Analagous Threads
- possible patch for ACL SQL ERROR: duplicate key value violates unique constraint "user_shares_pkey"
- Acl sql dict error, dict crashes
- sharing a folder with all users in a domain
- Dovecot v1.2rc6 dict-server socket path problem & pgsql crash
- need help with shared mailboxes