Plugin ABI compat between v2.3.8 and v2.3.9
Alexander Strasser
eclipse7 at gmx.net
Tue Jun 16 23:47:57 EEST 2020
On 2020-06-16 20:32 +0200, Alexander Strasser wrote:
> On 2020-06-16 12:37 -0000, Stuart Henderson wrote:
> > On 2020-06-15, Alexander Strasser <eclipse7 at gmx.net> wrote:
> > > I had some imap crashes (sig11) starting at the end of 2019 after
> > > an upgrade of dovecot.
> > >
> > > I found out, that I didn't have any problems using version v2.3.8,
> > > but any version v2.3.9 and higher would trigger the crashes.
> > >
> > > After investigating more deeply and creating a core dump, I saw
> > > that the crash happened in an external plugin fetchmail_wakeup[1].
> > >
> > > After recompiling that plugin with up to date dovecot headers,
> > > I didn't get crashes anymore.
> > >
> > > So I suspect there were ABI incompatible changes and it was
> > > forgotten to bump the minimum Plugin-ABI version supported.
> >
> > dovecot-2.3.8/configure
> > #define DOVECOT_ABI_VERSION "2.3.ABIv8($PACKAGE_VERSION)"
> >
> > dovecot-2.3.9/configure
> > #define DOVECOT_ABI_VERSION "2.3.ABIv9($PACKAGE_VERSION)"
> >
> > Did you disable version checking? (version_ignore = yes)
>
> Thanks for the hint.
>
> I couldn't find version_ignore anywhere in the configs.
> I also don't remember having changed it.
>
> It's interesting that the ABI check didn't snap.
If I'm on the right track and the code src/lib/module-dir.c is
responsible for loading plugins and doing the ABI check, then
I think it does only check ABI compat for modules that define
a symbol named <module-name>_version .
At first this looks a bit unsafe to me.
Though it explains why in my case there was no ABI check failing,
as I found out the plugin does not define a version symbol.
The implementation should be really trivial, so I guess I will
add it to the plugin.
I find the behaviour a bit surprising, but as I understand now,
it's the plugin's fault and not a missed ABI bump in dovecot as
I initially suspected.
Thanks for pointing me in the right direction.
Alexander
More information about the dovecot
mailing list