Re: SegFault on 9.6.14
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Jerry Sievers <gsievers19@comcast.net>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-07-16T23:49:23Z
Lists: pgsql-hackers
On Wed, Jul 17, 2019 at 11:33 AM Jerry Sievers <gsievers19@comcast.net> wrote: > -> Nested Loop Left Join (cost=251621.81..12300177.37 rows=48 width=44) > -> Gather (cost=1001.55..270403.27 rows=48 width=40) > -> Limit (cost=250620.25..250620.27 rows=1 width=20) > -> Gather (cost=1000.00..250452.00 rows=3706 width=4) One observation is that it's a rescan a bit like the one in the unsuccessful repro attempt I posted, but it has *two* Gather nodes in it (and thus two parallel query DSM segments), and only one of them should be rescanned, and from the backtrace we see that it is indeed the expected one, the one under the Limit operator. Neither of them should be getting unmapped in the leader though and AFAIK nothing happening in the workers could cause this effect, the leader would have to explicitly unmap the thing AFAIK. On Wed, Jul 17, 2019 at 11:42 AM Jerry Sievers <gsievers19@comcast.net> wrote: > 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 Ok, there go our two parallel query DSM segments, and there it is being unmapped. Hmm. Any chance you could attach a debugger, and "break munmap", "cont", and then show us the backtrace "bt" when that is reached? -- Thomas Munro https://enterprisedb.com
Commits
-
Don't shut down Gather[Merge] early under Limit.
- 1ad0df67c790 9.6.17 landed
- f7ae68aacd9d 10.12 landed
- d0ccfa9d6a3d 11.7 landed
- 1cc3a90c7551 12.2 landed
- 080313f8296f 13.0 landed
-
Prohibit shutting down resources if there is a possibility of back up.
- 2cd0acfdade8 12.0 cited
-
Fix buffer usage stats for parallel nodes.
- 19df1702f5c5 9.6.10 cited
- 85c9d3475e4f 12.0 cited
-
Fix crashes on plans with multiple Gather (Merge) nodes.
- fd7c0fa732d9 11.0 cited
-
Separate reinitialization of shared parallel-scan state from ExecReScan.
- 41b0dd987d44 11.0 cited