Crash in mail module during SMTP setup
mdounin at mdounin.ru
Thu Aug 1 11:06:24 UTC 2019
On Thu, Aug 01, 2019 at 09:32:20AM +1000, Rob N ★ wrote:
> On Wed, 31 Jul 2019, at 2:11 AM, Maxim Dounin wrote:
> > > I think I see the problem - when using SMTP with SSL and
> > > resolver, read events might be enabled during address
> > > resolving, leading to duplicate
> > > ngx_mail_ssl_handshake_handler() calls if something arrives
> > > from the client, and duplicate session initialization -
> > > including starting another resolving.
> That neatly explains why the problem became more noticeable as
> number of connections went up. With the load a little higher,
> DNS resolution could conceivable take a little longer, making it
> more likely that the bug would be triggered.
> > > The following patch should resolve this:
> I've been running the second patch you posted for ~22hrs with no
> crashes, compared to one every 10-20mins previously. So I think
> you got it! Thank you so much!
Thanks for testing, committed:
More information about the nginx