Re: [Dovecot] dict Panic after upgrade to 2.1.7

2012-07-03 Thread ckubu
hallo,

> > dovecot log entries:
> > Jun 23 23:19:10 mx dovecot: dict: Panic: file driver-pgsql.c: line 84
> > (driver_pgsql_set_state): assertion failed: (state == SQL_DB_STATE_BUSY
> > || db-
> > 
> >> cur_result == NULL)
> 
> This is clearly a bug, but I don't really see why it's happening. It would
> be helpful if you could get a gdb backtrace:
> http://dovecot.org/bugreport.html

at all, i got 4 core dump files.

Jul  3 15:16:57 mx dovecot: dict: Fatal: master: service(dict): child 11902 
killed with signal 6 (core dumped)
:qJul  3 15:22:59 mx dovecot: dict: Panic: file driver-pgsql.c: line 84 
(driver_pgsql_set_state): assertion failed: (state == 
SQL_DB_STATE_BUSY || db->cur_result == NULL)
Jul  3 15:22:59 mx dovecot: dict: Error: Raw backtrace: 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(+0x4478a) 
[0x7f6ab8f1078a] -> 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(+0x447d6) [0x7f6ab8f107d6] 
-> 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(i_error+0) 
[0x7f6ab8ee75ef] -> dovecot/dict() [0x40a9a6] -> dovecot/dict() 
[0x40aa01] -> dovecot/dict() [0x40be43] -> dovecot/dict() [0x409474] -> 
dovecot/dict(sql_db_cache_deinit+0x20) [0x4089d0] -> 
dovecot/dict(main+0x169) [0x4059f9] -> /lib/libc.so.6(__libc_start_main+0xfd) 
[0x7f6ab8960c8d] -> dovecot/dict() [0x404b59]
Jul  3 15:22:59 mx dovecot: dict: Panic: file driver-pgsql.c: line 84 
(driver_pgsql_set_state): assertion failed: (state == 
SQL_DB_STATE_BUSY || db->cur_result == NULL)
Jul  3 15:22:59 mx dovecot: dict: Error: Raw backtrace: 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(+0x4478a) 
[0x7f2d4160c78a] -> 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(+0x447d6) [0x7f2d4160c7d6] 
-> 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(i_error+0) 
[0x7f2d415e35ef] -> dovecot/dict() [0x40a9a6] -> dovecot/dict() 
[0x40aa01] -> dovecot/dict() [0x40be43] -> dovecot/dict() [0x409474] -> 
dovecot/dict(sql_db_cache_deinit+0x20) [0x4089d0] -> 
dovecot/dict(main+0x169) [0x4059f9] -> /lib/libc.so.6(__libc_start_main+0xfd) 
[0x7f2d4105cc8d] -> dovecot/dict() [0x404b59]
Jul  3 15:22:59 mx dovecot: dict: Panic: file driver-pgsql.c: line 84 
(driver_pgsql_set_state): assertion failed: (state == 
SQL_DB_STATE_BUSY || db->cur_result == NULL)
Jul  3 15:22:59 mx dovecot: dict: Error: Raw backtrace: 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(+0x4478a) 
[0x7fca2e05c78a] -> 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(+0x447d6) [0x7fca2e05c7d6] 
-> 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(i_error+0) 
[0x7fca2e0335ef] -> dovecot/dict() [0x40a9a6] -> dovecot/dict() 
[0x40aa01] -> dovecot/dict() [0x40be43] -> dovecot/dict() [0x409474] -> 
dovecot/dict(sql_db_cache_deinit+0x20) [0x4089d0] -> 
dovecot/dict(main+0x169) [0x4059f9] -> /lib/libc.so.6(__libc_start_main+0xfd) 
[0x7fca2daacc8d] -> dovecot/dict() [0x404b59]
Jul  3 15:22:59 mx dovecot: dict: Fatal: master: service(dict): child 12033 
killed with signal 6 (core dumped)
Jul  3 15:22:59 mx dovecot: dict: Fatal: master: service(dict): child 12340 
killed with signal 6 (core dumped)
Jul  3 15:22:59 mx dovecot: dict: Fatal: master: service(dict): child 11847 
killed with signal 6 (core dumped)

i will give you the gdb backtrace from the first dump:

gdb /usr/local/dovecot-2.1.7/libexec/dovecot/dict core.dict.11902
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/local/dovecot-2.1.7/libexec/dovecot/dict...done.
Reading symbols from 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0...done.
Loaded symbols for /usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0
Reading symbols from /usr/lib/libpq.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpq.so.5
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /usr/lib/libssl.so.0.9.8...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libssl.so.0.9.8
Reading symbols from /usr/lib/libcrypto.so.0.9.8...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.8
Reading symbols from /usr/lib/libkrb5.so.3...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libkrb5.so.3
Reading symbols from /lib/libcom_err.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libcom_err.so.2
Reading s

Re: [Dovecot] dict Panic after upgrade to 2.1.7

2012-07-02 Thread Timo Sirainen
On 24.6.2012, at 13.21, ckubu wrote:

> dovecot log entries:
> Jun 23 23:19:10 mx dovecot: dict: Panic: file driver-pgsql.c: line 84 
> (driver_pgsql_set_state): assertion failed: (state == SQL_DB_STATE_BUSY || db-
>> cur_result == NULL)

This is clearly a bug, but I don't really see why it's happening. It would be 
helpful if you could get a gdb backtrace:
http://dovecot.org/bugreport.html



Re: [Dovecot] dict Panic after upgrade to 2.1.7

2012-06-27 Thread ckubu
hallo,

> after upgrade my mailsystem to dovecot version 2.1.7, dovecot doesn't work
> properly. something went wrong in dict service connecting the postgres
> backend. that happens not on every connection. the db connection data are
> correct, no difference connecting via tcp or linux socket.
> 
> dovecot log entries:
> Jun 23 23:19:10 mx dovecot: dict: Panic: file driver-pgsql.c: line 84
> (driver_pgsql_set_state): assertion failed: (state == SQL_DB_STATE_BUSY ||
> db-
> 
> >cur_result == NULL)
> 
> Jun 23 23:19:10 mx dovecot: dict: Error: Raw backtrace:
> /usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(+0x4478a)
> [0x7ffc7d8e578a] ->
> /usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(+0x447d6)
> [0x7ffc7d8e57d6] ->
> /usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(i_error+0)
> [0x7ffc7d8bc5ef] -> dovecot/dict() [0x40a9a6] -> dovecot/dict() [0x40aa01]
> -> dovecot/dict() [0x40be43] -> dovecot/dict() [0x409474] ->
> dovecot/dict(sql_db_cache_deinit+0x20) [0x4089d0] ->
> dovecot/dict(main+0x169) [0x4059f9] ->
> /lib/libc.so.6(__libc_start_main+0xfd) [0x7ffc7d335c8d] -> dovecot/dict()
> [0x404b59]
> Jun 23 23:19:10 mx dovecot: dict: Fatal: master: service(dict): child 13812
> killed with signal 6 (core dumps disabled)
> 
> Jun 23 23:23:09 mx dovecot: dict: Error: dict sql iterate failed: Not
> connected to database
> Jun 23 23:23:09 mx dovecot: pop3(x...@yyy.zz): Error: acl: dict iteration
> failed, can't update dict
> Jun 23 23:23:09 mx dovecot: dict: Error: dict sql iterate failed: Not
> connected to database
> Jun 23 23:23:09 mx dovecot: pop3(x...@yyy.zz): Error: acl: dict iteration
> failed, can't update dict
> Jun 23 23:23:17 mx dovecot: dict: Error: dict sql lookup failed: Not
> connected to database
> Jun 23 23:23:17 mx dovecot: imap(x...@yyy.zz): Error: Internal quota
> calculation error
> Jun 23 23:23:19 mx dovecot: dict: Error: dict sql lookup failed: Not
> connected to database
> Jun 23 23:23:40 mx dovecot: dict: Error: dict sql lookup failed: Not
> connected to database
> 
> maybe i have missconfigured the dovecot system, but i don't find the
> mistake. can anybody give me a hint ?

