Re: [Dovecot] bug report: doveadm assertion failure "mail_index_map_lookup_seq_range"

2013-12-08 Thread Timo Sirainen
On 6.12.2013, at 15.33, email-from-bobby  wrote:

> A negated subject search on an empty folder causes an assertion failure in 
> doveadm. To reproduce:
> 
> bash-3.2# doveadm mailbox create -u ephraim "Freshly Empty"
> bash-3.2# doveadm search -u ephraim mailbox "Freshly Empty" NOT subject 
> '***JUNK MAIL***'
> doveadm(ephraim): Panic: file mail-index-map.c: line 548 
> (mail_index_map_lookup_seq_range): assertion failed: (first_uid <= last_uid\
> )

Fixed: http://hg.dovecot.org/dovecot-2.2/rev/d837bd49ddee

> bash-3.2# /Applications/Server.app/Contents/ServerRoot/usr/sbin/dovecotd -n
> # 2.2.5: /Library/Server/Mail/Config/dovecot/dovecot.conf

But note that if you build Dovecot yourself, you lose several Apple-patched 
functionality, at least unless you add the patches yourself (AFAIK not yet 
publicly available).



Re: [Dovecot] bug report: doveadm assertion failure "mail_index_map_lookup_seq_range"

2013-12-08 Thread Ephraim Vishniac
Since reporting this (from the wrong account, sorry), I've tried to 
investigate whether the problem exists in 2.2.9. While building 2.2.9 
was no problem, I balked at actually installing it for fear of causing 
trouble with future system updates. (Or current operation, for that matter.)


Could somebody please check whether this is problem is already fixed?

On 12/6/13, 8:33 AM, email-from-bobby wrote:
A negated subject search on an empty folder causes an assertion 
failure in doveadm. To reproduce:


bash-3.2# doveadm mailbox create -u ephraim "Freshly Empty"
bash-3.2# doveadm search -u ephraim mailbox "Freshly Empty" NOT 
subject '***JUNK MAIL***'
doveadm(ephraim): Panic: file mail-index-map.c: line 548 
(mail_index_map_lookup_seq_range): assertion failed: (first_uid <= 
last_uid\

)
doveadm(ephraim): Error: Raw backtrace: 2 
libdovecot.0.dylib  0x000100347463 
default_fatal_handler + 486 -> 3 \
  libdovecot.0.dylib  0x0001003472c0 
default_fatal_handler + 67 -> 4 libdovecot.0.dylib  
0x000\
100347705 i_fatal + 0 -> 5 libdovecot-storage.0.dylib  
0x0001002a799f mail_index_map_lookup_seq_range + 309 -> 6  \
 libdovecot-storage.0.dylib  0x0001002b6d4f 
mail_index_lookup_seq_range + 12 -> 7 
lib20_fts_plugin.so \
0x0001003fe325 fts_search_lookup + 3307 -> 8 
lib20_fts_plugin.so 0x0001003fddfb 
fts_search_lookup + 1985 -\
> 9   lib20_fts_plugin.so 0x0001003fd6e2 
fts_search_lookup + 168 -> 10 lib20_fts_plugin.so 0x00\
01003ff148 fts_mailbox_allocated + 1139 -> 11 
doveadm 0x0001001dd3d2 
doveadm_mail_iter_init + 1\
99 -> 12  doveadm 0x0001001df3ce cmd_search_run + 138 -> 13 
doveadm 0x0\
001001d94f9 doveadm_mail_next_user + 196 -> 14 
doveadm 0x0001001d9ad1 
doveadm_mail_try_run + 77\
6 -> 15  doveadm 0x0001001e1a09 main + 
1150 -> 16  libdyld.dylib 0x7fff915\

ba5fd start + 1 -> 17  ??? 0x0009 0x0 + 9
Abort trap: 6
bash-3.2#

A positive search is no problem:

bash-3.2# doveadm search -u ephraim mailbox "Freshly Empty" subject 
'***JUNK MAIL***'

bash-3.2#

