Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid

Noah Misch <noah@leadboat.com>

From: Noah Misch <noah@leadboat.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Daniel Gustafsson <daniel@yesql.se>, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, "9erthalion6@gmail.com" <9erthalion6@gmail.com>, "sfrost@snowman.net" <sfrost@snowman.net>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2019-04-08T14:48:04Z
Lists: pgsql-hackers
On Mon, Apr 08, 2019 at 08:07:28PM +1200, Thomas Munro wrote:
> On Mon, Apr 8, 2019 at 6:42 PM Noah Misch <noah@leadboat.com> wrote:
> > - lorikeet's FailedAssertion("!(vmq->mq_sender == ((void *)0))" looked
> >   suspicious, but this happened six other times in the past year[2], always on
> >   v10 lorikeet.
> 
> It happens on v11 too:
> 
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lorikeet&dt=2018-09-25%2010%3A06%3A31
> 
> The text changed slightly because we dropped an unnecessary extra
> pointer-to-volatile:
> 
> FailedAssertion("!(mq->mq_sender == ((void *)0))"
> 
> So either two workers started with the same parallel worker number, or
> something unexpectedly overwrote the shm_mq struct?

Ahh.  In that case, it's a duplicate of
https://postgr.es/m/flat/136712b0-0619-5619-4634-0f0286acaef7%402ndQuadrant.com



Commits

  1. Probe only 127.0.0.1 when looking for ports on Unix.

  2. Don't write to stdin of a test process that could have already exited.

  3. Test both 0.0.0.0 and 127.0.0.x addresses to find a usable port.

  4. MSYS: Translate REGRESS_SHLIB to a Windows file name.

  5. MSYS: Skip src/test/recovery/t/017_shm.pl.

  6. When Perl "kill(9, ...)" fails, try "pg_ctl kill".

  7. Consistently test for in-use shared memory.

  8. Revert "Consistently test for in-use shared memory."

  9. Silence -Wimplicit-fallthrough in sysv_shmem.c.

  10. Make src/test/recovery/t/017_shm.pl safe for concurrent execution.

  11. Update HINT for pre-existing shared memory block.

  12. Add WL_EXIT_ON_PM_DEATH pseudo-event.

  13. The default values for shared_buffers and max_connections are now 1000

  14. XLOG (and related) changes:

  15. Significant cleanups in SysV IPC handling (shared mem and semaphores).