pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robbie Harwood <rharwood@redhat.com>
To: David Steele <david@pgmasters.net>
To: pgsql-hackers@postgresql.org
Cc: Michael Paquier <michael.paquier@gmail.com>
Subject: Re: [PATCH v6] GSSAPI encryption support
Date: Mon, 14 Mar 2016 19:20:47 -0400
Message-ID: <jlg8u1kprxs.fsf@thriss.redhat.com> (raw)
In-Reply-To: <56E71B7C.6050108@pgmasters.net>
References: <jlg1tgq1ktm.fsf@thriss.redhat.com>
	<jlgegbkmvxl.fsf@thriss.redhat.com>
	<56E05575.9060200@pgmasters.net>
	<jlgegbcq0qc.fsf@thriss.redhat.com>
	<56E71B7C.6050108@pgmasters.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

David Steele <david@pgmasters.net> writes:

> On 3/14/16 4:10 PM, Robbie Harwood wrote:
>
>> David Steele <david@pgmasters.net> writes:
>>
>>> On 3/8/16 5:44 PM, Robbie Harwood wrote:
>>>
>>>> Here's yet another version of GSSAPI encryption support.  It's also
>>>> available for viewing on my github:
>>>
>>> psql simply hangs and never returns.  I have attached a pcap of the
>>> psql/postgres session generated with:
>> 
>> Please disregard my other email.  I think I've found the issue; will
>> post a new version in a moment.
>
> Strange timing since I was just testing this.  Here's what I got:
>
> $ pg/bin/psql -h localhost -U vagrant@PGMASTERS.NET postgres
> conn->inStart = 179, conn->inEnd = 179, conn->inCursor = 179
> psql (9.6devel)
> Type "help" for help.
>
> postgres=>

Thanks, that certainly is interesting!  I did finally manage to
reproduce the issue on my end, but the rate of incidence is much lower
than what you and Michael were seeing: I have to run connections in a
loop for about 10-20 minutes before it makes itself apparent (and no,
it's not due to entropy).  Apparently I just wasn't patient enough.

> This was after commenting out:
>
> // appendBinaryPQExpBuffer(&conn->gwritebuf,
> // 						conn->inBuffer + conn->inStart,
> // 						conn->inEnd - conn->inStart);
> // conn->inEnd = conn->inStart;
>
> The good news I can log on every time now!

Since conn->inStart == conn->inEnd in the case you were testing, the
lines you commented out would have been a no-op anyway (that's the
normal case of operation, as far as I can tell).  That said, the chances
of hitting the race for me seemed very dependent on how much code wants
to run in that conditional: I got it up to 30-40 minutes when I added a
lot of printf()s (can't just run in gdb because it's nondeterministic
and rr has flushing bugs at the moment).

All that is to say: thank you very much for investigating that!

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (220+ messages)  latest in thread

Message-ID: <jlg8u1kprxs.fsf@thriss.redhat.com>
Permalink:  ../jlg8u1kprxs.fsf@thriss.redhat.com/
Also on:    postgresql.org/message-id/jlg8u1kprxs.fsf@thriss.redhat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: rharwood@redhat.com, david@pgmasters.net, michael.paquier@gmail.com
  Subject: Re: [PATCH v6] GSSAPI encryption support
  In-Reply-To: <jlg8u1kprxs.fsf@thriss.redhat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox