Re: [May be a bug] double free or corruption

From: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
To: Wen Yi <wen-yi(at)qq(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [May be a bug] double free or corruption
Date: 2023-07-27 14:40:37
Message-ID: CAExHW5virSLudu0GMH3QzD9mRJJtKd+tw5DLf3CwzeW4tG3L4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Wen,

On Wed, Jul 26, 2023 at 7:55 PM Wen Yi <wen-yi(at)qq(dot)com> wrote:
... snip ...
> ----- Backtrace -----
> corrupted double-linked list
>
>
> Fatal signal: Aborted
> ----- Backtrace -----
> done
> server started
> 0x5557bf5908b0 ???
... snip ...
> ---------------------
> A fatal error internal to GDB has been detected, further
> debugging is not possible. GDB will now terminate.
>
> This is a bug, please report it. For instructions, see:
> <https://www.gnu.org/software/gdb/bugs/>.
>
> Aborted (core dumped)
> [postgres(at)fedora postgres]$
>
> --------------------------------------------------------------------------------------------------------------
>
> As you can see, the gdb tell me I should report this, because gdb think there's a double-free.
> But I check the postgres, it keep the run rightly, like this:(Before I run the psql, I print the log file)
>

I think you hit a gdb bug. The error message from gdb references
https://www.gnu.org/software/gdb/bugs/ which has instructions on
reporting bugs about gdb.

> 2023-07-26 22:16:17.489 CST [83554] LOG: database system is ready to accept connections
> [postgres(at)fedora postgres]$ psql
> psql (17devel)
> Type "help" for help.
>
> postgres=# \q
> [postgres(at)fedora postgres]$

I guess gdb hit this bug after detaching from the backend you were
debugging. So it continued running. In case it crashed because
something went wrong. postmaster will just restart all the backends
and will allow you to reconnect.

--
Best Wishes,
Ashutosh Bapat

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikita Malakhov 2023-07-27 14:45:57 Re: POC: Extension for adding distributed tracing - pg_tracing
Previous Message Ashutosh Bapat 2023-07-27 14:09:45 Memory consumed by child SpecialJoinInfo in partitionwise join planning