Обсуждение: BUG #3750: Invalid frontend message type 112

Поиск
Список
Период
Сортировка

BUG #3750: Invalid frontend message type 112

От
"Christian Ullrich"
Дата:
The following bug has been logged online:

Bug reference:      3750
Logged by:          Christian Ullrich
Email address:      chris@chrullrich.net
PostgreSQL version: 8.3-beta2
Operating system:   Windows Server 2003
Description:        Invalid frontend message type 112
Details:

I'm running 8.3-beta2 (on WS2003, the client is XP Prof.) to experiment with
SSPI auth against AD. There is a persistent problem when using SSPI:
Authentication appears to work, but the connection fails at the first
query.

psql tells me about an "invalid frontend message type 112". Most of the
time, that error comes as the first line of output from psql (above the
"Welcome to" line), sometimes it is displayed later:

Welcome to psql 8.3beta2, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

test=>
test=> select 1;
server closed the connection unexpectedly
        This probably means the server terminated abnormally before or while
processing the request.
The connection to the server was lost. Attempting reset: FATAL:  invalid
frontend message type 112
Succeeded.

When I use another authentication method, all is well.

I can provide a network trace of the connection on request.

Re: BUG #3750: Invalid frontend message type 112

От
Magnus Hagander
Дата:
Christian Ullrich wrote:
> The following bug has been logged online:
>
> Bug reference:      3750
> Logged by:          Christian Ullrich
> Email address:      chris@chrullrich.net
> PostgreSQL version: 8.3-beta2
> Operating system:   Windows Server 2003
> Description:        Invalid frontend message type 112
> Details:
>
> I'm running 8.3-beta2 (on WS2003, the client is XP Prof.) to experiment with
> SSPI auth against AD. There is a persistent problem when using SSPI:
> Authentication appears to work, but the connection fails at the first
> query.
>
> psql tells me about an "invalid frontend message type 112". Most of the
> time, that error comes as the first line of output from psql (above the
> "Welcome to" line), sometimes it is displayed later:
>
> Welcome to psql 8.3beta2, the PostgreSQL interactive terminal.
>
> Type:  \copyright for distribution terms
>        \h for help with SQL commands
>        \? for help with psql commands
>        \g or terminate with semicolon to execute query
>        \q to quit
>
> test=>
> test=> select 1;
> server closed the connection unexpectedly
>         This probably means the server terminated abnormally before or while
> processing the request.
> The connection to the server was lost. Attempting reset: FATAL:  invalid
> frontend message type 112
> Succeeded.
>
> When I use another authentication method, all is well.
>
> I can provide a network trace of the connection on request.

Strange, it's been running fine for me :-( Couple of questions:

Does it work if you run the client on the same machine as the server?

How's your AD set up - single domain, or multiple?

Do you get anything in the server logs (please check both eventlog and
the pg_log directory)

And yes, please send me a network trace off-list. (send the rest of the
responses on-list in case someone else has a good idea :-P)

//Magnus

Strange problem with an index.

От
"Blanco, Jose"
Дата:
I have the following table=20=20=20=20=20=20=20=20=20=20

Table "public.authorsort"
  Column  |         Type          | Modifiers=20
----------+-----------------------+-----------
 ordernum | integer               |=20
 handle   | character varying(30) |=20
Indexes: author_handle_idx btree (handle)

As you can tell I have an index on handle.

In my perl script I loop trough series of select statements that look
like this:

Select ordernum from authorsort where handle =3D 'somvevalue';

Well, this was running very slowly, so I droped the index and recreated
it, and then it ran quickly.  I'm running versin 7.3 and I noticed that
in versin 8, the following has been done:

Prevent index corruption when a transaction inserts rows and then aborts
close to the end of a concurrent VACUUM on the same table (Tom)

And we recently added vacumm --full to our system.  Could this be the
reason?

Thanks!
Jose

Re: Strange problem with an index.

