Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qhYfP-003UHV-Bh for pgsql-bugs@arkaria.postgresql.org; Sat, 16 Sep 2023 17:01:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qhYeP-00GGza-Gk for pgsql-bugs@arkaria.postgresql.org; Sat, 16 Sep 2023 17:00:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qhYeP-00GGzQ-3n for pgsql-bugs@lists.postgresql.org; Sat, 16 Sep 2023 17:00:09 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qhYeL-005UT0-P2 for pgsql-bugs@lists.postgresql.org; Sat, 16 Sep 2023 17:00:08 +0000 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2b9d07a8d84so49806261fa.3 for ; Sat, 16 Sep 2023 10:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694883604; x=1695488404; darn=lists.postgresql.org; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=p8W3tEtq3VAREM3bVDUTGLIXfKMwKxPhqhcLL2m11ns=; b=HnNipCgZz+LrzC3rYDYEX8ifylcy+auL4QLR8RiqjLllxhbR0L3dNcWTeFARw5qwJv AeE9et/R4sZr07IdgpLa+rGvLkFwSogYDTpwXWBjtTsgrW/8EqWrlF2iv5FxuIJ/bVPt fih1nnc9iCteY4vtARRHdGkheLZYG2rTyDA8FOsH+PR8+cYwInUmDldru5s3+lOhb9EA Ql9IPQxTYv4ZGkE+D7aa4FAtEOk5e+S0vK55V8RcKMjtSHyA9nQluNvUoS8lpj3pzO1b qRSwLWSDfZrh4dClBBCFGHeOEbEo1PcXokgHCgSrxtLYDhdvMSupGST1G0TSASLRIrXF BKSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694883604; x=1695488404; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=p8W3tEtq3VAREM3bVDUTGLIXfKMwKxPhqhcLL2m11ns=; b=du0R0M5zxaSytnhO/4TAIfPdpvIT4/tzxxEOPCSTlG3YTrzR65YLFNfHsWKtWjQEqn hyfv1DPOml5X36EE9p2FvVcm8wP8kpGCJaHCIksFl3FUBHMkliTH+VqZ1cXQWq7z9hKX lv9OrcH/uUTc5CUZ5B0oh/TB1ICxiA8Tsu0bdNFA32/6Yye+qysIqDq2x9+45r8u+Qna 96vegKEyyw9mILGq8H0n6RHTcLj80weQ0st29MA/rvBZSZNOu66E7+OsLf+nZCnQ8Du/ /flcku26jiCDL9Ak/+Vu8bxPCxmISSaU/3/aG1Z8ttqmmbwZ2U1Pj7cwWl6lHxRvQcSQ Bsrg== X-Gm-Message-State: AOJu0YyIcOkR9X1B3HqFrf1vgjAC8OOXS2cTgFoJpG0kWs71wR4bqGLI tbI0CfwUA5MlKwrW1JQuxDHVlJFUSzUWlg== X-Google-Smtp-Source: AGHT+IGz0RvSaUuo1wli2CDOpuIwcs9ZeREkT4Iz1NwNMkDA6cSwgOmiASqslxR63aJTXb3dSUdDCQ== X-Received: by 2002:a2e:8545:0:b0:2bf:d068:d926 with SMTP id u5-20020a2e8545000000b002bfd068d926mr4487424ljj.41.1694883603286; Sat, 16 Sep 2023 10:00:03 -0700 (PDT) Received: from [1.0.0.7] ([81.23.167.222]) by smtp.gmail.com with ESMTPSA id a14-20020a2e860e000000b002b6ffa50896sm1233352lji.128.2023.09.16.10.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 Sep 2023 10:00:01 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------eEo5P9j9zDRcFvL1VG6L71zb" Message-ID: <5eba3ea5-ae13-aab2-35d6-cd3e58dab08b@gmail.com> Date: Sat, 16 Sep 2023 20:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: BUG #18070: Assertion failed when processing error from plpy's iterator Content-Language: en-US To: Tom Lane , Michael Paquier Cc: pgsql-bugs@lists.postgresql.org References: <18070-ab9c171cbf4ebb0f@postgresql.org> <9fa9c154-d084-07de-8224-aab7fc8a119e@gmail.com> <3920993.1694874885@sss.pgh.pa.us> From: Alexander Lakhin In-Reply-To: <3920993.1694874885@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------eEo5P9j9zDRcFvL1VG6L71zb Content-Type: multipart/alternative; boundary="------------cWWVj1UQzMPjcEyR7dL6Vz4V" --------------cWWVj1UQzMPjcEyR7dL6Vz4V Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello, 16.09.2023 17:34, Tom Lane wrote: > Michael Paquier writes: >> On Fri, Sep 15, 2023 at 08:00:00PM +0300, Alexander Lakhin wrote: >>> + /* >>> + * When we have no detail from the error data, an exception message, >>> + * if not empty, goes in the detail. >>> + */ >>> + if (detail == NULL && xmsg != NULL) >>> detail = xmsg; >> Yeah, I think that you're right here to enforce the use of a DETAIL >> message if it exists instead of the xmsg. > I dunno about that. We're trying to shove three pounds of stuff into > a two-pound sack, which isn't going to work perfectly in any case, > but I'm not sure this is the right priority order for the available > strings. Thanks for looking at this! > In the original example with an infinite-recursion error, what we > end up with at the point of the Assert is > > (gdb) i locals > save_errno = 2 > xmsg = 0x666a8d8 "spiexceptions.StatementTooComplex: error fetching next item from iterator" > tbmsg = 0x666ace8 "Traceback (most recent call last):" > tb_depth = 1 > emsg = {data = 0x666b0f8 "error fetching next item from iterator", len = 38, > maxlen = 1024, cursor = 0} > exc = 0x18fd448 > val = 0x7f1fefe39e88 > tb = 0x7f1fef858608 > primary = 0x666b0f8 "error fetching next item from iterator" > sqlerrcode = 16777477 > detail = 0x7f1fefe21920 "spiexceptions.StatementTooComplex: stack depth limit exceeded" > hint = 0x7f1ffd5c6f78 "Increase the configuration parameter \"max_stack_depth\" (currently 2048kB), after ensuring the platform's stack depth limit is adequate." > query = 0x0 > position = 0 > schema_name = 0x0 > table_name = 0x0 > column_name = 0x0 > datatype_name = 0x0 > > Clearly, "detail" offers the key insight here and we don't want to > lose it; but xmsg seems rather duplicative of the fmt string > (which is what is reflected into emsg and primary here). > > On the other hand, in Alexander's newer test case we find > > (gdb) i locals > save_errno = 2 > xmsg = 0x191ef50 "spiexceptions.WrongObjectType: cannot open relation \"tst\"" > tbmsg = 0x191f360 "Traceback (most recent call last):" > tb_depth = 1 > emsg = {data = 0x191f770 "error fetching next item from iterator", len = 38, > maxlen = 1024, cursor = 0} > exc = 0x18f02f8 > val = 0x7f1fefda7e88 > tb = 0x7f1fefcfd3c8 > primary = 0x191f770 "error fetching next item from iterator" > sqlerrcode = 151027844 > detail = 0x7f1fefe1fa20 "This operation is not supported for composite types." > hint = 0x0 > query = 0x7f1fefcfc3c0 "SELECT * FROM tst" > position = 15 > schema_name = 0x0 > table_name = 0x0 > column_name = 0x0 > datatype_name = 0x0 > > Here, xmsg seems strictly more useful than fmt, but the patch as > proposed would discard xmsg. > > I wonder if we shouldn't simply say the rule is that xmsg, if set, > overrides fmt. This'd likely have some impact on existing test > cases, but perhaps the net result would be no worse? When looking for a representative query for a regression test, I've also discovered that the result is not always appealing. Yes, for the case "SELECT * FROM some_type" you mentioned, with the patched version we get "detail" from the underlying exception: DETAIL:  This operation is not supported for composite types. But without the patch we get "message": DETAIL:  spiexceptions.WrongObjectType: cannot open relation "tst" In this case the difference is minor, but I would prefer to get a message with the relation name. I've tested another case, with to_date():                 ereturn(escontext, -1, (errcode(ERRCODE_INVALID_DATETIME_FORMAT),                                  errmsg("invalid value \"%s\" for \"%s\"",                                                 copy, node->key->name),                                  errdetail("Value must be an integer."))); With the patched version, the error produced by: CREATE FUNCTION python_error_detail() RETURNS SETOF text AS $$   plan = plpy.prepare("SELECT to_date('DD', 'DD') d")   for row in plpy.cursor(plan):     yield row['d'] $$ LANGUAGE plpython3u; SELECT python_error_detail(); looks as follows:  ERROR:  error fetching next item from iterator  DETAIL:  Value must be an integer.  CONTEXT:  Traceback (most recent call last):  PL/Python function "python_error_detail" I can't say that the detail info "Value must be an integer" is useful here. So if we omit the exception message, while keeping the detail, we loose a higher importance level of information in the stack (or a sack): 1) plpy_elog message 2) underlying exception message 3) underlying exception detail 4) underlying exception hint I also thought about omitting the underlying exception detail, thus just doing mapping: "plpy_elog message" -> message, "underlying exception message" -> detail, "underlying exception hint" -> hint, but it seems that presenting a hint without an intermediate level of information (detail) could look weird in some cases too. So my next idea was to concatenate "underlying exception message" + "underlying exception detail" and to put the result in the detail. It seems that it works pretty well, e.g. for the case with to_date(), we get: SELECT python_error_detail(); ERROR:  error fetching next item from iterator DETAIL:  spiexceptions.InvalidDatetimeFormat: invalid value "DD" for "DD" Value must be an integer. CONTEXT:  Traceback (most recent call last): PL/Python function "python_error_detail" (I've confirmed that all these strings are localized correctly.) With the stack overflow case, the function PLy_elog() called recursively, so the output looks like: SELECT pyfunc(); ERROR:  error fetching next item from iterator DETAIL:  spiexceptions.StatementTooComplex: error fetching next item from iterator spiexceptions.StatementTooComplex: error fetching next item from iterator ... spiexceptions.StatementTooComplex: error fetching next item from iterator spiexceptions.StatementTooComplex: error fetching next item from iterator spiexceptions.StatementTooComplex: stack depth limit exceeded HINT:  Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate. CONTEXT:  Traceback (most recent call last): PL/Python function "pyfunc" This lengthy output is similar to what we get with a recursion in plperl, so I don't consider this as an issue, but may be we could just check the length of an error message before concatenation... Please look at the v2 patch, which contains an addition to regression tests for the master. If you agree with this approach, I'll make patches for back branches as well... Best regards, Alexander --------------cWWVj1UQzMPjcEyR7dL6Vz4V Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Hello,

