<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 9pt; font-family: Verdana,Geneva,sans-serif'>
<p>Looking at config.log, there is #define HAVE_LIBSYSTEMD 1</p>
<p>But "Type=notify" does not appear</p>
<p>My systemd is version 248</p>
<p><br /></p>
<div id="signature"></div>
<p><br /></p>
<p id="reply-intro">On 2021-04-26 12:05, Joan Moreau wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div id="replybody1">
<div style="font-size: 9pt; font-family: Verdana,Geneva,sans-serif;">
<p>I have</p>
<p># sudo systemctl status dovecot<br />● dovecot.service - Dovecot IMAP/POP3 email server<br /> Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; vendor preset: disabled)<br /> Active: active (running) since Sun 2021-04-25 20:13:25 UTC; 14h ago<br /> Docs: man:dovecot(1)<br /> https://doc.dovecot.org/<br /> Main PID: 2559364 (dovecot)<br /> Tasks: 28 (limit: 76912)<br /> Memory: 1.0G<br /> CPU: 7min 18.342s<br /> CGroup: /system.slice/dovecot.service<br /> ├─2559364 /usr/sbin/dovecot -F<br /> ├─2559366 dovecot/imap-login<br /> ├─2559367 dovecot/anvil [11 connections]<br /> ├─2559368 dovecot/log</p>
<p><br /></p>
<div id="v1signature"></div>
<p><br /></p>
<p id="v1reply-intro">On 2021-04-26 08:32, Aki Tuomi wrote:</p>
<blockquote style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0;">
<div class="v1pre" style="margin: 0; padding: 0; font-family: monospace;">I don't know then. It works for me and I just tried it again. The only reason it would fail would be that HAVE_LIBSYSTEMD is not defined, so it would not be using libsystemd for notify support.<br /><br />$ sudo systemctl status dovecot<br />● dovecot.service - Dovecot IMAP/POP3 email server<br /> Loaded: loaded (/lib/systemd/system/dovecot.service; disabled; vendor preset: enabled)<br /> Active: active (running) since Mon 2021-04-26 10:30:02 EEST; 2s ago<br /> Docs: man:dovecot(1)<br /> <a href="https://doc.dovecot.org/" target="_blank" rel="noopener noreferrer">https://doc.dovecot.org/</a><br /> Main PID: 30213 (dovecot)<br /> Status: "v2.4.devel (98a1cca054) running"<br /> Tasks: 4 (limit: 4701)<br /> Memory: 3.3M<br /> CGroup: /system.slice/dovecot.service<br /> ├─30213 /home/cmouse/dovecot/sbin/dovecot -F<br /> ├─30214 dovecot/anvil<br /> ├─30215 dovecot/log<br /> └─30216 dovecot/config<br /><br />You can tell from the "Status" line that it's using Type=notify.<br /><br />Aki<br /><br />
<blockquote style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0;">On 26/04/2021 10:29 Joan Moreau <<a href="mailto:jom@grosjo.net" rel="noreferrer">jom@grosjo.net</a>> wrote:<br /><br /><br />Yes, I do run autogen.sh after every "git pull"<br /><br /><br />On 2021-04-26 08:21, Aki Tuomi wrote:
<blockquote style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0;">The current autoconf code is bit buggy, but if you do indeed have libsystemd-dev installed it should do the right thing and will work with systemd even if you have Type=notify.<br /><br />This has been actually tested, so if it's not working, then something else is wrong.<br /><br />Did you remember to run ./autogen.sh after pulling from git to make sure you get new configure script? <br /><br />Aki<br /><br /><br />
<blockquote style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0;">On 26/04/2021 10:11 Joan Moreau <<a href="mailto:jom@grosjo.net" rel="noreferrer">jom@grosjo.net</a>> wrote:<br /><br /><br />Yes systemd is installed (and the "dev" files as well)<br /><br /><br />On 2021-04-26 06:23, Aki Tuomi wrote:
<blockquote style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0;">This is because you are not compiling with libsystemd-dev installed. I guess we need to make some service template that use type simple when you don't use libsystemd.<br /><br />Aki<br /><br /><br /><br />
<blockquote style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0;">On 25/04/2021 22:53 Joan Moreau <<a href="mailto:jom@grosjo.net" rel="noreferrer">jom@grosjo.net</a>> wrote:<br /><br /><br />Yes, it seems fixed with this patch :)<br /><br />Another bug with git, is the "type=" in systemd is switched from "simple" to "notify". The later does not work and reverting to "simple" does work<br /><br /><br />On 2021-04-25 17:53, Aki Tuomi wrote:
<blockquote style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0;">
<blockquote style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0;">On 24/04/2021 21:56 Joan Moreau <<a href="mailto:jom@grosjo.net" rel="noreferrer">jom@grosjo.net</a>> wrote:<br /><br /><br />chroot= does not resolve the issue<br />I have "chroot = login" in my conf<br /><br /></blockquote>
<br />Thanks!<br /><br />The chroot was needed to get the core dump.<br /><br />Can you try if this does fix the crash?<br /><br />Aki<br /><br />From 1df4e02cbff710ce8938480b07a5690e37f661f6 Mon Sep 17 00:00:00 2001<br />From: Timo Sirainen <<a href="mailto:timo.sirainen@open-xchange.com" rel="noreferrer">timo.sirainen@open-xchange.com</a>><br />Date: Fri, 23 Apr 2021 16:43:36 +0300<br />Subject: [PATCH] login-common: Fix handling destroyed_clients linked list<br /><br />The client needs to be removed from destroyed_clients linked list before<br />it's added to client_fd_proxies linked list.<br /><br />Broken by 1c622cdbe08df2f642e28923c39894516143ae2a<br />---<br /> src/login-common/client-common.c | 11 +++++++----<br /> 1 file changed, 7 insertions(+), 4 deletions(-)<br /><br />diff --git a/src/login-common/client-common.c b/src/login-common/client-common.c<br />index bdb6e9c798..1d264d9f75 100644<br />--- a/src/login-common/client-common.c<br />+++ b/src/login-common/client-common.c<br />@@ -289,8 +289,9 @@ void client_disconnect(struct client *client, const char *reason,<br /> /* Login was successful. We may now be proxying the connection,<br /> so don't disconnect the client until client_unref(). */<br /> if (client->iostream_fd_proxy != NULL) {<br />+ i_assert(!client->fd_proxying);<br /> client->fd_proxying = TRUE;<br />- i_assert(client->prev == NULL && client->next == NULL);<br />+ DLLIST_REMOVE(&destroyed_clients, client);<br /> DLLIST_PREPEND(&client_fd_proxies, client);<br /> client_fd_proxies_count++;<br /> }<br />@@ -307,8 +308,9 @@ void client_destroy(struct client *client, const char *reason)<br /> <br /> if (last_client == client)<br /> last_client = client->prev;<br />- /* remove from clients linked list before it's added to<br />- client_fd_proxies. */<br />+ /* move to destroyed_clients linked list before it's potentially<br />+ added to client_fd_proxies. */<br />+ i_assert(!client->fd_proxying);<br /> DLLIST_REMOVE(&clients, client);<br /> DLLIST_PREPEND(&destroyed_clients, client);<br /> <br />@@ -409,13 +411,14 @@ bool client_unref(struct client **_client)<br /> DLLIST_REMOVE(&client_fd_proxies, client);<br /> i_assert(client_fd_proxies_count > 0);<br /> client_fd_proxies_count--;<br />+ } else {<br />+ DLLIST_REMOVE(&destroyed_clients, client);<br /> }<br /> i_stream_unref(&client->input);<br /> o_stream_unref(&client->output);<br /> i_close_fd(&client->fd);<br /> event_unref(&client->event);<br /> <br />- DLLIST_REMOVE(&destroyed_clients, client);<br /> i_free(client->proxy_user);<br /> i_free(client->proxy_master_user);<br /> i_free(client->virtual_user);</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
</body></html>