473,396 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

FATAL: invalid frontend message type 8

I've started seeing the following in my logs:
FATAL: invalid frontend message type 8

I searched back over a month and there are 5 instances of this error
of which 4 are in the last 24 hours.

I could not find this error defined. Any ideas of what it means, it's
severity, how to track the cause and cure?

Cheers,
Steve
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #1
6 5138
Steve Crawford <sc*******@pinpointresearch.com> writes:
I've started seeing the following in my logs:
FATAL: invalid frontend message type 8 I searched back over a month and there are 5 instances of this error
of which 4 are in the last 24 hours. I could not find this error defined. Any ideas of what it means, it's
severity, how to track the cause and cure?


It looks to me like you've got an erroneous client that is sending bad
data. The error is from tcop/postgres.c, when it doesn't recognize the
first byte of what should be a message:

default:
/*
* Otherwise we got garbage from the frontend. We treat this
* as fatal because we have probably lost message boundary
* sync, and there's no good way to recover.
*/
ereport(FATAL,
(errcode(ERRCODE_PROTOCOL_VIOLATION),
errmsg("invalid frontend message type %d", qtype)));

Can you determine exactly which client-side code is provoking the error?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #2
On Wednesday 18 August 2004 10:34 am, Tom Lane wrote:
Steve Crawford <sc*******@pinpointresearch.com> writes:
I've started seeing the following in my logs:
FATAL: invalid frontend message type 8

I searched back over a month and there are 5 instances of this
error of which 4 are in the last 24 hours.

I could not find this error defined. Any ideas of what it means,
it's severity, how to track the cause and cure?


It looks to me like you've got an erroneous client that is sending
bad data. The error is from tcop/postgres.c, when it doesn't
recognize the first byte of what should be a message:

default:
/*
* Otherwise we got garbage from the frontend. We
treat this * as fatal because we have probably lost message
boundary * sync, and there's no good way to recover.
*/
ereport(FATAL,
(errcode(ERRCODE_PROTOCOL_VIOLATION),
errmsg("invalid frontend message type %d",
qtype)));

Can you determine exactly which client-side code is provoking the
error?


I started recording all the raw network data and waited for the error
in the log. From this I have determined the machine and the likely
process. It is a telephony app written in C and using the pg
libraries. The piece in question opens a connection, verifies the
existence of the appropriate table (select from pg_ tables) and
inserts a record to that table.

All of the above works but following the terminating 0x00 of the final
insert there is about 12k of junk consisting of a mix of 0x08 and
0x80 characters ending with an 'X' (a normal connection is exactly
the same but there is no junk between the final 0x00 and 'X'). I've
only trapped one full instance so I don't know if the junk is always
the same.

Fortunately the data is actually inserted and the error occurs when
the app exits so the user-experience is not affected.

The client libraries are slightly older than the server but this
doesn't seem to be an issue as it's only happened 5-6 times in
tens-of-thousands of cases.

I'll look for causes in the code. If this symptom looks familar to
anyone, let me know.

Cheers,
Steve
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #3
Steve Crawford <sc*******@pinpointresearch.com> writes:
I started recording all the raw network data and waited for the error
in the log. From this I have determined the machine and the likely
process. It is a telephony app written in C and using the pg
libraries.


What version of libpq is it using, exactly?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #4
On Wednesday 18 August 2004 2:25 pm, Tom Lane wrote:
Steve Crawford <sc*******@pinpointresearch.com> writes:
I started recording all the raw network data and waited for the
error in the log. From this I have determined the machine and the
likely process. It is a telephony app written in C and using the
pg libraries.


What version of libpq is it using, exactly?

regards, tom lane


Client libs are 7.3.1. Client and PG libs are compiled and installed
on SCO_SV 3.2v5.0.4. IIRC (this app's developer is in Europe for a
month), the PG libs are statically compiled into the app.

Server version is 7.4.1.

We will be migrating the front-end to Linux and will update both
client and server to match.

Cheers,
Steve
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #5
Steve Crawford <sc*******@pinpointresearch.com> writes:
On Wednesday 18 August 2004 2:25 pm, Tom Lane wrote:
What version of libpq is it using, exactly?
Client libs are 7.3.1.
Server version is 7.4.1.


Hmm. Okay, so old (v2) protocol ... there's sure no reason for a bunch
of garbage in that ...

You aren't by any chance running the connection SSL-encrypted are you?
(I'd suppose not, or sniffing the network traffic wouldn't have helped,
but I see one heck of a lot of post-7.3.1 SSL-related bug fixes in the
CVS logs...)

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #6
On Wednesday 18 August 2004 3:52 pm, Tom Lane wrote:
Steve Crawford <sc*******@pinpointresearch.com> writes:
On Wednesday 18 August 2004 2:25 pm, Tom Lane wrote:
What version of libpq is it using, exactly?


Client libs are 7.3.1.
Server version is 7.4.1.


Hmm. Okay, so old (v2) protocol ... there's sure no reason for a
bunch of garbage in that ...

You aren't by any chance running the connection SSL-encrypted are
you? (I'd suppose not, or sniffing the network traffic wouldn't
have helped, but I see one heck of a lot of post-7.3.1 SSL-related
bug fixes in the CVS logs...)


I _wish_ I could read/understand raw SSL but no, it's unencrypted. I
didn't see anything unusual in the submitted data (very long text
data, etc.) so I'm going to poke around in the code and wait till the
current projects on this machine are finished so I can do a good
memtest on it.

Cheers,
Steve

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: bof | last post by:
When attempting to use stream_socket_client() the error message "Fatal error: Call to undefined function" is returned. Any suggestions as to where to start looking to resolve this? MTIA, if...
3
by: w | last post by:
Hello all!!! For a year and a half now, we have been developing different Access 2000 applications. Most of them are access frontend and access backends. Some of them have SQL server 2000 as a...
1
by: lbillson | last post by:
Whats happening: Error#: 40002 Error Item: 01000: The Statement has been terminated. > GETID 'INSERT INTO Table(Column1, Column2, Column 3, Column4, Column5, Column6) VALUES...
5
by: Boris Kuznetsov | last post by:
This occurs in an empty project when I add the following string: #using <mscorlib.dll> Can anyone tell me why would #using ... not be working???? MSDN says nothing about this error. Please...
0
by: SHC | last post by:
Hi all, I have a VC++ .NET 2003 - Windows XP Pro PC. I created a Win32 console application in my VC++ .NET 2003 and copied validateDOM.cpp, books.xml and books.xsd (see the attached files below)...
2
by: mpriem | last post by:
I am developing a C# windows application which will act as an frontend for a SQL 2000 database. I am using a laptop with SQl 2000 workgroup edition (sp4). SQL is setup to use windows...
6
by: | last post by:
The following code snippet can be build in VC 6.0, but failed in VC 2003. //////////////save the following code in t.cpp #define _MT #define _WIN32_WINNT 0x0500 #include <iostream> #include...
0
by: Greg | last post by:
Hi, creating template1 database in /var/pgsql/data1/base/1... DEBUG: invoking IpcMemoryCreate(size=1081344) FATAL: shmat(id=1179648) failed: Invalid argument What's the problem why is shmat...
3
by: quad | last post by:
Anybody has any idea what this error is? CVTRES : fatal error CVT1100: duplicate resource. type:GROUP_CURSOR, name:23460, language:0x0813
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.