16.09.2023 17:34, Tom Lane wrote:
Michael Paquier <michael@paquier.xyz> writes:
On Fri, Sep 15, 2023 at 08:00:00PM +0300, Alexander Lakhin wrote:
+        /*
+         * When we have no detail from the error data, an exception message,
+         * if not empty, goes in the detail.
+         */
+        if (detail == NULL && xmsg != NULL)
		detail = xmsg;

      
Yeah, I think that you're right here to enforce the use of a DETAIL
message if it exists instead of the xmsg.
I dunno about that.  We're trying to shove three pounds of stuff into
a two-pound sack, which isn't going to work perfectly in any case,
but I'm not sure this is the right priority order for the available
strings.

Thanks for looking at this!

In the original example with an infinite-recursion error, what we
end up with at the point of the Assert is

(gdb) i locals
save_errno = 2
xmsg = 0x666a8d8 "spiexceptions.StatementTooComplex: error fetching next item from iterator"
tbmsg = 0x666ace8 "Traceback (most recent call last):"
tb_depth = 1
emsg = {data = 0x666b0f8 "error fetching next item from iterator", len = 38, 
  maxlen = 1024, cursor = 0}
exc = 0x18fd448
val = 0x7f1fefe39e88
tb = 0x7f1fef858608
primary = 0x666b0f8 "error fetching next item from iterator"
sqlerrcode = 16777477
detail = 0x7f1fefe21920 "spiexceptions.StatementTooComplex: stack depth limit exceeded"
hint = 0x7f1ffd5c6f78 "Increase the configuration parameter \"max_stack_depth\" (currently 2048kB), after ensuring the platform's stack depth limit is adequate."
query = 0x0
position = 0
schema_name = 0x0
table_name = 0x0
column_name = 0x0
datatype_name = 0x0

