Re: SegFault on 9.6.14

Jerry Sievers <gsievers19@comcast.net>

From: Jerry Sievers <gsievers19@comcast.net>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Jerry Sievers <gsievers19@comcast.net>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-07-16T23:42:03Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:

> On Wed, Jul 17, 2019 at 11:06 AM Jerry Sievers <gsievers19@comcast.net> wrote:
>
>> (gdb) p *scan->rs_parallel
>> Cannot access memory at address 0x7fa673a54108
>
> So I guess one question is: was it a valid address that's been
> unexpectedly unmapped, or is the pointer corrupted?  Any chance you
> can strace the backend and pull out the map, unmap calls?

There were about 60k lines from strace including these few...


mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3d0127a000
mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3d01239000
mmap(NULL, 287624, PROT_READ|PROT_WRITE, MAP_SHARED, 124, 0) = 0x7f3d011f2000
mmap(NULL, 262504, PROT_READ|PROT_WRITE, MAP_SHARED, 124, 0) = 0x7f3d011b1000
munmap(0x7f3d011b1000, 262504)          = 0

Thx





-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net



Commits

  1. Don't shut down Gather[Merge] early under Limit.

  2. Prohibit shutting down resources if there is a possibility of back up.

  3. Fix buffer usage stats for parallel nodes.

  4. Fix crashes on plans with multiple Gather (Merge) nodes.

  5. Separate reinitialization of shared parallel-scan state from ExecReScan.