<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 2/10/22 21:33, Stephan Althaus
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:4aa39fd7-232d-96c4-a48d-20b40abe3f33@Duedinghausen.eu">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div class="moz-cite-prefix">On 2/9/22 21:25, Till Wegmueller
        wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:e5c2d7df-55c3-50be-0217-8d18a847c299@gmail.com">Hello
        Fritz <br>
        <br>
        It talks about a failed code assertion so something went out of
        expected bounds. Can you check if doevecot wrote something more
        usefull to syslog? <br>
        <br>
        Here it just says "file %s: line %d (%s): assertion failed:
        (%s)" <br>
        But not the actual assertion failure message. <br>
        <br>
        The one below that is <br>
        #8  0x00007ffef056048b in io_loop_handle_add (io=0x42d7c0) at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/ioloop-poll.c:94<br>
                ctx = 0x423180 <br>
                condition = IO_READ <br>
                old_count = 3221223792 <br>
                index = 0 <br>
                old_events = 59 <br>
                fd = 4 <br>
                __func__ = "io_loop_handle_add" <br>
        <br>
        But I can't tell if thats the panic or why dovecots panics here.
        <br>
        <br>
        -Till <br>
        <br>
        On 09.02.22 16:45, Friedrich Kink via oi-dev wrote: <br>
        <blockquote type="cite">Sent this already to dovecot mailinglist
          without response so far. Maybe someone reading this list can
          help. Unfortunately it did not show up during the test run of
          the package and I used earlier versions without this problem.
          <br>
          <br>
          <br>
          Dear list, <br>
          <br>
          I built a dovecot package for openindiana (which is a Solaris
          derivative) from latest version 2.3.18. Everything compiles
          and builds fine without any issue. Even subsequent
          installation and startup of main dovecot process works as
          expected. But execution of /usr/libexec/dovecot/anvil
          immediately crashes. To get some more meaningful backtrace I
          compiled with -g. Below some facts of my environment and a
          backtrace. Maybe some of you are more familiar with this kind
          of issue as I, and can give some hint or share ideas how to
          nail down the problem. Or can it be a configuration issue? BTW
          it is running in a so-called zone. And former versions, I
          don't know exactly but I believe up to 2.3.17, did not show
          this crash. <br>
          <br>
          gcc --version <br>
          gcc (OpenIndiana 7.5.0-il-0) 7.5.0 <br>
          <br>
          Configure parameters: <br>
          <br>
          gcc_OPT = -g <br>
          <br>
          CONFIGURE_OPTIONS+= --sysconfdir=/etc \ <br>
                               --localstatedir=/var \ <br>
                               --with-gssapi=plugin \ <br>
                               --with-ldap=plugin \ <br>
                               --with-sql=plugin \ <br>
                               --with-lua=plugin \ <br>
                               --with-ssl=openssl \ <br>
                               --with-ioloop=poll \ <br>
                               --with-notify=none \ <br>
                               --with-sodium \ <br>
                               --with-mysql \ <br>
                               --with-pgsql \ <br>
                               --enable-static=no \ <br>
                               --without-systemd \ <br>
                               SSL_CFLAGS=-I/usr/openssl/1.1/include \ <br>
                               SSL_LIBS="-L/usr/openssl/1.1/lib/amd64
          -lssl -lcrypto" \ <br>
                               LDFLAGS="-lldap_r" <br>
          <br>
          Backtrace: <br>
          <br>
          (gdb) bt full <br>
          #0  0x00007fff5d2e6f2a in _lwp_kill () from /lib/64/libc.so.1
          <br>
          No symbol table info available. <br>
          #1  0x00007fff5d2dd7f0 in thr_kill () from /lib/64/libc.so.1 <br>
          No symbol table info available. <br>
          #2  0x00007fff5d27ae7e in raise () from /lib/64/libc.so.1 <br>
          No symbol table info available. <br>
          #3  0x00007fff5d254ad8 in abort () from /lib/64/libc.so.1 <br>
          No symbol table info available. <br>
          #4  0x00007ffef05367c0 in default_fatal_finish
          (type=LOG_TYPE_PANIC, status=0) at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/failures.c:459<br>
                   backtrace = 0x4178b8
          "/usr/lib/amd64/dovecot/libdovecot.so.0.0.0'backtrace_append_libc+0x4c
          [0x7ffef0522042] ->
          /usr/lib/amd64/dovecot/libdovecot.so.0.0.0'backtrace_append+0x18
          [0x7ffef05221c5] -> /usr/lib/amd64/dovecot/li"... <br>
                   recursed = 0 <br>
          #5  0x00007ffef0536827 in fatal_handler_real
          (ctx=0x7fffbffff820, format=0x7ffef05d8730 "file %s: line %d
          (%s): assertion failed: (%s)", args=0x7fffbffff850) <br>
               at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/failures.c:471<br>
                   status = 0 <br>
          #6  0x00007ffef0536871 in default_fatal_handler
          (ctx=0x7fffbffff820, format=0x7ffef05d8730 "file %s: line %d
          (%s): assertion failed: (%s)", args=0x7fffbffff850) <br>
               at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/failures.c:479<br>
          No locals. <br>
          #7  0x00007ffef0536aed in i_panic (format=0x7ffef05d8730 "file
          %s: line %d (%s): assertion failed: (%s)") at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/failures.c:524<br>
                   ctx = {type = LOG_TYPE_PANIC, exit_status = 0,
          timestamp = 0x0, timestamp_usecs = 0, log_prefix = 0x0,
          log_prefix_type_pos = 0} <br>
                   args = {{gp_offset = 8, fp_offset = 48,
          overflow_arg_area = 0x7fffbffff930, reg_save_area =
          0x7fffbffff870}} <br>
          #8  0x00007ffef056048b in io_loop_handle_add (io=0x42d7c0) at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/ioloop-poll.c:94<br>
                   ctx = 0x423180 <br>
                   condition = IO_READ <br>
                   old_count = 3221223792 <br>
                   index = 0 <br>
                   old_events = 59 <br>
                   fd = 4 <br>
                   __func__ = "io_loop_handle_add" <br>
          #9  0x00007ffef055c1ab in io_add_file (ioloop=0x423070, fd=4,
          condition=IO_READ, source_filename=0x7ffef05d9f48
"/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/lib-signals.c",<br>
               source_linenum=192, callback=0x7ffef05698f4
          <signal_read>, context=0x0) at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/ioloop.c:72<br>
                   io = 0x42d7c0 <br>
                   __func__ = "io_add_file" <br>
          #10 0x00007ffef055c27a in io_add_to (ioloop=0x423070, fd=4,
          condition=IO_READ, source_filename=0x7ffef05d9f48
"/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/lib-signals.c",<br>
               source_linenum=192, callback=0x7ffef05698f4
          <signal_read>, context=0x0) at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/ioloop.c:94<br>
                   io = 0x7ffef0609aa0 <static_system_pool> <br>
                   __func__ = "io_add_to" <br>
          #11 0x00007ffef0569289 in lib_signals_init_io (l=0x420a00) at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/lib-signals.c:192<br>
                   __func__ = "lib_signals_init_io" <br>
          #12 0x00007ffef056933c in lib_signals_ioloop_ref
          (ioloop=0x423070) at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/lib-signals.c:205<br>
                   l = 0x420a00 <br>
          #13 0x00007ffef0569507 in signal_handler_switch_ioloop
          (h=0x4209c0) at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/lib-signals.c:232<br>
          No locals. <br>
          #14 0x00007ffef056a10a in lib_signals_set_handler (signo=2,
          flags=LIBSIG_FLAG_DELAYED, handler=0x7ffef0475e74
          <sig_die>, context=0x422f20) <br>
               at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib/lib-signals.c:520<br>
                   h = 0x4209c0 <br>
                   __func__ = "lib_signals_set_handler" <br>
          #15 0x00007ffef0477596 in master_service_init_finish
          (service=0x422f20) at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/lib-master/master-service.c:668<br>
                   sigint_flags = LIBSIG_FLAG_DELAYED <br>
                   st = {st_dev = 79, st_ino = 4209307, st_mode = 1,
          st_nlink = 79, st_uid = 4218704, st_gid = 0, st_rdev =
          17179869185, st_size = 4337776, st_atim = {tv_sec =
          140736414612384, tv_nsec = 1}, <br>
                     st_mtim = {tv_sec = 0, tv_nsec = 8388608}, st_ctim
          = {tv_sec = 0, tv_nsec = 0}, st_blksize = 4378928, st_blocks =
          255, st_fstype = " /B\000\000\000\000\000 /B\000\000\000\000"}
          <br>
                   __func__ = "master_service_init_finish" <br>
          #16 0x0000000000403cce in main (argc=1, argv=0x7fffbffffc38)
          at
