Re: Some 9.5beta2 backend processes not terminating properly? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Some 9.5beta2 backend processes not terminating properly?
Date
Msg-id 20151230182453.euolotsfyw6agbsz@alap3.anarazel.de
Whole thread Raw
In response to Re: Some 9.5beta2 backend processes not terminating properly?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 2015-12-30 13:17:47 -0500, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2015-12-30 19:54:19 +0200, Shay Rojansky wrote:
> >> wakeEvents is 8387808 and so is sock.
> 
> > Hm. That seems like an extremely weird value.
> 
> Probably just means the debugger is confused by optimized code.

Yea.


> > I think it's indicative of
> > a bug in 80788a431e. Specifically secure_read/write's waitfor isn't
> > necessarily set in the ssl case. Importantly not in the
> > SSL_ERROR_SYSCALL case, which we're likely hitting here.
> 
> Hmm, that does look bogus ... and the Assert wouldn't fire in a non-assert
> build.

After a bit of thinking it seems this can't actually happen because
waitfor is only used if errno is EWOULDBLOCK/EAGAIN. And all the other
branches allowing for n < 0 set errno to a different value.  Not
particularly obvious.


> > Is this in a backend with ssl?
> 
> I thought we'd eliminated SSL already, or have I lost track of the
> bidding?

We know a very similar problem happens without ssl. But we could have
ended up two different bugs...


Andres



pgsql-hackers by date:

Previous
From: Shay Rojansky
Date:
Subject: Re: Some 9.5beta2 backend processes not terminating properly?
Next
From: Andres Freund
Date:
Subject: Re: Some 9.5beta2 backend processes not terminating properly?