Crashes with tracebacks

Timothe Litt litt at acm.org
Thu Dec 18 12:23:31 UTC 2014


Crashes, redux.  I hope I have provided all the information required for
a solution.  Many thanks in advance for having a look.

I have 71 core files for a user, that all happened in the space of about
6 hours.  It appears that mail delivered to 'Junk E-mail' is being
accessed.  I suspect they're all the same issue.  I saw the same syslog
entry a while back; did a resync & enabled process dumps.  Naturally, it
went away -- until this cluster of crashes.

File system is ext3.  It is NFS mounted by other machines, but only the
local machine should be touching the mail directories.  The user does
not have an interactive login - it's an e-mail only account.

This user's IMAP client is AppleMail.  The delivery agent is procmail;
Junk is detected by spamassassin; clamav is also present.

pop3 is configured, but I don't think anyone uses it.

Typical syslog (time matches core.20063):
Dec 17 18:06:22 overkill dovecot: imap(<user>): Error: Next message
unexpectedly corrupted in mbox file /home/<user>/mail/Junk E-mail at 1021601
Dec 17 18:06:22 overkill dovecot: imap(<user>): Panic: file mbox-sync.c:
line 152 (mbox_sync_read_next_mail): assertion failed:
(sync_ctx->input->v_offset != mail_ctx->mail.from_offset ||
sync_ctx->input->eof)
Dec 17 18:06:22 overkill dovecot: imap(<user>): Error: Raw backtrace:
/usr/local/lib/dovecot/libdovecot.so.0 [0x274ecf] ->
/usr/local/lib/dovecot/libdovecot.so.0 [0x274f4d] ->
/usr/local/lib/dovecot/libdovecot.so.0 [0x27446b] ->
/usr/local/lib/dovecot/libdovecot-storage.so.0 [0x16633e] ->
/usr/local/lib/dovecot/libdovecot-storage.so.0(mbox_sync+0x6b6)
[0x168146] ->
/usr/local/lib/dovecot/libdovecot-storage.so.0(mbox_storage_sync_init+0x81)
[0x169391] ->
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_sync_init+0x40)
[0x186270] ->
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_sync+0x3d)
[0x18715d] ->
/usr/local/lib/dovecot/libdovecot-storage.so.0(index_storage_get_status+0x74)
[0x1b6c44] ->
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_get_status+0x5f)
[0x1895bf] -> dovecot/imap(imap_status_get+0x7a) [0x806396a] ->
dovecot/imap(cmd_status+0x128) [0x80588a8] ->
dovecot/imap(command_exec+0x33) [0x805c8e3] -> dovecot/imap [0x805b63f]
-> dovecot/imap [0x805b6c3] -> dovecot/imap(client_handl
Dec 17 18:06:22 overkill dovecot: imap(<user>): Fatal: master:
service(imap): child 20063 killed with signal 6 (core dumped)

Tracebacks in attached archive were generated with:
> cd ~<user>; for C in core.*; do gdb /usr/local/libexec/dovecot/imap $C
> -x gdb -q ; mv gdb.log gdb.$C.log; done

where 'gdb' is:
> set pagination off
> set logging overwrite
> set logging file gdb.log
> set logging on
> bt full
> q
Note that there are unprintable characters in the log files (binary
arguments).

I have saved, but not attached the mail file & it's .lock file before
doing a doveadm force-resync -u <user> 'Junk E-mail'.  Let me know if
you require a copy to debug this.  I have also saved the core files.

Here is the dovecot config (I have replaced the domain with example.net).

dovecot -n
# 2.2.15: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.22.14-72.fc6 i686 Fedora Core release 6 (Zod)
first_valid_gid = 4000
first_valid_uid = 4000
hostname = smtp.example.net
login_greeting = Dovecot ready.  Unauthorized access is prohibited.
mail_access_groups = mail
mail_location = mbox:~/mail:INBOX=/var/mail/%n
mail_privileged_group = mail
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 "Train As Forgotten" {
    auto = subscribe
  }
  mailbox "Train As Ham" {
    auto = subscribe
  }
  mailbox "Train As Spam" {
    auto = subscribe
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
  separator = /
}
passdb {
  driver = pam
}
service imap-login {
  inet_listener imap {

    address = imap.v4.example.net imap.v6.example.net
    port = 143
  }
  inet_listener imaps {
    address = imap.v4.example.net imap.v6.example.net
    port = 993
    ssl = yes
  }
}
service pop3-login {
  inet_listener pop3 {
    address = pop.v4.example.net pop.v6.example.net
    port = 110
  }
  inet_listener pop3s {
    address = pop.v4.example.net pop.v6.example.net
    port = 995
    ssl = yes
  }
}
ssl_ca = </etc/pki/tls/certs/litts_net_ca-cert-crl.pem
ssl_cert = </etc/pki/tls/certs/servers-litts-net.pem
ssl_key = </etc/pki/tls/private/servers-litts-net.pmk
userdb {
  driver = passwd
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags
  mail_plugins =
}
protocol pop3 {
  mail_plugins =
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}

Finally, here is a list of all the core files showing their creation
times.  Note they're all the same size.
ls -l core* | cut -d ' ' -f5- | sort
536576 Dec 17 18:01 core.20067
536576 Dec 17 18:06 core.20063
536576 Dec 17 18:11 core.20464
536576 Dec 17 18:16 core.20665
536576 Dec 17 18:21 core.20913
536576 Dec 17 18:26 core.21098
536576 Dec 17 18:31 core.21359
536576 Dec 17 18:36 core.21589
536576 Dec 17 18:41 core.21805
536576 Dec 17 18:46 core.22077
536576 Dec 17 18:51 core.22262
536576 Dec 17 18:56 core.22518
536576 Dec 17 19:01 core.22771
536576 Dec 17 19:06 core.22955
536576 Dec 17 19:11 core.23227
536576 Dec 17 19:16 core.23438
536576 Dec 17 19:21 core.23679
536576 Dec 17 19:26 core.23856
536576 Dec 17 19:31 core.24089
536576 Dec 17 19:36 core.24328
536576 Dec 17 19:41 core.24569
536576 Dec 17 19:46 core.24806
536576 Dec 17 19:51 core.24994
536576 Dec 17 19:56 core.25233
536576 Dec 17 20:01 core.25447
536576 Dec 17 20:06 core.25612
536576 Dec 17 20:11 core.25825
536576 Dec 17 20:16 core.26091
536576 Dec 17 20:21 core.26309
536576 Dec 17 20:26 core.26453
536576 Dec 17 20:31 core.26773
536576 Dec 17 20:36 core.27020
536576 Dec 17 20:41 core.27278
536576 Dec 17 20:46 core.27505
536576 Dec 17 20:51 core.27681
536576 Dec 17 20:56 core.27913
536576 Dec 17 21:01 core.28214
536576 Dec 17 21:06 core.28445
536576 Dec 17 21:11 core.28739
536576 Dec 17 21:16 core.28975
536576 Dec 17 21:21 core.29205
536576 Dec 17 21:26 core.29407
536576 Dec 17 21:31 core.29635
536576 Dec 17 21:36 core.29892
536576 Dec 17 21:41 core.30132
536576 Dec 17 21:46 core.30407
536576 Dec 17 21:51 core.30542
536576 Dec 17 21:56 core.30834
536576 Dec 17 22:01 core.31099
536576 Dec 17 22:06 core.31264
536576 Dec 17 22:11 core.31529
536576 Dec 17 22:16 core.31761
536576 Dec 17 22:21 core.31981
536576 Dec 17 22:26 core.32191
536576 Dec 17 22:31 core.32436
536576 Dec 17 22:36 core.32665
536576 Dec 17 22:41 core.449
536576 Dec 17 22:46 core.676
536576 Dec 17 22:51 core.877
536576 Dec 17 22:56 core.1134
536576 Dec 17 23:01 core.1332
536576 Dec 17 23:06 core.1516
536576 Dec 17 23:11 core.1757
536576 Dec 17 23:16 core.1935
536576 Dec 17 23:21 core.2175
536576 Dec 17 23:26 core.2380
536576 Dec 17 23:31 core.2625
536576 Dec 17 23:36 core.2871
536576 Dec 17 23:41 core.3141
536576 Dec 17 23:46 core.3460
536576 Dec 17 23:51 core.3631

-- 
Timothe Litt
ACM Distinguished Engineer
--------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed. 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: logs.tar.gz
Type: application/x-gzip
Size: 24299 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20141218/c24b70e7/attachment-0001.gz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4942 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20141218/c24b70e7/attachment-0001.p7s>


More information about the dovecot mailing list