Version and configuration info:

bash-3.2# 
/Applications/Server.app/Contents/ServerRoot/usr/sbin/dovecotd --version

2.2.5
bash-3.2# 
/Applications/Server.app/Contents/ServerRoot/usr/sbin/dovecotd -n

# 2.2.5: /Library/Server/Mail/Config/dovecot/dovecot.conf
# OS: Darwin 13.0.0 x86_64  hfs
auth_mechanisms = cram-md5 login apop plain digest-md5
auth_realms = mail.vishniac.com
auth_socket_path = /var/run/dovecot/auth-userdb
auth_username_format = %n
debug_log_path = /Library/Logs/Mail/mail-debug.log
default_internal_user = _dovecot
default_login_user = _dovenull
disable_plaintext_auth = no
first_valid_gid = 6
first_valid_uid = 6
hostname = mail.vishniac.com
imap_id_log = *
imap_id_send = "name" * "version" *
imap_urlauth_submit_user = submit
info_log_path = /Library/Logs/Mail/mail-info.log
log_path = /Library/Logs/Mail/mail-err.log
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c
mail_access_groups = mail
mail_attribute_dict = 
file:/Library/Server/Mail/Data/attributes/attributes.dict

mail_location = maildir:/Library/Server/Mail/Data/mail/users/%u
mail_log_prefix = "%s(pid %p user %u): "
mail_plugins = quota zlib acl fts fts_sk
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