Clearly, "detail" offers the key insight here and we don't want to
lose it; but xmsg seems rather duplicative of the fmt string
(which is what is reflected into emsg and primary here).

On the other hand, in Alexander's newer test case we find

(gdb) i locals
save_errno = 2
xmsg = 0x191ef50 "spiexceptions.WrongObjectType: cannot open relation \"tst\""
tbmsg = 0x191f360 "Traceback (most recent call last):"
tb_depth = 1
emsg = {data = 0x191f770 "error fetching next item from iterator", len = 38, 
  maxlen = 1024, cursor = 0}
exc = 0x18f02f8
val = 0x7f1fefda7e88
tb = 0x7f1fefcfd3c8
primary = 0x191f770 "error fetching next item from iterator"
sqlerrcode = 151027844
detail = 0x7f1fefe1fa20 "This operation is not supported for composite types."
hint = 0x0
query = 0x7f1fefcfc3c0 "SELECT * FROM tst"
position = 15
schema_name = 0x0
table_name = 0x0
column_name = 0x0
datatype_name = 0x0

Here, xmsg seems strictly more useful than fmt, but the patch as
proposed would discard xmsg.

I wonder if we shouldn't simply say the rule is that xmsg, if set,
overrides fmt.  This'd likely have some impact on existing test
cases, but perhaps the net result would be no worse?

When looking for a representative query for a regression test, I've
also discovered that the result is not always appealing.

Yes, for the case "SELECT * FROM some_type" you mentioned, with the patched
version we get "detail" from the underlying exception:
DETAIL:  This operation is not supported for composite types.

But without the patch we get "message":
DETAIL:  spiexceptions.WrongObjectType: cannot open relation "tst"

In this case the difference is minor, but I would prefer to get a message
with the relation name.
I've tested another case, with to_date():
                ereturn(escontext, -1,
                                (errcode(ERRCODE_INVALID_DATETIME_FORMAT),
                                 errmsg("invalid value \"%s\" for \"%s\"",
                                                copy, node->key->name),
                                 errdetail("Value must be an integer.")));

With the patched version, the error produced by:
CREATE FUNCTION python_error_detail() RETURNS SETOF text AS $$
  plan = plpy.prepare("SELECT to_date('DD', 'DD') d")
  for row in plpy.cursor(plan):
    yield row['d']
$$ LANGUAGE plpython3u;

SELECT python_error_detail();

looks as follows:
 ERROR:  error fetching next item from iterator
 DETAIL:  Value must be an integer.
 CONTEXT:  Traceback (most recent call last):
 PL/Python function "python_error_detail"

I can't say that the detail info "Value must be an integer" is useful here.

So if we omit the exception message, while keeping the detail, we loose a
higher importance level of information in the stack (or a sack):
1) plpy_elog message
2) underlying exception message
3) underlying exception detail
4) underlying exception hint

I also thought about omitting the underlying exception detail, thus just
doing mapping:
"plpy_elog message" -> message,
"underlying exception message" -> detail,
"underlying exception hint" -> hint,
but it seems that presenting a hint without an intermediate level of
information (detail) could look weird in some cases too.

So my next idea was to concatenate "underlying exception message" +
"underlying exception detail" and to put the result in the detail.

It seems that it works pretty well, e.g. for the case with to_date(), we get:
SELECT python_error_detail();
ERROR:  error fetching next item from iterator
DETAIL:  spiexceptions.InvalidDatetimeFormat: invalid value "DD" for "DD"
Value must be an integer.
CONTEXT:  Traceback (most recent call last):
PL/Python function "python_error_detail"

(I've confirmed that all these strings are localized correctly.)

With the stack overflow case, the function PLy_elog() called recursively,
so the output looks like:
SELECT pyfunc();
ERROR:  error fetching next item from iterator
DETAIL:  spiexceptions.StatementTooComplex: error fetching next item from iterator
spiexceptions.StatementTooComplex: error fetching next item from iterator

...
spiexceptions.StatementTooComplex: error fetching next item from iterator
spiexceptions.StatementTooComplex: error fetching next item from iterator
spiexceptions.StatementTooComplex: stack depth limit exceeded
HINT:  Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate.
CONTEXT:  Traceback (most recent call last):
PL/Python function "pyfunc"

This lengthy output is similar to what we get with a recursion in plperl,
so I don't consider this as an issue, but may be we could just check
the length of an error message before concatenation...

Please look at the v2 patch, which contains an addition to regression tests for the master.
If you agree with this approach, I'll make patches for back branches as well...

Best regards,
Alexander
--------------cWWVj1UQzMPjcEyR7dL6Vz4V-- --------------eEo5P9j9zDRcFvL1VG6L71zb Content-Type: text/x-patch; charset=UTF-8; name="v2-01-fix-plpy_elog.patch" Content-Disposition: attachment; filename="v2-01-fix-plpy_elog.patch" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3NyYy9wbC9wbHB5dGhvbi9leHBlY3RlZC9wbHB5dGhvbl9lcnJvci5v dXQgYi9zcmMvcGwvcGxwe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