Re: pg11.1: dsa_area could not attach to segment

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg11.1: dsa_area could not attach to segment
Date: 2019-02-11 14:51:09
Message-ID: 67790871549896669@iva5-d3020dc3459d.qloud-c.yandex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

> Here's confirmed steps to reproduce

Wow, i confirm this testcase is reproducible for me. On my 4-core desktop i see "dsa_area could not attach to segment" error after minute or two.
On current REL_11_STABLE branch with PANIC level i see this backtrace for failed parallel process:

#0 __GI_raise (sig=sig(at)entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007f3b36983535 in __GI_abort () at abort.c:79
#2 0x000055f03ab87a4e in errfinish (dummy=dummy(at)entry=0) at elog.c:555
#3 0x000055f03ab899e0 in elog_finish (elevel=elevel(at)entry=22, fmt=fmt(at)entry=0x55f03ad86900 "dsa_area could not attach to segment") at elog.c:1376
#4 0x000055f03abaa1e2 in get_segment_by_index (area=area(at)entry=0x55f03cdd6bf0, index=index(at)entry=7) at dsa.c:1743
#5 0x000055f03abaa8ab in get_best_segment (area=area(at)entry=0x55f03cdd6bf0, npages=npages(at)entry=8) at dsa.c:1993
#6 0x000055f03ababdb8 in dsa_allocate_extended (area=0x55f03cdd6bf0, size=size(at)entry=32768, flags=flags(at)entry=0) at dsa.c:701
#7 0x000055f03a921469 in ExecParallelHashTupleAlloc (hashtable=hashtable(at)entry=0x55f03cdfd498, size=104, shared=shared(at)entry=0x7ffc9f355748) at nodeHash.c:2837
#8 0x000055f03a9219fc in ExecParallelHashTableInsertCurrentBatch (hashtable=hashtable(at)entry=0x55f03cdfd498, slot=<optimized out>, hashvalue=2522126815) at nodeHash.c:1747
#9 0x000055f03a9227ef in ExecParallelHashJoinNewBatch (hjstate=hjstate(at)entry=0x55f03cde17b0) at nodeHashjoin.c:1153
#10 0x000055f03a924115 in ExecHashJoinImpl (parallel=true, pstate=0x55f03cde17b0) at nodeHashjoin.c:534
#11 ExecParallelHashJoin (pstate=0x55f03cde17b0) at nodeHashjoin.c:581
#12 0x000055f03a90d91c in ExecProcNodeFirst (node=0x55f03cde17b0) at execProcnode.c:445
#13 0x000055f03a905f3b in ExecProcNode (node=0x55f03cde17b0) at ../../../src/include/executor/executor.h:247
#14 ExecutePlan (estate=estate(at)entry=0x55f03cde0d38, planstate=0x55f03cde17b0, use_parallel_mode=<optimized out>, operation=operation(at)entry=CMD_SELECT, sendTuples=sendTuples(at)entry=true, numberTuples=numberTuples(at)entry=0,
direction=ForwardScanDirection, dest=0x55f03cd7e4e8, execute_once=true) at execMain.c:1723
#15 0x000055f03a906b4d in standard_ExecutorRun (queryDesc=0x55f03cdd13e0, direction=ForwardScanDirection, count=0, execute_once=execute_once(at)entry=true) at execMain.c:364
#16 0x000055f03a906c08 in ExecutorRun (queryDesc=queryDesc(at)entry=0x55f03cdd13e0, direction=direction(at)entry=ForwardScanDirection, count=<optimized out>, execute_once=execute_once(at)entry=true) at execMain.c:307
#17 0x000055f03a90b44f in ParallelQueryMain (seg=seg(at)entry=0x55f03cd320a8, toc=toc(at)entry=0x7f3b2d877000) at execParallel.c:1402
#18 0x000055f03a7ce4cc in ParallelWorkerMain (main_arg=<optimized out>) at parallel.c:1409
#19 0x000055f03a9e11cb in StartBackgroundWorker () at bgworker.c:834
#20 0x000055f03a9eea1a in do_start_bgworker (rw=rw(at)entry=0x55f03cd2d460) at postmaster.c:5698
#21 0x000055f03a9eeb5b in maybe_start_bgworkers () at postmaster.c:5911
#22 0x000055f03a9ef5f0 in sigusr1_handler (postgres_signal_arg=<optimized out>) at postmaster.c:5091
#23 <signal handler called>
#24 0x00007f3b36a52327 in __GI___select (nfds=nfds(at)entry=6, readfds=readfds(at)entry=0x7ffc9f356160, writefds=writefds(at)entry=0x0, exceptfds=exceptfds(at)entry=0x0, timeout=timeout(at)entry=0x7ffc9f356150)
at ../sysdeps/unix/sysv/linux/select.c:41
#25 0x000055f03a9effaa in ServerLoop () at postmaster.c:1670
#26 0x000055f03a9f1285 in PostmasterMain (argc=3, argv=<optimized out>) at postmaster.c:1379
#27 0x000055f03a954f3d in main (argc=3, argv=0x55f03cd03200) at main.c:228

regards, Sergei

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-02-11 14:55:29 Re: log bind parameter values on error
Previous Message Dmitry Vasiliev 2019-02-11 14:39:49 Logical replication and restore from pg_basebackup