segfault with Parallel Scan

From: "Liu, Huailing" <liuhuailing(at)cn(dot)fujitsu(dot)com>
To: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: segfault with Parallel Scan
Date: 2020-11-04 02:42:54
Message-ID: f1f397343777472da0d92e1fc2560c62@G08CNEXMBPEKD06.g08.fujitsu.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi

When using pgjdbc running querys that causes the server to segfault.

Using Spark to send querys by pgjdbc driver, when running a query ,parallel Scan is used.
send select sql 100 times in 1 second.

The query is like this.
select b from test where a=xxxxx

Query Plan
-----------------------------------------------------------------------------------------------------
Gather (cost=1000.00..19893.34 rows=1 width=2) (actual time=136.482..137.360 rows=1 loops=1)
Workers Planned: 2
Workers Launched: 2
Parallel Seq Scan on test (cost=0.00..18893.24 rows=1 width=2) (actual time=103.487..113.051 rows=0 loops=3)
Filter: ((a)::bigint = xxxx)
Rows Removed by Filter: 178703
Planning time: 1.756 ms
Execution time: 142.099 ms
(8 行)
-----------------------------------------------------------------------------------------------------

There are many messages [stack depth limit exceeded] In Server log
-----------------------------------------------
ERROR: stack depth limit exceeded
HINT: Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate.
STATEMENT: select b from test where a= xxxx
-----------------------------------------------------

When segment fault, stack trace is as follows
-----
> │#0 0x00000000008538c3 in pg_tzset ()
> │#1 0x00000000005e44d2 in check_log_timezone ()
> │#2 0x000000000082cbb5 in call_string_check_hook.isra.14 ()
> │#3 0x000000000082df7b in InitializeOneGUCOption ()
> │#4 0x0000000000832708 in RestoreGUCState ()
> │#5 0x00000000004e402c in ParallelWorkerMain ()
> │#6 0x00000000006a1faa in StartBackgroundWorker ()
> │#7 0x00000000006add6d in maybe_start_bgworkers ()
> │#8 0x00000000006ae965 in sigusr1_handler ()
> │#9 <signal handler called>
> │#10 0x00007f7868107520 in sigprocmask () from /lib64/libc.so.6
> │#11 0x00000000006ae2e6 in reaper ()
> │#12 <signal handler called>
> │#13 0x00000000006ae7f0 in sigusr1_handler ()
> │#14 <signal handler called>
> │#15 0x00007f7868107520 in sigprocmask () from /lib64/libc.so.6
> │#16 0x00000000006ae959 in sigusr1_handler ()
> │#17 <signal handler called>
> │#18 0x00007f7868107520 in sigprocmask () from /lib64/libc.so.6
> │#19 0x00000000006ae2e6 in reaper ()
> │#20 <signal handler called>
> │#21 0x00000000006ae7f0 in sigusr1_handler ()
> │#22 <signal handler called>
> │#23 0x00007f7868107520 in sigprocmask () from /lib64/libc.so.6
> │#24 0x00000000006ae959 in sigusr1_handler ()
> │#25 <signal handler called>
> │#26 0x00007f7868107520 in sigprocmask () from /lib64/libc.so.6
> │#27 0x00000000006ae2e6 in reaper ()
> │#28 <signal handler called>
> │#29 0x00000000006ae7f0 in sigusr1_handler (
 -----

Environment details:
----------------------------------
PostgreSQL version: 10.3
Operating system: centOS 7.4
メモリ :2TB
PGJDBC
Spark
------------------------------------
Extensions are used as follows.
shared_preload_libraries = 'pg_bigm, pg_hint_plan, pg_stat_statements, pg_dbms_stats, auto_explain'

Please help us investigate the roots of problem.

regards, Liu

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2020-11-04 04:02:55 Re: segfault with Parallel Scan
Previous Message Tom Lane 2020-11-04 00:22:14 Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch