From: Andrus <kobruleht2@hot.ee>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: How to fix 0xC0000005 exception in Postgres 9.0
Date: Fri, 21 Feb 2020 19:01:05 +0200
Message-ID: <F592D9984F1042BC8F30909A3A7A733B@dell2> (raw)
In-Reply-To: <21459e71-77c1-c3d0-a3e4-e2b97fd1efc3@aklaver.com>
References: <20200220224220.GA25223@alvherre.pgsql>
<21459e71-77c1-c3d0-a3e4-e2b97fd1efc3@aklaver.com>
Hi!
>Realized I should have been clearer. By pre-libpq I meant this:
>https://odbc.postgresql.org/docs/release.html
>psqlODBC 09.05.0100 Release
>Changes:
> Use libpq for all communication with the server
> Previously, libpq was only used for authentication. Using it for all
> communication lets us remove a lot of duplicated code. libpq is now
> required for building or using libpq.
I upgraded psqlodbc driver to 12.1 version but problem persists.
After server is manually started, application works.
I added log_statement = 'all' . Log before crash is:
2020-02-21 18:46:40 EET mydbadmin mydb LOG: statement: SELECT
drop_table('temptulemus')
2020-02-21 18:46:40 EET mydbadmin mydb LOG: statement: create temp table
temptulemus as SELECT * FROM andmetp ;select * from temptulemus limit 0
2020-02-21 18:46:40 EET mydbadmin mydb LOG: statement: select n.nspname,
c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen,
a.atttypmod, a.attnotnull, c.relhasrules, c.relkind, c.oid,
pg_get_expr(d.adbin, d.adrelid), case t.typtype when 'd' then t.typbasetype
else 0 end, t.typtypmod, c.relhasoids, '', c.relhassubclass from
(((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid =
c.relnamespace and c.oid = 28203181) inner join pg_catalog.pg_attribute a on
(not a.attisdropped) and a.attnum > 0 and a.attrelid = c.oid) inner join
pg_catalog.pg_type t on t.oid = a.atttypid) left outer join pg_attrdef d on
a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum order by
n.nspname, c.relname, attnum
2020-02-21 18:46:40 EET mydbadmin mydb LOG: statement: select COUNT(*)::int
from temptulemus
2020-02-21 18:46:40 EET mydbadmin mydb LOG: statement: ;SELECT * FROM
temptulemus offset 0 limit 900
2020-02-21 18:46:40 EET LOG: server process (PID 6000) was terminated by
exception 0xC0000005
2020-02-21 18:46:40 EET HINT: See C include file "ntstatus.h" for a
description of the hexadecimal value.
2020-02-21 18:46:40 EET LOG: terminating any other active server
processes
So command which causes crash is
SELECT * FROM temptulemus offset 0 limit 900
As shown in lines before this is data from andmetp table. This table
contains text type column. This column may contain data like <script>
Maybe this causes postgres crash. Or maybe some unicode character in table
cause crash. This table does not contain binary data.
Database encoding is UTF-8.
There is also other server in Linux
PostgreSQL 9.6.2 on x86_64-pc-linux-gnu, compiled by gcc (Debian 4.9.2-10)
4.9.2, 64-bit
which drops connection when reading the same table. Itlooks like in this
case linux re-starts process automatically so application starts.
Table contents are similar in both servers.
Andrus.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: kobruleht2@hot.ee, alvherre@2ndquadrant.com, adrian.klaver@aklaver.com
Subject: Re: How to fix 0xC0000005 exception in Postgres 9.0
In-Reply-To: <F592D9984F1042BC8F30909A3A7A733B@dell2>
References: <20200220224220.GA25223@alvherre.pgsql> <21459e71-77c1-c3d0-a3e4-e2b97fd1efc3@aklaver.com> <F592D9984F1042BC8F30909A3A7A733B@dell2>
* 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