On 1 Jul, 2016, at 10:52, Timo Sirainen tss@iki.fi wrote:
On 01 Jul 2016, at 19:39, Adam Weinberger adamw@adamw.org wrote:
Hi,
2.2.25 crashes on FreeBSD with a kqueue-related message. I see references to something similar (http://www.dovecot.org/list/dovecot/2012-February.txt) from a couple years ago.
I get: Jul 1 10:07:27 imap dovecot: master: Panic: kevent(EV_ADD, READ, 54) failed: Bad file descriptor
It's not dumping core, and I get the message even with "protocols ="
Downgrading back to 2.2.24 fixes it. What info would be helpful for me to provide here?
gdb backtrace: http://dovecot.org/bugreport.html#coredumps
Fuller logs attached. Thanks for your help, Timo.
# Adam
Okay. Here's my steps:
Install 2.2.5 into fresh i386 FreeBSD 10.3-RELEASE-p5 jail.
Built with the following settings: root@apnoea-builder:/usr/ports/mail/dovecot2 # make -V CONFIGURE_ARGS --localstatedir=/var --with-statedir=/var/db/dovecot --without-shadow --with-docs --with-ioloop=kqueue --with-notify=kqueue --without-libwrap --with-ssl=openssl --without-vpopmail --without-gssapi --without-cdb --without-ldap --without-mysql --without-pgsql --without-sqlite --without-icu --without-lucene --without-solr --without-textcat --prefix=/usr/local ${_LATE_CONFIGURE_ARGS}
Copied files into place and made following changes: root@apnoea-builder:/usr/ports/mail/dovecot2 # dovecot -n
2.2.25 (7be1766): /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 10.3-RELEASE-p5 i386 auth_debug = yes auth_verbose = yes log_path = /var/log/dovelog mail_debug = yes 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 = } passdb { driver = pam } ssl = no userdb { driver = passwd }
- Started dovecot root@apnoea-builder:/usr/ports/mail/dovecot2 # /usr/local/sbin/dovecot -c /usr/local/etc/dovecot/dovecot.conf Last died with error (see error log for more information): kevent(EV_ADD, READ, 57) failed: Bad file descriptor
root@apnoea-builder:~ # tail /var/log/dovelog Jul 02 00:15:56 master: Info: Dovecot v2.2.25 (7be1766) starting up for imap, pop3, lmtp Jul 02 00:15:56 master: Panic: kevent(EV_ADD, READ, 57) failed: Bad file descriptor
- Backtrace
root@apnoea-builder:~ # gdb /usr/local/sbin/dovecot /dovecot.core
This GDB was configured as "i386-marcel-freebsd"...
Core was generated by `dovecot'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/local/lib/dovecot/libdovecot.so.0...done.
Loaded symbols for /usr/local/lib/dovecot/libdovecot.so.0
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0 0x28295237 in thr_kill () from /lib/libc.so.7
(gdb) bt
#0 0x28295237 in thr_kill () from /lib/libc.so.7
#1 0x2829522a in raise () from /lib/libc.so.7
#2 0x28295176 in abort () from /lib/libc.so.7
#3 0x2815aea2 in default_fatal_finish (type=LOG_TYPE_PANIC, status=0) at failures.c:201
#4 0x2815b686 in i_syslog_fatal_handler (ctx=0xffffaaf0, format=0x281ccf7a "kevent(EV_ADD, READ, %d) failed: %m", args=0xffffab24 "8") at failures.c:418
#5 0x0804dfd1 in master_fatal_callback (ctx=0xffffaaf0, format=0x281ccf7a "kevent(EV_ADD, READ, %d) failed: %m", args=0xffffab24 "8") at main.c:167
#6 0x2815b23a in i_panic (format=0x281ccf7a "kevent(EV_ADD, READ, %d) failed: %m") at failures.c:275
#7 0x28185e10 in io_loop_handle_add (io=0x288843a0) at ioloop-kqueue.c:67
#8 0x281815a8 in io_add_file (fd=56, condition=IO_READ, source_linenum=244, callback=0x2818a7d0
, context=0x0) at ioloop.c:59 #9 0x281813a6 in io_add (fd=56, condition=IO_READ, source_linenum=244, callback=0x2818a7d0 , context=0x0) at ioloop.c:81 #10 0x2818a666 in lib_signals_set_handler (signo=1, flags=3, handler=0x804e6c0 , context=0x0) at lib-signals.c:243 #11 0x0804e129 in main_init (set=0x2881d098) at main.c:518 #12 0x0804d562 in main (argc=3, argv=0xffffae08) at main.c:890
(gdb) bt full
#0 0x28295237 in thr_kill () from /lib/libc.so.7
No symbol table info available.
#1 0x2829522a in raise () from /lib/libc.so.7
No symbol table info available.
#2 0x28295176 in abort () from /lib/libc.so.7
No symbol table info available.
#3 0x2815aea2 in default_fatal_finish (type=LOG_TYPE_PANIC, status=0) at failures.c:201
backtrace = 0x0
#4 0x2815b686 in i_syslog_fatal_handler (ctx=0xffffaaf0, format=0x281ccf7a "kevent(EV_ADD, READ, %d) failed: %m", args=0xffffab24 "8") at failures.c:418
status = 0
#5 0x0804dfd1 in master_fatal_callback (ctx=0xffffaaf0, format=0x281ccf7a "kevent(EV_ADD, READ, %d) failed: %m", args=0xffffab24 "8") at main.c:167
path = 0x28803810 "master-fatal.lastlog"
str = 0x28803860 "kevent(EV_ADD, READ, 56) failed: Bad file descriptor"
args2 = 0xffffab24 "8"
pid = 94804
fd = -1
#6 0x2815b23a in i_panic (format=0x281ccf7a "kevent(EV_ADD, READ, %d) failed: %m") at failures.c:275
ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0, timestamp_usecs = 0}
args = 0xffffab24 "8"
#7 0x28185e10 in io_loop_handle_add (io=0x288843a0) at ioloop-kqueue.c:67
ctx = (struct ioloop_handler_context *) 0x288131d0
ev = {ident = 56, filter = -1, flags = 1, fflags = 0, data = 0, udata = 0x288843a0}
#8 0x281815a8 in io_add_file (fd=56, condition=IO_READ, source_linenum=244, callback=0x2818a7d0