It seem's, that these errors occcures, if acl support ist activated. i 
deactivated acl support last night for a while, and no such errors occured. I 
can't make long term test, because that is a produktion system and  i switched 
back to version 2.0.9, which runs with acl support but without that errors .

bw
Christoph

> 
> - doveconf -n
> # 2.1.7: /usr/local/dovecot-2.1.7/etc/dovecot/dovecot.conf
> # OS: Linux 2.6.32-5-vserver-amd64 x86_64 Debian 6.0.5 ext3
> auth_mechanisms = plain login digest-md5 cram-md5 apop
> auth_socket_path = /var/run/dovecot/auth-userdb
> auth_username_translation = %@
> auth_verbose = yes
> auth_verbose_passwords = plain
> base_dir = /var/run/dovecot/
> dict {
>   acl = pgsql:/usr/local/dovecot/etc/dovecot/sql-dict.conf.ext
>   expire = pgsql:/usr/local/dovecot/etc/dovecot/sql-dict.conf.ext
>   quota = pgsql:/usr/local/dovecot/etc/dovecot/sql-dict.conf.ext
> }
> disable_plaintext_auth = no
> first_valid_gid = 5000
> first_valid_uid = 5000
> hostname = mx.warenform.de
> last_valid_gid = 5000
> last_valid_uid = 5000
> listen = 178.63.63.151 2a01:4f8:121:c5::2
> mail_gid = vmail
> mail_location = maildir:/var/vmail/%d/%n/Maildir
> mail_plugins = autocreate quota expire 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
> namespace {
>   list = children
>   location = maildir:/var/vmail/%%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u
>   prefix = shared/%%u/
>   separator = /
>   subscriptions = no
>   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 Spam {
> special_use = \Junk
>   }
>   mailbox Trash {
> special_use = \Trash
>   }
>   prefix =
>   separator = /
>   type = private
> }
> passdb {
>   args = /usr/local/dovecot/etc/dovecot/sql-connect.conf.ext
>   driver = sql
> }
> plugin {
>   acl = vfile
>   acl_shared_dict = proxy::acl
>   autocreate = Spam
>   autocreate2 = Sent
>   autocreate3 = Trash
>   autocreate4 = Drafts
>   autosubscribe = Spam
>   autosubscribe2 = Sent
>   autosubscribe3 = Trash
>   autosubscribe4 = Drafts
>   expire = Trash
>   expire2 = Trash.*
>   expire3 = Spam
>   expire_dict = proxy::expire
>   quota = dict:User quota::proxy::quota
>   quota_rule = *:storage=1G
>   quota_rule2 = Trash:storage=+200M
>   quota_warning = storage=95%% quota-warning 95 %u
>   quota_warning2 = storage=80%% quota-warning 80 %u
>   recipient_delimiter =
>   sieve = ~/.dovecot.sieve
>  

[Dovecot] dict Panic after upgrade to 2.1.7

2012-06-24 Thread ckubu
Hello,

after upgrade my mailsystem to dovecot version 2.1.7, dovecot doesn't work 
properly. something went wrong in dict service connecting the postgres 
backend. that happens not on every connection. the db connection data are 
correct, no difference connecting via tcp or linux socket. 

dovecot log entries:
Jun 23 23:19:10 mx dovecot: dict: Panic: file driver-pgsql.c: line 84 
(driver_pgsql_set_state): assertion failed: (state == SQL_DB_STATE_BUSY || db-
>cur_result == NULL)
Jun 23 23:19:10 mx dovecot: dict: Error: Raw backtrace: 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(+0x4478a) 
[0x7ffc7d8e578a] -> 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(+0x447d6) 
[0x7ffc7d8e57d6] -> 
/usr/local/dovecot-2.1.7/lib/dovecot/libdovecot.so.0(i_error+0) 
[0x7ffc7d8bc5ef] -> dovecot/dict() [0x40a9a6] -> dovecot/dict() [0x40aa01] -> 
dovecot/dict() [0x40be43] -> dovecot/dict() [0x409474] -> 
dovecot/dict(sql_db_cache_deinit+0x20) [0x4089d0] -> dovecot/dict(main+0x169) 
[0x4059f9] -> /lib/libc.so.6(__libc_start_main+0xfd) [0x7ffc7d335c8d] -> 
dovecot/dict() [0x404b59]
Jun 23 23:19:10 mx dovecot: dict: Fatal: master: service(dict): child 13812 
killed with signal 6 (core dumps disabled)

Jun 23 23:23:09 mx dovecot: dict: Error: dict sql iterate failed: Not 
connected to database
Jun 23 23:23:09 mx dovecot: pop3(x...@yyy.zz): Error: acl: dict iteration 
failed, can't update dict
Jun 23 23:23:09 mx dovecot: dict: Error: dict sql iterate failed: Not 
connected to database
Jun 23 23:23:09 mx dovecot: pop3(x...@yyy.zz): Error: acl: dict iteration 
failed, can't update dict
Jun 23 23:23:17 mx dovecot: dict: Error: dict sql lookup failed: Not connected 
to database
Jun 23 23:23:17 mx dovecot: imap(x...@yyy.zz): Error: Internal quota 
calculation error
Jun 23 23:23:19 mx dovecot: dict: Error: dict sql lookup failed: Not connected 
to database
Jun 23 23:23:40 mx dovecot: dict: Error: dict sql lookup failed: Not connected 
to database

maybe i have missconfigured the dovecot system, but i don't find the mistake. 
can anybody give me a hint ?

best wiches
christoph

- doveconf -n
# 2.1.7: /usr/local/dovecot-2.1.7/etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-vserver-amd64 x86_64 Debian 6.0.5 ext3
auth_mechanisms = plain login digest-md5 cram-md5 apop
auth_socket_path = /var/run/dovecot/auth-userdb
auth_username_translation = %@
auth_verbose = yes
auth_verbose_passwords = plain
base_dir = /var/run/dovecot/
dict {
  acl = pgsql:/usr/local/dovecot/etc/dovecot/sql-dict.conf.ext
  expire = pgsql:/usr/local/dovecot/etc/dovecot/sql-dict.conf.ext
  quota = pgsql:/usr/local/dovecot/etc/dovecot/sql-dict.conf.ext
}
disable_plaintext_auth = no
first_valid_gid = 5000
first_valid_uid = 5000
hostname = mx.warenform.de
last_valid_gid = 5000
last_valid_uid = 5000
listen = 178.63.63.151 2a01:4f8:121:c5::2
mail_gid = vmail
mail_location = maildir:/var/vmail/%d/%n/Maildir
mail_plugins = autocreate quota expire 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
namespace {
  list = children
  location = maildir:/var/vmail/%%d/%%n/Maildir:INDEX=~/Maildir/shared/%%u
  prefix = shared/%%u/
  separator = /
  subscriptions = no
  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 Spam {
special_use = \Junk
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = 
  separator = /
  type = private
}
passdb {
  args = /usr/local/dovecot/etc/dovecot/sql-connect.conf.ext
  driver = sql
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  autocreate = Spam
  autocreate2 = Sent
  autocreate3 = Trash
  autocreate4 = Drafts
  autosubscribe = Spam
  autosubscribe2 = Sent
  autosubscribe3 = Trash
  autosubscribe4 = Drafts
  expire = Trash
  expire2 = Trash.*
  expire3 = Spam
  expire_dict = proxy::expire
  quota = dict:User quota::proxy::quota
  quota_rule = *:storage=1G
  quota_rule2 = Trash:storage=+200M
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  recipient_delimiter = 
  sieve = ~/.dovecot.sieve
  sieve_before = /usr/local/dovecot/etc/dovecot/sieve/move-spam.sieve
  sieve_dir = ~/sieve
  sieve_global_dir = /usr/local/dovecot/etc/dovecot/sieve/global/
}
postmaster_address = ad...@warenform.de
protocols = imap pop3 sieve lmtp
service auth {
  unix_listener /var/spool/postfix/private/dovecot-auth {
group = postfix
mode = 0666
user = postfix
  }
  unix_listener auth-userdb {
group = vmail
mode = 0600
user = vmail
  }
}
service dict {
  unix_listener dict {
mode = 0600
user = vmail
  }
}
service imap-logi