/usr/src/myoi-userland/components/mail/dovecot/dovecot-2.3.18/src/anvil/main.c:80
          <br>
                   service_flags = (MASTER_SERVICE_FLAG_UPDATE_PROCTITLE
          | MASTER_SERVICE_FLAG_DONT_SEND_STATS) <br>
                   error = 0x7fffbffffc10 " \374\377\277\377\177" <br>
          <br>
          Thanks a lot for any help, <br>
          <br>
             Fritz <br>
          <br>
          <br>
          _______________________________________________ <br>
          oi-dev mailing list <br>
          <a class="moz-txt-link-abbreviated moz-txt-link-freetext"
            href="mailto:oi-dev@openindiana.org" moz-do-not-send="true">oi-dev@openindiana.org</a>
          <br>
          <a class="moz-txt-link-freetext"
            href="https://openindiana.org/mailman/listinfo/oi-dev"
            moz-do-not-send="true">https://openindiana.org/mailman/listinfo/oi-dev</a>
          <br>
        </blockquote>
        <br>
        _______________________________________________ <br>
        oi-dev mailing list <br>
        <a class="moz-txt-link-abbreviated moz-txt-link-freetext"
          href="mailto:oi-dev@openindiana.org" moz-do-not-send="true">oi-dev@openindiana.org</a>
        <br>
        <a class="moz-txt-link-freetext"
          href="https://openindiana.org/mailman/listinfo/oi-dev"
          moz-do-not-send="true">https://openindiana.org/mailman/listinfo/oi-dev</a>
        <br>
      </blockquote>
      <p>Hello Fritz!</p>
      <p>o support your investigation, I tried mdb and it says</p>
      <p>mdb: target performed exec of /usr/libexec/dovecot/anvil<br>
        <b>Panic: epoll_ctl(add, 4) failed: Not owner (fd doesn't
          support epoll)</b><br>
        Error: Raw backtrace:
        /usr/lib/amd64/dovecot/libdovecot.so.0.0.0'backtrace_append+0x3f
        [0x7fff7fbac40f] ->
        /usr/lib/amd64/dovecot/libdovecot.so.0.0.0'backtrace_get+0x1f
        [0x7fff7fbac55f] ->
        /usr/lib/amd64/dovecot/libdovecot.so.0.0.0'fatal_handler_real+0x163
        [0x7fff7fbc24e3] ->
        /usr/lib/amd64/dovecot/libdovecot.so.0.0.0'0x162521
        [0x7fff7fbc2521] ->
        /usr/lib/amd64/dovecot/libdovecot.so.0.0.0'i_fatal+0x0
        [0x7fff7fbc3644] ->
        /usr/lib/amd64/dovecot/libdovecot.so.0.0.0'io_loop_handle_add+0x1e3
        [0x7fff7fbe1153] ->
        /usr/lib/amd64/dovecot/libdovecot.so.0.0.0'io_add_to+0xe0
        [0x7fff7fbdea40] ->
        /usr/lib/amd64/dovecot/libdovecot.so.0.0.0'io_add+0x26
        [0x7fff7fbdeb26] -> /usr/libexec/dovecot/anvil'main+0x11a
        [0x4036ca] -> /usr/libexec/dovecot/anvil'_start_crt+0x87
        [0x4033d7] -> /usr/libexec/dovecot/anvil'_start+0x18
        [0x403338]</p>
      <p>That epoll_ctl() would then be in<b>
          core/src/lib/ioloop-epoll.c</b> function<b> void
          io_loop_handle_add(struct io_file *io)</b><br>
      </p>
      <p><br>
      </p>
      <p>The question is which or what type of file is that..</p>
      <p>open("/dev/poll", O_RDWR)                       = 4<br>
        ioctl(4, DP_EPOLLCOMPAT, 0x00000000)            = 0<br>
        fcntl(4, F_GETFD, 0x00000000)                   = 0<br>
        fcntl(4, F_SETFD, 0x00000001)                   = 0<br>
        write(4, "04\0\0\01B\0\0\0 p ! B\0".., 16)      Err#90 ELOOP<br>
        mmap(0x00010000, 65536, PROT_READ|PROT_WRITE|PROT_EXEC,
        MAP_PRIVATE|MAP_ANON|MAP_ALIGN, 4294967295, 0) = 0x7FFFAF4D0000<br>
        Panic: epoll_ctl(add, 4) failed: Invalid argument<br>
      </p>
      <p><br>
      </p>
      <p>And now, what is wrong with this? I don't know :-(<br>
      </p>
      <p><br>
      </p>
      <p>Other files are opened, too:</p>
      <p># grep -i open truss.txt <br>
        open("/var/ld/64/ld.config", O_RDONLY)          Err#2 ENOENT<br>
        open("/lib/64/libc.so.1", O_RDONLY)             = 3<br>
        open("/usr/lib/amd64/dovecot/libdovecot.so.0", O_RDONLY) = 3<br>
        open("/lib/64/libsocket.so.1", O_RDONLY)        = 3<br>
        open("/lib/64/libnsl.so.1", O_RDONLY)           = 3<br>
        open("/dev/null", O_WRONLY)                     = 3<br>
        open("/var/ld/64/ld.config", O_RDONLY)          Err#2 ENOENT<br>
        open("/lib/64/libc.so.1", O_RDONLY)             = 3<br>
        open("/usr/lib/amd64/dovecot/libdovecot.so.0", O_RDONLY) = 3<br>
        open("/lib/64/libsocket.so.1", O_RDONLY)        = 3<br>
        open("/lib/64/libnsl.so.1", O_RDONLY)           = 3<br>
        open("/dev/null", O_WRONLY)                     = 3<br>
        open("/dev/poll", O_RDWR)                       = 6<br>
        open("/usr/lib/amd64/dovecot/settings",
        O_RDONLY|O_NDELAY|O_LARGEFILE) Err#2 ENOENT<br>
        open("/etc/dovecot/dovecot.conf", O_RDONLY)     = 7<br>
        open("/usr/share/dovecot/protocols.d/",
        O_RDONLY|O_NDELAY|O_LARGEFILE) Err#2 ENOENT<br>
        open("/etc/dovecot/conf.d/", O_RDONLY|O_NDELAY|O_LARGEFILE) = 8<br>
        open("/etc/dovecot/conf.d/99-mail-stack-delivery.conf",
        O_RDONLY) = 8<br>
        open("/etc/dovecot/conf.d/90-sieve.conf", O_RDONLY) = 9<br>
        open("/etc/dovecot/conf.d/90-sieve-extprograms.conf", O_RDONLY)
        = 10<br>
        open("/etc/dovecot/conf.d/90-quota.conf", O_RDONLY) = 11<br>
        open("/etc/dovecot/conf.d/90-plugin.conf", O_RDONLY) = 12<br>
        open("/etc/dovecot/conf.d/90-acl.conf", O_RDONLY) = 13<br>
        open("/etc/dovecot/conf.d/20-pop3.conf", O_RDONLY) = 14<br>
        open("/etc/dovecot/conf.d/20-managesieve.conf", O_RDONLY) = 15<br>
        open("/etc/dovecot/conf.d/20-imap.conf", O_RDONLY) = 16<br>
        open("/etc/dovecot/conf.d/15-mailboxes.conf", O_RDONLY) = 17<br>
        open("/etc/dovecot/conf.d/15-lda.conf", O_RDONLY) = 18<br>
        open("/etc/dovecot/conf.d/10-tcpwrapper.conf", O_RDONLY) = 19<br>
        open("/etc/dovecot/conf.d/10-ssl.conf", O_RDONLY) = 20<br>
        open("/etc/dovecot/conf.d/10-master.conf", O_RDONLY) = 21<br>
        open("/etc/dovecot/conf.d/10-mail.conf", O_RDONLY) = 22<br>
        open("/etc/dovecot/conf.d/10-logging.conf", O_RDONLY) = 23<br>
        open("/etc/dovecot/conf.d/10-director.conf", O_RDONLY) = 24<br>
        open("/etc/dovecot/conf.d/10-auth.conf", O_RDONLY) = 25<br>
        open("/etc/dovecot/conf.d/auth-system.conf.ext", O_RDONLY) = 26<br>
        open("/var/ld/64/ld.config", O_RDONLY)          Err#2 ENOENT<br>
        open("/lib/64/libc.so.1", O_RDONLY)             = 3<br>
        open("/usr/lib/amd64/dovecot/libdovecot.so.0", O_RDONLY) = 3<br>
        open("/lib/64/libsocket.so.1", O_RDONLY)        = 3<br>
        open("/lib/64/libnsl.so.1", O_RDONLY)           = 3<br>
        open("/dev/null", O_WRONLY)                     = 3<br>
        open("/dev/poll", O_RDWR)                       = 4<br>
        open("/proc/self/as", O_RDONLY)                 = 5<br>
        <br>
      </p>
      <p>...</p>
      <p><br>
      </p>
      <p>Greetings,</p>
      <p>Stephan</p>
      <p><br>
      </p>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
oi-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:oi-dev@openindiana.org">oi-dev@openindiana.org</a>
<a class="moz-txt-link-freetext" href="https://openindiana.org/mailman/listinfo/oi-dev">https://openindiana.org/mailman/listinfo/oi-dev</a>
</pre>
    </blockquote>
    <p>Hello Fritz!</p>
    <p>anvil from package CSWdovecot in version 2.3.17 has errors, too<br>
    </p>
    <p>write(2, " E r r o r :   f d _ r e".., 62)      = 62<br>
      pollsys(0x08073890, 2, 0x00000000, 0x00000000)  = 1<br>
      recvmsg(4, 0x08047BE0, 32768)                   Err#95 ENOTSOCK<br>
      write(2, " E r r o r :   f d _ r e".., 62)      = 62<br>
      pollsys(0x08073890, 2, 0x00000000, 0x00000000)  = 1<br>
      recvmsg(4, 0x08047BE0, 32768)                   Err#95 ENOTSOCK<br>
    </p>
    <p><br>
    </p>
    <p>Greetings,</p>
    <p>Stephan</p>
    <p><br>
    </p>
  </body>
</html>