mdbox_rotate_size = 200 M
namespace acl-mailboxes {
  list = children
  location = 
maildir:/Library/Server/Mail/Data/mail/users/%%u:INDEX=/Library/Server/Mail/Data/mail/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 Trash {
special_use = \Trash
  }
  prefix =
}
namespace list-archives {
  list = children
  location = 
maildir:/Library/Server/Mail/Data/listserver/messages/archive/lists/%%u:INDEX=/Library/Server/Mail/Data/listserver/mess\

ages/archive/shared/%%u
  prefix = archives.%%u.
  separator = .
  subscriptions = no
  type = shared
}
passdb {
  driver = od
}
passdb {
  args = /Library/Server/Mail/Config/dovecot/submit.passdb
  driver = passwd-file
}
plugin {
  acl = 
vfile:/Library/Server/Mail/Config/dovecot/global-acls:cache_secs=300
  acl_shared_dict = 
file:/Library/Server/Mail/Data/shared/shared-mailboxes

  fts = sk
  quota = maildir:User quota
  quota_warning = storage=100%% quota-exceeded %u
  sieve = /Library/Server/Mail/Data/rules/%u/dove

[Dovecot] bug report: doveadm assertion failure "mail_index_map_lookup_seq_range"

2013-12-06 Thread email-from-bobby
A negated subject search on an empty folder causes an assertion failure 
in doveadm. To reproduce:


bash-3.2# doveadm mailbox create -u ephraim "Freshly Empty"
bash-3.2# doveadm search -u ephraim mailbox "Freshly Empty" NOT subject 
'***JUNK MAIL***'
doveadm(ephraim): Panic: file mail-index-map.c: line 548 
(mail_index_map_lookup_seq_range): assertion failed: (first_uid <= last_uid\

)
doveadm(ephraim): Error: Raw backtrace: 2   
libdovecot.0.dylib  0x000100347463 
default_fatal_handler + 486 -> 3 \
  libdovecot.0.dylib  0x0001003472c0 
default_fatal_handler + 67 -> 4   libdovecot.0.dylib  0x000\
100347705 i_fatal + 0 -> 5   libdovecot-storage.0.dylib  
0x0001002a799f mail_index_map_lookup_seq_range + 309 -> 6  \
 libdovecot-storage.0.dylib  0x0001002b6d4f 
mail_index_lookup_seq_range + 12 -> 7   
lib20_fts_plugin.so \
0x0001003fe325 fts_search_lookup + 3307 -> 8   
lib20_fts_plugin.so 0x0001003fddfb fts_search_lookup 
+ 1985 -\
> 9   lib20_fts_plugin.so 0x0001003fd6e2 
fts_search_lookup + 168 -> 10  lib20_fts_plugin.so 0x00\
01003ff148 fts_mailbox_allocated + 1139 -> 11  
doveadm 0x0001001dd3d2 
doveadm_mail_iter_init + 1\
99 -> 12  doveadm 0x0001001df3ce 
cmd_search_run + 138 -> 13  doveadm 0x0\
001001d94f9 doveadm_mail_next_user + 196 -> 14  
doveadm 0x0001001d9ad1 
doveadm_mail_try_run + 77\
6 -> 15  doveadm 0x0001001e1a09 main + 
1150 -> 16  libdyld.dylib   0x7fff915\
ba5fd start + 1 -> 17  ??? 
0x0009 0x0 + 9

Abort trap: 6
bash-3.2#

A positive search is no problem:

bash-3.2# doveadm search -u ephraim mailbox "Freshly Empty" subject 
'***JUNK MAIL***'

bash-3.2#

Version and configuration info:

bash-3.2# /Applications/Server.app/Contents/ServerRoot/usr/sbin/dovecotd 
--version

2.2.5
bash-3.2# /Applications/Server.app/Contents/ServerRoot/usr/sbin/dovecotd -n
# 2.2.5: /Library/Server/Mail/Config/dovecot/dovecot.conf
# OS: Darwin 13.0.0 x86_64  hfs
auth_mechanisms = cram-md5 login apop plain digest-md5
auth_realms = mail.vishniac.com
auth_socket_path = /var/run/dovecot/auth-userdb
auth_username_format = %n
debug_log_path = /Library/Logs/Mail/mail-debug.log
default_internal_user = _dovecot
default_login_user = _dovenull
disable_plaintext_auth = no
first_valid_gid = 6
first_valid_uid = 6
hostname = mail.vishniac.com
imap_id_log = *
imap_id_send = "name" * "version" *
imap_urlauth_submit_user = submit
info_log_path = /Library/Logs/Mail/mail-info.log
log_path = /Library/Logs/Mail/mail-err.log
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c
mail_access_groups = mail
mail_attribute_dict = 
file:/Library/Server/Mail/Data/attributes/attributes.dict

mail_location = maildir:/Library/Server/Mail/Data/mail/users/%u
mail_log_prefix = "%s(pid %p user %u): "
mail_plugins = quota zlib acl fts fts_sk
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

mdbox_rotate_size = 200 M
namespace acl-mailboxes {
  list = children
  location = 
maildir:/Library/Server/Mail/Data/mail/users/%%u:INDEX=/Library/Server/Mail/Data/mail/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 Trash {
special_use = \Trash
  }
  prefix =
}
namespace list-archives {
  list = children
  location = 
maildir:/Library/Server/Mail/Data/listserver/messages/archive/lists/%%u:INDEX=/Library/Server/Mail/Data/listserver/mess\

ages/archive/shared/%%u
  prefix = archives.%%u.
  separator = .
  subscriptions = no
  type = shared
}
passdb {
  driver = od
}
passdb {
  args = /Library/Server/Mail/Config/dovecot/submit.passdb
  driver = passwd-file
}
plugin {
  acl = 
vfile:/Library/Server/Mail/Config/dovecot/global-acls:cache_secs=300

  acl_shared_dict = file:/Library/Server/Mail/Data/shared/shared-mailboxes
  fts = sk
  quota = maildir:User quota
  quota_warning = storage=100%% quota-exceeded %u
  sieve = /Library/Server/Mail/Data/rules/%u/dovecot.sieve
  sieve_dir = /Library/Server/Mail/Data/rules/%u
  stats_refresh = 30 secs
  stats_track_cmds = yes
}
postmaster_address = postmas...@vishniac.com
protocols = imap pop3 lmtp sieve
quota_full_tempfail = yes
service auth {
  extra_groups = _keytabusers
  idle_kill = 15 mins
  unix_listener auth-userdb {