Hi, I started looking at this patch today. The first thing I usually do for new patches is a stress test, so I did a simple script that generates random table and runs a random query with IN() clause with various configs (parallel query, index-only scans, ...). And it got stuck on a parallel query pretty quick.
I've seen a bunch of those cases, so it's not a particularly unlikely issue. The backtraces look pretty much the same in all cases - the processes are stuck either waiting on the conditional variable in _bt_parallel_seize, or trying to send data in shm_mq_send_bytes. Attached is the script I use for stress testing (pretty dumb, just a bunch of loops generating tables + queries), and backtraces for two lockups (one is EXPLAIN ANALYZE, but otherwise exactly the same). I haven't investigated why this is happening, but I wonder if this might be similar to the parallel hashjoin issues, with trying to send data, but the receiver being unable to proceed and effectively working on the sender. But that's just a wild guess. regards -- Tomas Vondra
292688 ? Ss 0:00 postgres: tomas test [local] EXPLAIN 292689 ? Ss 0:00 postgres: parallel worker for PID 292688 292690 ? Ss 0:00 postgres: parallel worker for PID 292688 292691 ? Ss 0:00 postgres: parallel worker for PID 292688 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007feb0e329de3 in epoll_wait (epfd=5, events=0x561860180170, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 30 ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory. (gdb) b Breakpoint 1 at 0x7feb0e329de3: file ../sysdeps/unix/sysv/linux/epoll_wait.c, line 30. (gdb) bt #0 0x00007feb0e329de3 in epoll_wait (epfd=5, events=0x561860180170, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 #1 0x000056185e0346b9 in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7fff5bfa0880, cur_timeout=-1, set=0x561860180108) at latch.c:1570 #2 WaitEventSetWait (set=0x561860180108, timeout=timeout@entry=-1, occurred_events=occurred_events@entry=0x7fff5bfa08c0, nevents=nevents@entry=1, wait_event_info=wait_event_info@entry=134217735) at latch.c:1516 #3 0x000056185e0349a2 in WaitLatch (latch=<optimized out>, wakeEvents=wakeEvents@entry=33, timeout=timeout@entry=-1, wait_event_info=wait_event_info@entry=134217735) at latch.c:538 #4 0x000056185e03fa6f in ConditionVariableTimedSleep (cv=cv@entry=0x7feb0c0fd218, timeout=timeout@entry=-1, wait_event_info=wait_event_info@entry=134217735) at condition_variable.c:163 #5 0x000056185e03fbfe in ConditionVariableSleep (cv=cv@entry=0x7feb0c0fd218, wait_event_info=wait_event_info@entry=134217735) at condition_variable.c:98 #6 0x000056185dd85f9c in _bt_parallel_seize (scan=scan@entry=0x56186029e438, pageno=pageno@entry=0x7fff5bfa09cc, first=first@entry=false) at nbtree.c:858 #7 0x000056185dd8740f in _bt_steppage (scan=scan@entry=0x56186029e438, dir=ForwardScanDirection) at nbtsearch.c:2214 #8 0x000056185dd87f81 in _bt_next (scan=scan@entry=0x56186029e438, dir=dir@entry=ForwardScanDirection) at nbtsearch.c:1592 #9 0x000056185dd84a98 in btgettuple (scan=0x56186029e438, dir=ForwardScanDirection) at nbtree.c:262 #10 0x000056185dd7c891 in index_getnext_tid (scan=scan@entry=0x56186029e438, direction=direction@entry=ForwardScanDirection) at indexam.c:591 #11 0x000056185dd7c9db in index_getnext_slot (scan=scan@entry=0x56186029e438, direction=direction@entry=ForwardScanDirection, slot=slot@entry=0x561860292be0) at indexam.c:683 #12 0x000056185dee65ab in IndexNext (node=0x561860292950) at nodeIndexscan.c:130 #13 0x000056185decb648 in ExecProcNodeInstr (node=0x561860292950) at execProcnode.c:485 #14 0x000056185dedde11 in ExecProcNode (node=0x561860292950) at ../../../src/include/executor/executor.h:278 #15 gather_getnext (gatherstate=0x561860292778) at nodeGather.c:287 #16 ExecGather (pstate=0x561860292778) at nodeGather.c:222 #17 0x000056185decb648 in ExecProcNodeInstr (node=0x561860292778) at execProcnode.c:485 #18 0x000056185dec4e5a in ExecProcNode (node=0x561860292778) at ../../../src/include/executor/executor.h:278 #19 ExecutePlan (execute_once=<optimized out>, dest=0x56185e4dfde0 <donothingDR>, direction=<optimized out>, numberTuples=0, sendTuples=true, operation=CMD_SELECT, use_parallel_mode=<optimized out>, planstate=0x561860292778, estate=0x561860292538) at execMain.c:1641 #20 standard_ExecutorRun (queryDesc=0x5618601b9940, direction=<optimized out>, count=0, execute_once=<optimized out>) at execMain.c:358 #21 0x000056185de66e7e in ExplainOnePlan (plannedstmt=plannedstmt@entry=0x56186027e840, into=into@entry=0x0, es=es@entry=0x5618601b2f18, queryString=queryString@entry=0x561860185198 "explain (analyze, timing off) select * from t_1 where id in ( 47, 80, 13, 46, 79, 12, 45, 78, 11, 44, 77, 10, 43, 76, 9, 42, 75, 8, 41, 74, 7, 40, 73, 6, 39, 72, 5, 38, 71, 4, 37, 70, 3, 36, 69, 2, 35"..., params=params@entry=0x0, queryEnv=queryEnv@entry=0x0, planduration=0x7fff5bfa0e68, bufusage=0x0, mem_counters=0x0) at explain.c:705 #22 0x000056185de676e7 in standard_ExplainOneQuery (query=<optimized out>, cursorOptions=2048, into=0x0, es=0x5618601b2f18, queryString=0x561860185198 "explain (analyze, timing off) select * from t_1 where id in ( 47, 80, 13, 46, 79, 12, 45, 78, 11, 44, 77, 10, 43, 76, 9, 42, 75, 8, 41, 74, 7, 40, 73, 6, 39, 72, 5, 38, 71, 4, 37, 70, 3, 36, 69, 2, 35"..., params=0x0, queryEnv=0x0) at explain.c:512 #23 0x000056185de67ea6 in ExplainQuery (pstate=<optimized out>, stmt=0x561860186f08, params=0x0, dest=<optimized out>) at explain.c:345 #24 0x000056185e05d094 in standard_ProcessUtility (pstmt=0x561860186fa0, queryString=0x561860185198 "explain (analyze, timing off) select * from t_1 where id in ( 47, 80, 13, 46, 79, 12, 45, 78, 11, 44, 77, 10, 43, 76, 9, 42, 75, 8, 41, 74, 7, 40, 73, 6, 39, 72, 5, 38, 71, 4, 37, 70, 3, 36, 69, 2, 35"..., readOnlyTree=<optimized out>, context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, dest=0x5618601b2e78, qc=0x7fff5bfa1130) at utility.c:863 #25 0x000056185e05b72c in PortalRunUtility (portal=portal@entry=0x561860202688, pstmt=0x561860186fa0, isTopLevel=isTopLevel@entry=true, setHoldSnapshot=setHoldSnapshot@entry=true, dest=dest@entry=0x5618601b2e78, qc=qc@entry=0x7fff5bfa1130) at pquery.c:1158 #26 0x000056185e05bac7 in FillPortalStore (portal=portal@entry=0x561860202688, isTopLevel=isTopLevel@entry=true) at pquery.c:1031 #27 0x000056185e05bd8d in PortalRun (portal=portal@entry=0x561860202688, count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=true, run_once=run_once@entry=true, dest=dest@entry=0x561860261688, altdest=altdest@entry=0x561860261688, qc=0x7fff5bfa1320) at pquery.c:763 #28 0x000056185e05809c in exec_simple_query ( query_string=0x561860185198 "explain (analyze, timing off) select * from t_1 where id in ( 47, 80, 13, 46, 79, 12, 45, 78, 11, 44, 77, 10, 43, 76, 9, 42, 75, 8, 41, 74, 7, 40, 73, 6, 39, 72, 5, 38, 71, 4, 37, 70, 3, 36, 69, 2, 35"...) at postgres.c:1284 #29 0x000056185e059b16 in PostgresMain (dbname=<optimized out>, username=<optimized out>) at postgres.c:4766 #30 0x000056185e0549df in BackendMain (startup_data=<optimized out>, startup_data_len=<optimized out>) at backend_startup.c:107 #31 0x000056185dfcb86b in postmaster_child_launch (child_type=child_type@entry=B_BACKEND, startup_data=startup_data@entry=0x7fff5bfa17ac "", startup_data_len=startup_data_len@entry=4, client_sock=client_sock@entry=0x7fff5bfa17b0) at launch_backend.c:274 #32 0x000056185dfcea53 in BackendStartup (client_sock=0x7fff5bfa17b0) at postmaster.c:3415 #33 ServerLoop () at postmaster.c:1648 #34 0x000056185dfd0610 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x56186017f910) at postmaster.c:1346 #35 0x000056185dd26413 in main (argc=3, argv=0x56186017f910) at main.c:197 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007feb0e329de3 in epoll_wait (epfd=5, events=0x561860180170, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 30 ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory. (gdb) bt #0 0x00007feb0e329de3 in epoll_wait (epfd=5, events=0x561860180170, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 #1 0x000056185e0346b9 in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7fff5bfa1300, cur_timeout=-1, set=0x561860180108) at latch.c:1570 #2 WaitEventSetWait (set=0x561860180108, timeout=timeout@entry=-1, occurred_events=occurred_events@entry=0x7fff5bfa1340, nevents=nevents@entry=1, wait_event_info=wait_event_info@entry=134217764) at latch.c:1516 #3 0x000056185e0349a2 in WaitLatch (latch=<optimized out>, wakeEvents=wakeEvents@entry=33, timeout=timeout@entry=0, wait_event_info=wait_event_info@entry=134217764) at latch.c:538 #4 0x000056185e03ae11 in shm_mq_send_bytes (mqh=mqh@entry=0x561860210fb0, nbytes=57, data=0x56186025c540, nowait=nowait@entry=false, bytes_written=bytes_written@entry=0x7fff5bfa1420) at shm_mq.c:1018 #5 0x000056185e03b2b4 in shm_mq_sendv (mqh=0x561860210fb0, iov=iov@entry=0x7fff5bfa1470, iovcnt=iovcnt@entry=1, nowait=nowait@entry=false, force_flush=force_flush@entry=false) at shm_mq.c:493 #6 0x000056185e03b4a1 in shm_mq_send (mqh=<optimized out>, nbytes=<optimized out>, data=data@entry=0x56186025c540, nowait=nowait@entry=false, force_flush=force_flush@entry=false) at shm_mq.c:337 #7 0x000056185deff4b9 in tqueueReceiveSlot (slot=<optimized out>, self=0x56186020fca8) at tqueue.c:63 #8 0x000056185dec4e8c in ExecutePlan (execute_once=<optimized out>, dest=0x56186020fca8, direction=<optimized out>, numberTuples=0, sendTuples=true, operation=CMD_SELECT, use_parallel_mode=<optimized out>, planstate=0x56186025b3f0, estate=0x56186025b178) at execMain.c:1672 #9 standard_ExecutorRun (queryDesc=0x5618602590a0, direction=<optimized out>, count=0, execute_once=<optimized out>) at execMain.c:358 #10 0x000056185dec9187 in ParallelQueryMain (seg=0x5618601b84e8, toc=0x7feb0ea49000) at execParallel.c:1472 #11 0x000056185ddac39b in ParallelWorkerMain (main_arg=<optimized out>) at parallel.c:1524 #12 0x000056185dfc974e in BackgroundWorkerMain (startup_data=<optimized out>, startup_data_len=<optimized out>) at bgworker.c:842 #13 0x000056185dfcb86b in postmaster_child_launch (child_type=child_type@entry=B_BG_WORKER, startup_data=startup_data@entry=0x5618601bb510 "parallel worker for PID 292688", startup_data_len=startup_data_len@entry=1472, client_sock=client_sock@entry=0x0) at launch_backend.c:274 #14 0x000056185dfcd3ee in do_start_bgworker (rw=0x5618601bb510) at postmaster.c:3916 #15 maybe_start_bgworkers () at postmaster.c:4123 #16 0x000056185dfce207 in LaunchMissingBackgroundProcesses () at postmaster.c:3237 #17 ServerLoop () at postmaster.c:1663 #18 0x000056185dfd0610 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x56186017f910) at postmaster.c:1346 #19 0x000056185dd26413 in main (argc=3, argv=0x56186017f910) at main.c:197 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007feb0e329de3 in epoll_wait (epfd=5, events=0x561860180170, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 30 ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory. (gdb) bt #0 0x00007feb0e329de3 in epoll_wait (epfd=5, events=0x561860180170, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 #1 0x000056185e0346b9 in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7fff5bfa1230, cur_timeout=-1, set=0x561860180108) at latch.c:1570 #2 WaitEventSetWait (set=0x561860180108, timeout=timeout@entry=-1, occurred_events=occurred_events@entry=0x7fff5bfa1270, nevents=nevents@entry=1, wait_event_info=wait_event_info@entry=134217735) at latch.c:1516 #3 0x000056185e0349a2 in WaitLatch (latch=<optimized out>, wakeEvents=wakeEvents@entry=33, timeout=timeout@entry=-1, wait_event_info=wait_event_info@entry=134217735) at latch.c:538 #4 0x000056185e03fa6f in ConditionVariableTimedSleep (cv=cv@entry=0x7feb0ea49218, timeout=timeout@entry=-1, wait_event_info=wait_event_info@entry=134217735) at condition_variable.c:163 #5 0x000056185e03fbfe in ConditionVariableSleep (cv=cv@entry=0x7feb0ea49218, wait_event_info=wait_event_info@entry=134217735) at condition_variable.c:98 #6 0x000056185dd85f9c in _bt_parallel_seize (scan=scan@entry=0x5618602109a8, pageno=pageno@entry=0x7fff5bfa137c, first=first@entry=false) at nbtree.c:858 #7 0x000056185dd8740f in _bt_steppage (scan=scan@entry=0x5618602109a8, dir=ForwardScanDirection) at nbtsearch.c:2214 #8 0x000056185dd87f81 in _bt_next (scan=scan@entry=0x5618602109a8, dir=dir@entry=ForwardScanDirection) at nbtsearch.c:1592 #9 0x000056185dd84a98 in btgettuple (scan=0x5618602109a8, dir=ForwardScanDirection) at nbtree.c:262 #10 0x000056185dd7c891 in index_getnext_tid (scan=scan@entry=0x5618602109a8, direction=direction@entry=ForwardScanDirection) at indexam.c:591 #11 0x000056185dd7c9db in index_getnext_slot (scan=scan@entry=0x5618602109a8, direction=direction@entry=ForwardScanDirection, slot=slot@entry=0x56186025bb28) at indexam.c:683 #12 0x000056185dee65ab in IndexNext (node=0x56186025b3f0) at nodeIndexscan.c:130 #13 0x000056185decb648 in ExecProcNodeInstr (node=0x56186025b3f0) at execProcnode.c:485 #14 0x000056185dec4e5a in ExecProcNode (node=0x56186025b3f0) at ../../../src/include/executor/executor.h:278 #15 ExecutePlan (execute_once=<optimized out>, dest=0x56186020fca8, direction=<optimized out>, numberTuples=0, sendTuples=true, operation=CMD_SELECT, use_parallel_mode=<optimized out>, planstate=0x56186025b3f0, estate=0x56186025b178) at execMain.c:1641 #16 standard_ExecutorRun (queryDesc=0x5618602590a0, direction=<optimized out>, count=0, execute_once=<optimized out>) at execMain.c:358 #17 0x000056185dec9187 in ParallelQueryMain (seg=0x5618601b84e8, toc=0x7feb0ea49000) at execParallel.c:1472 #18 0x000056185ddac39b in ParallelWorkerMain (main_arg=<optimized out>) at parallel.c:1524 #19 0x000056185dfc974e in BackgroundWorkerMain (startup_data=<optimized out>, startup_data_len=<optimized out>) at bgworker.c:842 #20 0x000056185dfcb86b in postmaster_child_launch (child_type=child_type@entry=B_BG_WORKER, startup_data=startup_data@entry=0x5618601bad08 "parallel worker for PID 292688", startup_data_len=startup_data_len@entry=1472, client_sock=client_sock@entry=0x0) at launch_backend.c:274 #21 0x000056185dfcd3ee in do_start_bgworker (rw=0x5618601bad08) at postmaster.c:3916 #22 maybe_start_bgworkers () at postmaster.c:4123 #23 0x000056185dfce207 in LaunchMissingBackgroundProcesses () at postmaster.c:3237 #24 ServerLoop () at postmaster.c:1663 #25 0x000056185dfd0610 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x56186017f910) at postmaster.c:1346 #26 0x000056185dd26413 in main (argc=3, argv=0x56186017f910) at main.c:197 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007feb0e329de3 in epoll_wait (epfd=5, events=0x561860180170, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 30 ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory. (gdb) bt #0 0x00007feb0e329de3 in epoll_wait (epfd=5, events=0x561860180170, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 #1 0x000056185e0346b9 in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7fff5bfa1230, cur_timeout=-1, set=0x561860180108) at latch.c:1570 #2 WaitEventSetWait (set=0x561860180108, timeout=timeout@entry=-1, occurred_events=occurred_events@entry=0x7fff5bfa1270, nevents=nevents@entry=1, wait_event_info=wait_event_info@entry=134217735) at latch.c:1516 #3 0x000056185e0349a2 in WaitLatch (latch=<optimized out>, wakeEvents=wakeEvents@entry=33, timeout=timeout@entry=-1, wait_event_info=wait_event_info@entry=134217735) at latch.c:538 #4 0x000056185e03fa6f in ConditionVariableTimedSleep (cv=cv@entry=0x7feb0ea49218, timeout=timeout@entry=-1, wait_event_info=wait_event_info@entry=134217735) at condition_variable.c:163 #5 0x000056185e03fbfe in ConditionVariableSleep (cv=cv@entry=0x7feb0ea49218, wait_event_info=wait_event_info@entry=134217735) at condition_variable.c:98 #6 0x000056185dd85f9c in _bt_parallel_seize (scan=scan@entry=0x5618602109a8, pageno=pageno@entry=0x7fff5bfa137c, first=first@entry=false) at nbtree.c:858 #7 0x000056185dd8740f in _bt_steppage (scan=scan@entry=0x5618602109a8, dir=ForwardScanDirection) at nbtsearch.c:2214 #8 0x000056185dd87f81 in _bt_next (scan=scan@entry=0x5618602109a8, dir=dir@entry=ForwardScanDirection) at nbtsearch.c:1592 #9 0x000056185dd84a98 in btgettuple (scan=0x5618602109a8, dir=ForwardScanDirection) at nbtree.c:262 #10 0x000056185dd7c891 in index_getnext_tid (scan=scan@entry=0x5618602109a8, direction=direction@entry=ForwardScanDirection) at indexam.c:591 #11 0x000056185dd7c9db in index_getnext_slot (scan=scan@entry=0x5618602109a8, direction=direction@entry=ForwardScanDirection, slot=slot@entry=0x56186025bb28) at indexam.c:683 #12 0x000056185dee65ab in IndexNext (node=0x56186025b3f0) at nodeIndexscan.c:130 #13 0x000056185decb648 in ExecProcNodeInstr (node=0x56186025b3f0) at execProcnode.c:485 #14 0x000056185dec4e5a in ExecProcNode (node=0x56186025b3f0) at ../../../src/include/executor/executor.h:278 #15 ExecutePlan (execute_once=<optimized out>, dest=0x56186020fca8, direction=<optimized out>, numberTuples=0, sendTuples=true, operation=CMD_SELECT, use_parallel_mode=<optimized out>, planstate=0x56186025b3f0, estate=0x56186025b178) at execMain.c:1641 #16 standard_ExecutorRun (queryDesc=0x5618602590a0, direction=<optimized out>, count=0, execute_once=<optimized out>) at execMain.c:358 #17 0x000056185dec9187 in ParallelQueryMain (seg=0x5618601b84e8, toc=0x7feb0ea49000) at execParallel.c:1472 #18 0x000056185ddac39b in ParallelWorkerMain (main_arg=<optimized out>) at parallel.c:1524 #19 0x000056185dfc974e in BackgroundWorkerMain (startup_data=<optimized out>, startup_data_len=<optimized out>) at bgworker.c:842 #20 0x000056185dfcb86b in postmaster_child_launch (child_type=child_type@entry=B_BG_WORKER, startup_data=startup_data@entry=0x5618601ba500 "parallel worker for PID 292688", startup_data_len=startup_data_len@entry=1472, client_sock=client_sock@entry=0x0) at launch_backend.c:274 #21 0x000056185dfcd3ee in do_start_bgworker (rw=0x5618601ba500) at postmaster.c:3916 #22 maybe_start_bgworkers () at postmaster.c:4123 #23 0x000056185dfce207 in LaunchMissingBackgroundProcesses () at postmaster.c:3237 #24 ServerLoop () at postmaster.c:1663 #25 0x000056185dfd0610 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x56186017f910) at postmaster.c:1346 #26 0x000056185dd26413 in main (argc=3, argv=0x56186017f910) at main.c:197
389998 ? Ss 0:00 postgres: tomas test [local] SELECT 389999 ? Ss 0:00 postgres: parallel worker for PID 389998 390000 ? Ss 0:00 postgres: parallel worker for PID 389998 390001 ? Ss 0:00 postgres: parallel worker for PID 389998 leader Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007fd253d29de3 in epoll_wait (epfd=5, events=0x5654911d9160, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 30 ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory. (gdb) bt #0 0x00007fd253d29de3 in epoll_wait (epfd=5, events=0x5654911d9160, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 #1 0x00005654900206b9 in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7fffadbf9360, cur_timeout=-1, set=0x5654911d90f8) at latch.c:1570 #2 WaitEventSetWait (set=0x5654911d90f8, timeout=timeout@entry=-1, occurred_events=occurred_events@entry=0x7fffadbf93a0, nevents=nevents@entry=1, wait_event_info=wait_event_info@entry=134217735) at latch.c:1516 #3 0x00005654900209a2 in WaitLatch (latch=<optimized out>, wakeEvents=wakeEvents@entry=33, timeout=timeout@entry=-1, wait_event_info=wait_event_info@entry=134217735) at latch.c:538 #4 0x000056549002ba6f in ConditionVariableTimedSleep (cv=cv@entry=0x7fd148250218, timeout=timeout@entry=-1, wait_event_info=wait_event_info@entry=134217735) at condition_variable.c:163 #5 0x000056549002bbfe in ConditionVariableSleep (cv=cv@entry=0x7fd148250218, wait_event_info=wait_event_info@entry=134217735) at condition_variable.c:98 #6 0x000056548fd71f9c in _bt_parallel_seize (scan=scan@entry=0x5654912e39f8, pageno=pageno@entry=0x7fffadbf94ac, first=first@entry=false) at nbtree.c:858 #7 0x000056548fd7340f in _bt_steppage (scan=scan@entry=0x5654912e39f8, dir=ForwardScanDirection) at nbtsearch.c:2214 #8 0x000056548fd73f81 in _bt_next (scan=scan@entry=0x5654912e39f8, dir=dir@entry=ForwardScanDirection) at nbtsearch.c:1592 #9 0x000056548fd70a98 in btgettuple (scan=0x5654912e39f8, dir=ForwardScanDirection) at nbtree.c:262 #10 0x000056548fd68891 in index_getnext_tid (scan=scan@entry=0x5654912e39f8, direction=direction@entry=ForwardScanDirection) at indexam.c:591 #11 0x000056548fd689db in index_getnext_slot (scan=scan@entry=0x5654912e39f8, direction=direction@entry=ForwardScanDirection, slot=slot@entry=0x5654912d37d0) at indexam.c:683 #12 0x000056548fed25ab in IndexNext (node=0x5654912d3540) at nodeIndexscan.c:130 #13 0x000056548fec9e11 in ExecProcNode (node=0x5654912d3540) at ../../../src/include/executor/executor.h:278 #14 gather_getnext (gatherstate=0x5654912d3368) at nodeGather.c:287 #15 ExecGather (pstate=0x5654912d3368) at nodeGather.c:222 #16 0x000056548feb0e5a in ExecProcNode (node=0x5654912d3368) at ../../../src/include/executor/executor.h:278 #17 ExecutePlan (execute_once=<optimized out>, dest=0x5654912dcd70, direction=<optimized out>, numberTuples=0, sendTuples=true, operation=CMD_SELECT, use_parallel_mode=<optimized out>, planstate=0x5654912d3368, estate=0x5654912d3128) at execMain.c:1641 #18 standard_ExecutorRun (queryDesc=0x5654912cf168, direction=<optimized out>, count=0, execute_once=<optimized out>) at execMain.c:358 #19 0x000056549004692f in PortalRunSelect (portal=portal@entry=0x56549125ba78, forward=forward@entry=true, count=0, count@entry=9223372036854775807, dest=dest@entry=0x5654912dcd70) at pquery.c:924 #20 0x0000565490047c27 in PortalRun (portal=portal@entry=0x56549125ba78, count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=true, run_once=run_once@entry=true, dest=dest@entry=0x5654912dcd70, altdest=altdest@entry=0x5654912dcd70, qc=0x7fffadbf9870) at pquery.c:768 #21 0x000056549004409c in exec_simple_query (query_string=0x5654911de188 "select * from t_1 where id in ( 41, 74, 7, 40);") at postgres.c:1284 #22 0x0000565490045b16 in PostgresMain (dbname=<optimized out>, username=<optimized out>) at postgres.c:4766 #23 0x00005654900409df in BackendMain (startup_data=<optimized out>, startup_data_len=<optimized out>) at backend_startup.c:107 #24 0x000056548ffb786b in postmaster_child_launch (child_type=child_type@entry=B_BACKEND, startup_data=startup_data@entry=0x7fffadbf9cfc "", startup_data_len=startup_data_len@entry=4, client_sock=client_sock@entry=0x7fffadbf9d00) at launch_backend.c:274 #25 0x000056548ffbaa53 in BackendStartup (client_sock=0x7fffadbf9d00) at postmaster.c:3415 #26 ServerLoop () at postmaster.c:1648 #27 0x000056548ffbc610 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x5654911d8910) at postmaster.c:1346 #28 0x000056548fd12413 in main (argc=3, argv=0x5654911d8910) at main.c:197 (gdb) q workers 0x00007fd253d29de3 in epoll_wait (epfd=5, events=0x5654911d9160, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 30 ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory. (gdb) bt #0 0x00007fd253d29de3 in epoll_wait (epfd=5, events=0x5654911d9160, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 #1 0x00005654900206b9 in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7fffadbf9850, cur_timeout=-1, set=0x5654911d90f8) at latch.c:1570 #2 WaitEventSetWait (set=0x5654911d90f8, timeout=timeout@entry=-1, occurred_events=occurred_events@entry=0x7fffadbf9890, nevents=nevents@entry=1, wait_event_info=wait_event_info@entry=134217764) at latch.c:1516 #3 0x00005654900209a2 in WaitLatch (latch=<optimized out>, wakeEvents=wakeEvents@entry=33, timeout=timeout@entry=0, wait_event_info=wait_event_info@entry=134217764) at latch.c:538 #4 0x0000565490026e11 in shm_mq_send_bytes (mqh=mqh@entry=0x56549126a3a0, nbytes=57, data=0x5654912b3920, nowait=nowait@entry=false, bytes_written=bytes_written@entry=0x7fffadbf9970) at shm_mq.c:1018 #5 0x00005654900272b4 in shm_mq_sendv (mqh=0x56549126a3a0, iov=iov@entry=0x7fffadbf99c0, iovcnt=iovcnt@entry=1, nowait=nowait@entry=false, force_flush=force_flush@entry=false) at shm_mq.c:493 #6 0x00005654900274a1 in shm_mq_send (mqh=<optimized out>, nbytes=<optimized out>, data=data@entry=0x5654912b3920, nowait=nowait@entry=false, force_flush=force_flush@entry=false) at shm_mq.c:337 #7 0x000056548feeb4b9 in tqueueReceiveSlot (slot=<optimized out>, self=0x565491269098) at tqueue.c:63 #8 0x000056548feb0e8c in ExecutePlan (execute_once=<optimized out>, dest=0x565491269098, direction=<optimized out>, numberTuples=0, sendTuples=true, operation=CMD_SELECT, use_parallel_mode=<optimized out>, planstate=0x5654912b27d0, estate=0x5654912b2558) at execMain.c:1672 #9 standard_ExecutorRun (queryDesc=0x56549126ab18, direction=<optimized out>, count=0, execute_once=<optimized out>) at execMain.c:358 #10 0x000056548feb5187 in ParallelQueryMain (seg=0x5654912118d8, toc=0x7fd2543ae000) at execParallel.c:1472 #11 0x000056548fd9839b in ParallelWorkerMain (main_arg=<optimized out>) at parallel.c:1524 #12 0x000056548ffb574e in BackgroundWorkerMain (startup_data=<optimized out>, startup_data_len=<optimized out>) at bgworker.c:842 #13 0x000056548ffb786b in postmaster_child_launch (child_type=child_type@entry=B_BG_WORKER, startup_data=startup_data@entry=0x56549120b4a0 "parallel worker for PID 389998", startup_data_len=startup_data_len@entry=1472, client_sock=client_sock@entry=0x0) at launch_backend.c:274 #14 0x000056548ffb93ee in do_start_bgworker (rw=0x56549120b4a0) at postmaster.c:3916 #15 maybe_start_bgworkers () at postmaster.c:4123 #16 0x000056548ffba207 in LaunchMissingBackgroundProcesses () at postmaster.c:3237 #17 ServerLoop () at postmaster.c:1663 #18 0x000056548ffbc610 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x5654911d8910) at postmaster.c:1346 #19 0x000056548fd12413 in main (argc=3, argv=0x5654911d8910) at main.c:197 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007fd253d29de3 in epoll_wait (epfd=5, events=0x5654911d9160, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 30 ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory. (gdb) bt #0 0x00007fd253d29de3 in epoll_wait (epfd=5, events=0x5654911d9160, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 #1 0x00005654900206b9 in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7fffadbf97a0, cur_timeout=-1, set=0x5654911d90f8) at latch.c:1570 #2 WaitEventSetWait (set=0x5654911d90f8, timeout=timeout@entry=-1, occurred_events=occurred_events@entry=0x7fffadbf97e0, nevents=nevents@entry=1, wait_event_info=wait_event_info@entry=134217735) at latch.c:1516 #3 0x00005654900209a2 in WaitLatch (latch=<optimized out>, wakeEvents=wakeEvents@entry=33, timeout=timeout@entry=-1, wait_event_info=wait_event_info@entry=134217735) at latch.c:538 #4 0x000056549002ba6f in ConditionVariableTimedSleep (cv=cv@entry=0x7fd2543ae218, timeout=timeout@entry=-1, wait_event_info=wait_event_info@entry=134217735) at condition_variable.c:163 #5 0x000056549002bbfe in ConditionVariableSleep (cv=cv@entry=0x7fd2543ae218, wait_event_info=wait_event_info@entry=134217735) at condition_variable.c:98 #6 0x000056548fd71f9c in _bt_parallel_seize (scan=scan@entry=0x565491269d98, pageno=pageno@entry=0x7fffadbf98ec, first=first@entry=false) at nbtree.c:858 #7 0x000056548fd7340f in _bt_steppage (scan=scan@entry=0x565491269d98, dir=ForwardScanDirection) at nbtsearch.c:2214 #8 0x000056548fd73f81 in _bt_next (scan=scan@entry=0x565491269d98, dir=dir@entry=ForwardScanDirection) at nbtsearch.c:1592 #9 0x000056548fd70a98 in btgettuple (scan=0x565491269d98, dir=ForwardScanDirection) at nbtree.c:262 #10 0x000056548fd68891 in index_getnext_tid (scan=scan@entry=0x565491269d98, direction=direction@entry=ForwardScanDirection) at indexam.c:591 #11 0x000056548fd689db in index_getnext_slot (scan=scan@entry=0x565491269d98, direction=direction@entry=ForwardScanDirection, slot=slot@entry=0x5654912b2f08) at indexam.c:683 #12 0x000056548fed25ab in IndexNext (node=0x5654912b27d0) at nodeIndexscan.c:130 #13 0x000056548feb0e5a in ExecProcNode (node=0x5654912b27d0) at ../../../src/include/executor/executor.h:278 #14 ExecutePlan (execute_once=<optimized out>, dest=0x565491269098, direction=<optimized out>, numberTuples=0, sendTuples=true, operation=CMD_SELECT, use_parallel_mode=<optimized out>, planstate=0x5654912b27d0, estate=0x5654912b2558) at execMain.c:1641 #15 standard_ExecutorRun (queryDesc=0x56549126ab18, direction=<optimized out>, count=0, execute_once=<optimized out>) at execMain.c:358 #16 0x000056548feb5187 in ParallelQueryMain (seg=0x5654912118d8, toc=0x7fd2543ae000) at execParallel.c:1472 #17 0x000056548fd9839b in ParallelWorkerMain (main_arg=<optimized out>) at parallel.c:1524 #18 0x000056548ffb574e in BackgroundWorkerMain (startup_data=<optimized out>, startup_data_len=<optimized out>) at bgworker.c:842 #19 0x000056548ffb786b in postmaster_child_launch (child_type=child_type@entry=B_BG_WORKER, startup_data=startup_data@entry=0x56549120ac98 "parallel worker for PID 389998", startup_data_len=startup_data_len@entry=1472, client_sock=client_sock@entry=0x0) at launch_backend.c:274 #20 0x000056548ffb93ee in do_start_bgworker (rw=0x56549120ac98) at postmaster.c:3916 #21 maybe_start_bgworkers () at postmaster.c:4123 #22 0x000056548ffba207 in LaunchMissingBackgroundProcesses () at postmaster.c:3237 #23 ServerLoop () at postmaster.c:1663 #24 0x000056548ffbc610 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x5654911d8910) at postmaster.c:1346 #25 0x000056548fd12413 in main (argc=3, argv=0x5654911d8910) at main.c:197 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007fd253d29de3 in epoll_wait (epfd=5, events=0x5654911d9160, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 30 ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory. (gdb) bt #0 0x00007fd253d29de3 in epoll_wait (epfd=5, events=0x5654911d9160, maxevents=1, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 #1 0x00005654900206b9 in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7fffadbf9850, cur_timeout=-1, set=0x5654911d90f8) at latch.c:1570 #2 WaitEventSetWait (set=0x5654911d90f8, timeout=timeout@entry=-1, occurred_events=occurred_events@entry=0x7fffadbf9890, nevents=nevents@entry=1, wait_event_info=wait_event_info@entry=134217764) at latch.c:1516 #3 0x00005654900209a2 in WaitLatch (latch=<optimized out>, wakeEvents=wakeEvents@entry=33, timeout=timeout@entry=0, wait_event_info=wait_event_info@entry=134217764) at latch.c:538 #4 0x0000565490026e11 in shm_mq_send_bytes (mqh=mqh@entry=0x56549126a3a0, nbytes=57, data=0x5654912b3920, nowait=nowait@entry=false, bytes_written=bytes_written@entry=0x7fffadbf9970) at shm_mq.c:1018 #5 0x00005654900272b4 in shm_mq_sendv (mqh=0x56549126a3a0, iov=iov@entry=0x7fffadbf99c0, iovcnt=iovcnt@entry=1, nowait=nowait@entry=false, force_flush=force_flush@entry=false) at shm_mq.c:493 #6 0x00005654900274a1 in shm_mq_send (mqh=<optimized out>, nbytes=<optimized out>, data=data@entry=0x5654912b3920, nowait=nowait@entry=false, force_flush=force_flush@entry=false) at shm_mq.c:337 #7 0x000056548feeb4b9 in tqueueReceiveSlot (slot=<optimized out>, self=0x565491269098) at tqueue.c:63 #8 0x000056548feb0e8c in ExecutePlan (execute_once=<optimized out>, dest=0x565491269098, direction=<optimized out>, numberTuples=0, sendTuples=true, operation=CMD_SELECT, use_parallel_mode=<optimized out>, planstate=0x5654912b27d0, estate=0x5654912b2558) at execMain.c:1672 #9 standard_ExecutorRun (queryDesc=0x56549126ab18, direction=<optimized out>, count=0, execute_once=<optimized out>) at execMain.c:358 #10 0x000056548feb5187 in ParallelQueryMain (seg=0x5654912118d8, toc=0x7fd2543ae000) at execParallel.c:1472 #11 0x000056548fd9839b in ParallelWorkerMain (main_arg=<optimized out>) at parallel.c:1524 #12 0x000056548ffb574e in BackgroundWorkerMain (startup_data=<optimized out>, startup_data_len=<optimized out>) at bgworker.c:842 #13 0x000056548ffb786b in postmaster_child_launch (child_type=child_type@entry=B_BG_WORKER, startup_data=startup_data@entry=0x56549120a490 "parallel worker for PID 389998", startup_data_len=startup_data_len@entry=1472, client_sock=client_sock@entry=0x0) at launch_backend.c:274 #14 0x000056548ffb93ee in do_start_bgworker (rw=0x56549120a490) at postmaster.c:3916 #15 maybe_start_bgworkers () at postmaster.c:4123 #16 0x000056548ffba207 in LaunchMissingBackgroundProcesses () at postmaster.c:3237 #17 ServerLoop () at postmaster.c:1663 #18 0x000056548ffbc610 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x5654911d8910) at postmaster.c:1346 #19 0x000056548fd12413 in main (argc=3, argv=0x5654911d8910) at main.c:197
run.sh
Description: application/shellscript