RE: BUG #17421: Core dump in ECPGdo() when calling PostgreSQL API from 32-bit client for RHEL8

From: "hirose(dot)masay-01(at)fujitsu(dot)com" <hirose(dot)masay-01(at)fujitsu(dot)com>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: BUG #17421: Core dump in ECPGdo() when calling PostgreSQL API from 32-bit client for RHEL8
Date: 2022-03-05 06:45:21
Message-ID: TYYPR01MB68107FD3A60E960453525BF7B8069@TYYPR01MB6810.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Tom and Michael,
>Michael Paquier <michael(at)paquier(dot)xyz> writes:
>> Hm. Could you isolate that in a self-contained test case? Based on
>> this trace, it looks like "message" is NULL, which may be possible
>> because pqInternalNotice() missed something? I would not bet on
>> errorMessage being NULL, but there may be holes..
>
>Yeah. It seems likely that this is a longstanding ecpglib bug that was previously masked by platform snprintfs not crashing on printf("%s", NULL). If so, it's masked again in 12.8 and later (cf 3779ac62d), but it's still a bug in that ecpg won't print anything useful when this edge condition --- whatever it is --- happens. So, could we see a test case?
>
> regards, tom lane
My test case to reproduce the issue is:
1. The client connects Postgres Database and issues SQL continuously.
2. Switch the Database role from Active to Standby.
The Database is mirrored by the Mirroring Controller between two clustered servers. the Mirroring Controller may be the original feature added by the enterprise.
Please let me know if you have notice and advice.
Regards,

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2022-03-05 10:29:23 Re: BUG #17421: Core dump in ECPGdo() when calling PostgreSQL API from 32-bit client for RHEL8
Previous Message egashira.yusuke@fujitsu.com 2022-03-04 11:49:39 RE: Reconnect a single connection used by multiple threads in embedded SQL in C application causes error.