Steffen Kaiser
2009-Jun-25 12:46 UTC
[Dovecot] Dovecot v1.2rc6 dict-server socket path problem & pgsql crash
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I find this in the logs: 2009-06-25 14:10:37 IMAP(dvtest) [29566]: Error: net_connect_unix(/usr/local/dovecot-1.2.rc6acl-hook2/var/run/dovecot/dict-server) failed: Permission denied 2009-06-25 14:10:37 IMAP(dvtest) [29566]: Error: acl: dict iteration failed, can't update dict although base_dir is just /var/run/dovecot/ . Dovecot v1.2 changeset: 9157:d14e8b8df025 Conf is attached. I am trying to get ACL's shared dictionary running: acl_shared_dict: proxy::acl dict: acl: pgsql:/usr/local/dovecot-1.2.rc6acl-hook2/etc/dovecot-dict-acl-sql.conf =========== I created the symlink to get map /var/run/dovecot under $install_dir, then I get a crash: 2009-06-25 14:26:53 dict: Error: pgsql: Connect failed to dovecot: could not open certificate file "/root/.postgresql/postgresql.crt": No such file or directory ==> /var/log/postgresql/postgresql-8.1-main.log <=2009-06-25 14:26:53 CEST LOG: could not accept SSL connection: peer did not return a certificate ==> /var/log/dovecot/dovecot-1.2.log <=2009-06-25 14:26:58 dict: Error: pgsql: Connect failed to dovecot: could not open certificate file "/root/.postgresql/postgresql.crt": No such file or directory ==> /var/log/postgresql/postgresql-8.1-main.log <=2009-06-25 14:26:58 CEST LOG: could not accept SSL connection: peer did not return a certificate ==> /var/log/dovecot/dovecot-1.2.log <=2009-06-25 14:27:03 dict: Error: dict sql iterate failed: Not connected to database 2009-06-25 14:27:03 IMAP(dvtest) [29801]: Error: read(/usr/local/dovecot-1.2.rc6acl-hook2/var/run/dovecot/dict-server) failed: Remote disconnected 2009-06-25 14:27:03 IMAP(dvtest) [29801]: Error: acl: dict commit failed 2009-06-25 14:27:03 dovecot: Error: child 29802 (dict) killed with signal 11 (core dumps disabled) My sql-dict.conf is: connect = host=localhost dbname=dovecot user=dovecot # password=pass [CUT samples for quota & expire] # CREATE TABLE user_shares ( # from_user varchar(100) not null, # to_user varchar(100) not null, # primary key (from_user, to_user) # ); map { pattern = shared/shared-boxes/user/$to/$from table = user_shares fields { from_user = $from to_user = $to } } ================= So I changed the connect line into: connect = dbname=dovecot user=dovecot into forcing to use the local socket, which seems to work: 2009-06-25 14:37:24 dict: Info: pgsql: Connected to dovecot but: 2009-06-25 14:37:24 dovecot: Error: child 29986 (dict) killed with signal 11 (core dumped) 2009-06-25 14:37:24 IMAP(dvtest) [29985]: Error: read(/usr/local/dovecot-1.2.rc6acl-hook2/var/run/dovecot/dict-server) failed: Remote disconnected 2009-06-25 14:37:24 IMAP(dvtest) [29985]: Error: acl: dict commit failed ==> /var/log/postgresql/postgresql-8.1-main.log <=2009-06-25 14:37:24 CEST LOG: unexpected EOF on client connection The core's bt full of this latter crash is: Core was generated by `dict'. Program terminated with signal 11, Segmentation fault. #0 0xb7ebe463 in strlen () from /lib/tls/i686/cmov/libc.so.6 (gdb) bt full #0 0xb7ebe463 in strlen () from /lib/tls/i686/cmov/libc.so.6 No symbol table info available. #1 0x08065072 in str_append (str=0x806c168, cstr=0x0) at str.c:91 No locals. #2 0x080509ef in sql_dict_set_query (build=0xbffe8c34) at dict-sql.c:536 dict = (struct sql_dict *) 0x8076e08 sql_fields = <value optimized out> extra_values = <value optimized out> i = 0 prefix = (string_t *) 0x806c168 suffix = (string_t *) 0x806c1d8 __PRETTY_FUNCTION__ = "sql_dict_set_query" #3 0x080518a4 in sql_dict_set (_ctx=0x8080028, key=0x806c032 "shared/shared-boxes/user/dvtest2/dvtest", value=0x806c05a "1") at dict-sql.c:648 build = {dict = 0x8076e08, fields = {arr = {buffer = 0x806c130, element_size = 8}, v = 0x806c130, v_modifiable = 0x806c130}, extra_values = 0xbffe8c50, key1 = 115 's', inc = false} field = {map = 0x8076ed8, value = 0x806c05a "1"} query = <value optimized out> _data_stack_cur_id = 4 ctx = <value optimized out> dict = <value optimized out> map = <value optimized out> values = {arr = {buffer = 0x806c0f0, element_size = 4}, v = 0x806c0f0, v_modifiable = 0x806c0f0} #4 0x08052460 in dict_set (ctx=0x8080028, key=0x806c032 "shared/shared-boxes/user/dvtest2/dvtest", value=0x806c05a "1") at dict.c:168 __PRETTY_FUNCTION__ = "dict_set" #5 0x0804f355 in cmd_set (conn=0x8075bc8, line=0x8075df8 "2\tshared/shared-boxes/user/dvtest2/dvtest\t1") at dict-server.c:288 trans = (struct dict_server_transaction *) 0x8080118 #6 0x0804fbf9 in dict_client_connection_input (conn=0x8075bc8) at dict-server.c:458 _data_stack_cur_id = 3 line = 0x8075df7 "S2\tshared/shared-boxes/user/dvtest2/dvtest\t1" i = 6 ret = <value optimized out> #7 0x0805e2d0 in io_loop_handler_run (ioloop=0x8074a38) at ioloop-epoll.c:208 ctx = <value optimized out> event = (const struct epoll_event *) 0x8074b80 list = (struct io_list *) 0x8075da8 io = (struct io_file *) 0x8075d80 tv = {tv_sec = 2147483, tv_usec = 0} t_id = 2 msecs = <value optimized out> ret = 1 i = 0 j = 0 call = <value optimized out> #8 0x0805d398 in io_loop_run (ioloop=0x8074a38) at ioloop.c:338 No locals. #9 0x0805002f in main () at main.c:129 No locals. - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBSkNxwXWSIuGy1ktrAQKuyAgAn8NU8Y59qGV75VStW2MZQH/7HWLF2z9y 2L41g+NzX5LEw9o/B2ZjlAVEsNhVbqbew2A57uuvOAgV5K8iGgx1yPUjmQT9ud6X uthcsBNQIVGu6ymCN2ufeh3XdNEkrOu1pLJaWkiVQjvc8FOczMp432Jhytc9Hpbo jtMbnFuSbZmg0GX6bqJ50kOsjwme7B7ak/ubVeOwGXHU4MQ8PRXl+TXdVTlnFwKw IUZj8xPB+Gi7nRdsJlkQItp//TgeAJ9lm+i/OWzH420qljADDs9NfrfKd/DDOo6i u6W6I+5FUsJ5N7CHDAvHeDnTHPomPC+bnYAWpRyXF/kMVPaccaFxQw==O2WZ -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: dv.conf.gz Type: application/octet-stream Size: 1486 bytes Desc: URL: <http://dovecot.org/pipermail/dovecot/attachments/20090625/064f9991/attachment-0002.obj>
Steffen Kaiser
2009-Jun-25 13:33 UTC
[Dovecot] Dovecot v1.2rc6 dict-server socket path problem & pgsql crash (crash source found)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 25 Jun 2009, Steffen Kaiser wrote:> 2009-06-25 14:27:03 IMAP(dvtest) [29801]: Error: acl: dict commit failed > 2009-06-25 14:27:03 dovecot: Error: child 29802 (dict) killed with signal > 11 (core dumps disabled)Ah, the crash is resulted from omitting value_field. I changed the conf as follows:> map { > pattern = shared/shared-boxes/user/$to/$from > table = user_sharesvalue_field = dummy> > fields { > from_user = $from > to_user = $to > } > }and added the column "dummy" with type TEXT. Regards, - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBSkN8wnWSIuGy1ktrAQLtqwf9GfO4UEwWrG/1ZdaWlRlHpNtcbewwQ6VK PIfIVnyBosbQR+gDtmRrKEQCs3GUXAuHkdujUJZ9kckivXE/5x0m6ouT/ypeh+TJ z3aWjpKR/Vny7kZ7YccuO0W2+0MMU3I+iQDj1f8g3kIM36UfKMdPWmpxWXioOkE2 HGBboSQ2bLUZhOlVTN4FM16VBDI77meW1dCw9l0TxyNpjbnJXctva4JARVCFU8r+ m3I6pldyZaxcMZpaXQNBJy6SRJjI3BnoV2EpbEIQuGUMakYxrA2cz5nE3+MJ+QFl 5gRKWhjYNLNEQIZd0ltd6AH0lN/D4qRb5DCFMB9BxyVlLFb2vVcD+Q==W3H+ -----END PGP SIGNATURE-----
Timo Sirainen
2009-Jun-28 02:17 UTC
[Dovecot] Dovecot v1.2rc6 dict-server socket path problem & pgsql crash
On Thu, 2009-06-25 at 14:46 +0200, Steffen Kaiser wrote:> 2009-06-25 14:10:37 IMAP(dvtest) [29566]: Error: > net_connect_unix(/usr/local/dovecot-1.2.rc6acl-hook2/var/run/dovecot/dict-server) > failed: Permission denied > 2009-06-25 14:10:37 IMAP(dvtest) [29566]: Error: acl: dict iteration > failed, can't update dict > > although base_dir is just /var/run/dovecot/ .Hmm. Ok, needed a bit larger changes though: http://hg.dovecot.org/dovecot-1.2/rev/eed86bcc33aa> I1 0x08065072 in str_append (str=0x806c168, cstr=0x0) at str.c:91 > No locals. > #2 0x080509ef in sql_dict_set_query (build=0xbffe8c34) at dict-sql.c:536Fixed: http://hg.dovecot.org/dovecot-1.2/rev/e67c9b3e88b0 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090627/473f7e5a/attachment-0002.bin>