Hi,
sorry for the double post, I stupidly composed this as a reply to an
earlier mail, which causes it to appear in an older thread. Posting
again so it doesn't get lost in the archives:
dovecot 1.1.7 reliably crashes every time I try to open a mailbox using
IMAP. Error in the logs:
dovecot: Dec 02 23:14:15 Error: setmntent(/etc/mtab) failed: No such
file or directory
dovecot: Dec 02 23:14:16 Panic: IMAP(arandomuser at example.com):
my_vsnprintf(): Output string too big
dovecot: Dec 02 23:14:16 Error: child 4815 (imap) killed with signal 6
dovecot: Dec 02 23:14:19 Panic: IMAP(arandomuser at example.com):
my_vsnprintf(): Output string too big
dovecot: Dec 02 23:14:19 Error: child 4816 (imap) killed with signal 6
...
(it goes on until the daemon is killed)
# dovecot -n
# 1.1.7: /opt/dovecot-1.1.7/etc/dovecot.conf
Error: setmntent(/etc/mtab) failed: No such file or directory
# OS: HP-UX B.11.31 ia64
base_dir: /var/run/dovecot
log_path: /var/adm/syslog/dovecot/err.log
info_log_path: /var/adm/syslog/dovecot/info.log
protocols: imap imaps pop pops
ssl_cert_file: /opt/dovecot/etc/dovecot.crt
ssl_key_file: /opt/dovecot/etc/dovecot.key
login_dir: /var/run/dovecot/login
login_executable: /opt/dovecot/libexec/dovecot/imap-login
verbose_proctitle: yes
first_valid_uid: 113
last_valid_uid: 113
first_valid_gid: 109
last_valid_gid: 109
mail_uid: exim
mail_gid: exim
mail_location: maildir:/maildir/%d/%n
mail_debug: yes
mail_drop_priv_before_exec: yes
mail_executable: /opt/dovecot/libexec/dovecot/imap
mail_plugin_dir: /opt/dovecot/lib/dovecot/imap/
namespace:
type: private
separator: .
prefix: INBOX.
inbox: yes
list: yes
subscriptions: yes
auth default:
mechanisms: plain login cram-md5
executable: /opt/dovecot/libexec/dovecot/dovecot-auth
user: exim
verbose: yes
debug: yes
debug_passwords: yes
passdb:
driver: sql
args: /opt/dovecot/etc/dovecot-mysql.conf
userdb:
driver: static
args: uid=113 gid=109 home=/maildir/%d/%n
gdb backtrace (this is the HP-UX gdb, not the GNU debugger, dovecot was
compiled with the HP-UX cc):
(gdb) bt
#0 0x60000000c03ef990:0 in kill+0x30 () from /usr/lib/hpux32/libc.so.1
#1 0x60000000c02a0e60:0 in raise+0x120 () from /usr/lib/hpux32/libc.so.1
#2 0x60000000c03b0f70:0 in abort+0x170 () from /usr/lib/hpux32/libc.so.1
#3 0x42ab6a0:0 in default_fatal_finish (type=LOG_TYPE_PANIC, status=0)
at failures.c:150
#4 0x42acd40:0 in i_internal_fatal_handler (type=LOG_TYPE_PANIC, status=0,
fmt=0x409f750 "my_vsnprintf(): Output string too big",
args=0x7ffff418)
at failures.c:430
#5 0x42abb50:0 in i_panic (
format=0x409f750 "my_vsnprintf(): Output string too big") at
failures.c:197
#6 0x4306fb0:0 in my_vsnprintf (str=0x7ffff4a0 "4935b742", size=9,
format=0x4094998 "%08x", ap=0x7ffff478) at compat.c:276
#7 0x42f9a20:0 in i_snprintf (dest=0x7ffff4a0 "4935b742",
max_chars=9,
format=0x4094998 "%08x") at strfuncs.c:23
#8 0x41e6cd0:0 in mailbox_uidvalidity_write (
path=0x4001d400
"/maildir/example.com/arandomuser/dovecot-uidvalidity",
uid_validity=1228257090) at mailbox-uidvalidity.c:42
#9 0x41e7ac0:0 in mailbox_uidvalidity_next_rescan (
path=0x4001d400
"/maildir/example.com/arandomuser/dovecot-uidvalidity")
at mailbox-uidvalidity.c:154
#10 0x41e7de0:0 in mailbox_uidvalidity_next (
path=0x4001d400
"/maildir/example.com/arandomuser/dovecot-uidvalidity")
at mailbox-uidvalidity.c:181
---Type <return> to continue, or q <return> to quit---
#11 0x4110540:0 in maildir_get_uidvalidity_next (storage=0x40046698)
at maildir-storage.c:1054
#12 0x4121c60:0 in maildir_uidlist_sync_update (ctx=0x40044e60)
at maildir-uidlist.c:1219
#13 0x4124a70:0 in maildir_uidlist_sync_finish (ctx=0x40044e60)
at maildir-uidlist.c:1609
#14 0x4114120:0 in maildir_sync_context (ctx=0x4001c220, forced=false,
find_uid=0x0, lost_files_r=0x7ffff590) at maildir-sync.c:781
#15 0x41147b0:0 in maildir_storage_sync_init (box=0x4005ca28,
flags=MAILBOX_SYNC_FLAG_FIX_INCONSISTENT|MAILBOX_SYNC_FLAG_FULL_READ)
at maildir-sync.c:859
#16 0x41de2e0:0 in mailbox_sync_init (box=0x4005ca28,
flags=MAILBOX_SYNC_FLAG_FIX_INCONSISTENT|MAILBOX_SYNC_FLAG_FULL_READ)
at mail-storage.c:516
#17 0x41de4a0:0 in mailbox_sync (box=0x4005ca28,
flags=MAILBOX_SYNC_FLAG_FIX_INCONSISTENT|MAILBOX_SYNC_FLAG_FULL_READ,
status_items=STATUS_KEYWORDS|STATUS_FIRST_UNSEEN_SEQ|STATUS_UIDVALIDITY|STATUS_UIDNEXT|STATUS_RECENT|STATUS_MESSAGES,
status_r=0x7ffff5c0)
at mail-storage.c:545
#18 0x40bc200:0 in cmd_select_full (cmd=0x40054298, readonly=false)
at cmd-select.c:39
#19 0x40bc640:0 in cmd_select (cmd=0x40054298) at cmd-select.c:88
#20 0x40c9c00:0 in client_command_input (cmd=0x40054298) at client.c:580
---Type <return> to continue, or q <return> to quit---
#21 0x40ca340:0 in client_command_input (cmd=0x40054298) at client.c:629
#22 0x40ca6a0:0 in client_handle_next_command (client=0x40046da0,
remove_io_r=0x7ffff610) at client.c:670
#23 0x40c9470:0 in client_handle_input (client=0x40046da0) at client.c:680
#24 0x40c6ec0:0 in client_input (client=0x40046da0) at client.c:725
#25 0x42cdb60:0 in io_loop_handler_run (ioloop=0x4002e9f0) at
ioloop-poll.c:204
#26 0x42cb780:0 in io_loop_run (ioloop=0x4002e9f0) at ioloop.c:320
#27 0x40efa90:0 in main (argc=3, argv=0x7ffffa44, envp=0x7ffffa54)
at main.c:293
(gdb)
Doing a system call trace via
tusc -p -v -o dovetrace -k -f dovecot
I get the following for a crashed process (different pid since I didn't
want to do the tusc on the same run). Lines start with the [5301]:
[5301] open("/maildir/example.com/arandomuser", O_RDONLY|0x200000,
0152000)
................................................................................
= 8
[5301] fstat(8, 0x7ffff440)
................................................................................................................................
= 0
[5301] fcntl(8, F_SETFD, 0)
................................................................................................................................
= 0
[5301] getdents(8, 0x4007b3d0, 8192)
.......................................................................................................................
= 312
[5301] getdents(8, 0x4007b3d0, 8192)
.......................................................................................................................
= 0
[5301] close(8)
............................................................................................................................................
= 0
[5301]
rename("/maildir/example.com/arandomuser/dovecot-uidvalidity.4935b740",
"/maildir/example.com/arandomuser/dovecot-uidvalidity.4935b741")
............ = 0
[5301] open("/maildir/example.com/arandomuser/dovecot-uidvalidity",
O_RDWR|O_CREAT|0x800, 0666)
............................................................ = 8
[5301] brk(0x400b1000)
.....................................................................................................................................
= 0
[5301] brk(0x400c1000)
.....................................................................................................................................
= 0
[5301] brk(0x400e1000)
.....................................................................................................................................
= 0
[5301] brk(0x40121000)
.....................................................................................................................................
= 0
[5301] brk(0x401a1000)
.....................................................................................................................................
= 0
[5301] write(2, "01P m y _ v s n p r i n t f ( ) ".., 40)
..................................................................................................
= 40
[5301] sigprocmask(SIG_UNBLOCK, NULL, 0x7ffff3a0)
..........................................................................................................
= 0
[5301] sigaction(SIGABRT, NULL, 0x7ffff3c0)
................................................................................................................
= 0
[5301] close(1)
............................................................................................................................................
= 0
[5301] sigprocmask(SIG_BLOCK, 0x7ffff3a0, NULL)
............................................................................................................
= 0
[5301] sigaction(SIGABRT, 0x7ffff3c0, NULL)
................................................................................................................
= 0
[5301] sigprocmask(SIG_UNBLOCK, 0x7ffff3a0, NULL)
..........................................................................................................
= 0
[5301] getpid()
............................................................................................................................................
= 5301 (5295)
[5301] Received signal 6, SIGABRT, in kill(), [SIG_DFL], no siginfo
[5301] kill(6, SIGABRT)
....................................................................................................................................
[entry]
[5301] exit(6) [implicit (kill failure)]
...................................................................................................................
WIFSIGNALED(SIGABRT)|WCOREDUMP
[5295] waitpid(-1, WIFSIGNALED(SIGABRT)|WCOREDUMP, WNOHANG)
................................................................................................
= 5301
[5302] kill(5301, SIG#0)
...................................................................................................................................
ERR#3 ESRCH
Anything you can think of that would help?
Cheers,
Marc