От
Tom Lane
Дата:
"Blanco, Jose" <blancoj@umich.edu> writes:
> Well, this was running very slowly, so I droped the index and recreated
> it, and then it ran quickly.

Sounds like you had a bloated index.

> I'm running versin 7.3

Consider switching to something more modern --- 7.3 is vastly slower
than current releases.

            regards, tom lane

Re: BUG #3750: Invalid frontend message type 112

От
Christian Ullrich
Дата:
* Magnus Hagander wrote:

> Christian Ullrich wrote:

>> psql tells me about an "invalid frontend message type 112". Most of the
>> time, that error comes as the first line of output from psql (above the
>> "Welcome to" line), sometimes it is displayed later:

> Does it work if you run the client on the same machine as the server?

Yes.

> How's your AD set up - single domain, or multiple?

Single domain, AD native mode, DC is Windows 2000.

> Do you get anything in the server logs (please check both eventlog and
> the pg_log directory)

Nothing relevant in eventlog, and pg_log only has the "invalid frontend
message type 112" lines. Interspersed with "loaded library
$libdir/plugin_debugger.dll", but I guess that's not important here.

> And yes, please send me a network trace off-list. (send the rest of the
> responses on-list in case someone else has a good idea :-P)

(Done.)

--
Christian Ullrich

Re: BUG #3750: Invalid frontend message type 112

От
Magnus Hagander
Дата:
On Fri, 2007-11-16 at 06:34 +0100, Christian Ullrich wrote:
> * Magnus Hagander wrote:
>
> > Christian Ullrich wrote:
>
> >> psql tells me about an "invalid frontend message type 112". Most of the
> >> time, that error comes as the first line of output from psql (above the
> >> "Welcome to" line), sometimes it is displayed later:
>
> > Does it work if you run the client on the same machine as the server?
>
> Yes.
>
> > How's your AD set up - single domain, or multiple?
>
> Single domain, AD native mode, DC is Windows 2000.
>
> > Do you get anything in the server logs (please check both eventlog and
> > the pg_log directory)
>
> Nothing relevant in eventlog, and pg_log only has the "invalid frontend
> message type 112" lines. Interspersed with "loaded library
> $libdir/plugin_debugger.dll", but I guess that's not important here.
>
> > And yes, please send me a network trace off-list. (send the rest of the
> > responses on-list in case someone else has a good idea :-P)
>
> (Done.)
>
Thanks for sending this. I'll be offline most of next week, so I won't
have time to look into this. If someone else wants to pick it up, please
do (and ask Christian for a copy of the trace). If not, I'll look at it
when I'm back firmly connected to the internet.

//Magnus

Re: BUG #3750: Invalid frontend message type 112

От
Magnus Hagander
Дата:
On Fri, Nov 16, 2007 at 06:31:43AM +0100, Christian Ullrich wrote:
> * Magnus Hagander wrote:
>
> >Christian Ullrich wrote:
>
> >>psql tells me about an "invalid frontend message type 112". Most of the
> >>time, that error comes as the first line of output from psql (above the
> >>"Welcome to" line), sometimes it is displayed later:
>
> >Does it work if you run the client on the same machine as the server?
>
> Yes.
>
> >How's your AD set up - single domain, or multiple?
>
> Single domain, AD native mode, DC is Windows 2000.
>
> >Do you get anything in the server logs (please check both eventlog and
> >the pg_log directory)
>
> Nothing relevant in eventlog, and pg_log only has the "invalid frontend
> message type 112" lines. Interspersed with "loaded library
> $libdir/plugin_debugger.dll", but I guess that's not important here.
>
> >And yes, please send me a network trace off-list. (send the rest of the
> >responses on-list in case someone else has a good idea :-P)
>
> Attached. Starting with frame 15 I ran "\d".

I have applied a patch for this to HEAD that fixes the problem (confirmed
off-list with Christian).

Before someone asks, there's a similar codepath in the GSSAPI code, but it
already contains the check ;-)

//Magnus