Re: BUG #17725: Sefault when seg_in() called with a large argument

From: Robins Tharakan <tharakan(at)gmail(dot)com>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17725: Sefault when seg_in() called with a large argument
Date: 2022-12-20 12:48:19
Message-ID: CAEP4nAyECwMeeuzLW=RL4XHwCgxiQgMnfnG4ky-LP1LN82kKaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi John,

On Tue, 20 Dec 2022 at 20:44, John Naylor <john(dot)naylor(at)enterprisedb(dot)com> wrote:
> Neither query shows the reported problem in my environment on master (as of today) or v14, so not sure
> It's possibly relevant that this result is different from the "3.100000e+01" which was shown in your backtrace. Since a few details of this report don't agree with each other, I'm starting to wonder if some other relevant details got lost along the way.

Thanks for taking a look and you're possibly correct.

After trying a few combinations, I see that passing
CFLAGS="-Wuninitialized" (default for my test setup) causes this failure.
Removing the flag gives the error you mention, and possibly why this
may not be easy to reproduce on a production system (unsure).

$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

# How I trigger compilation
cd ${sourcepth} && git clean -xdf && ./configure
CFLAGS="-Wuninitialized" --prefix=${installpth} && make -j`nproc`
install ...

This is a recent crash on 69f75bf825(at)REL_12_STABLE

2022-12-20 10:24:53.361 UTC [3087004] LOG: server process (PID
3182365) was terminated by signal 11: Segmentation fault
2022-12-20 10:24:53.361 UTC [3087004] DETAIL: Failed process was
running: SELECT seg_in(numeric_out(round(31, 10000)));
2022-12-20 10:24:53.361 UTC [3087004] LOG: terminating any other
active server processes
2022-12-20 10:24:53.366 UTC [3087004] LOG: all server processes
terminated; reinitializing

I created this bug-report since I am able to reproduce this at will. But let
me know if this is uninteresting, or if I can provide any other detail to
help in triaging.

-
robins

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-12-20 16:54:46 Re: BUG #17725: Sefault when seg_in() called with a large argument
Previous Message shveta malik 2022-12-20 12:02:47 Re: BUG #17716: walsender process hang while decoding 'DROP PUBLICATION' XLOG