[sqlsmith] Parallel worker crash on seqscan

From: Andreas Seltenreich <seltenreich(at)gmx(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [sqlsmith] Parallel worker crash on seqscan
Date: 2016-11-20 13:53:56
Message-ID: 878tse6yvf.fsf@credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

the following query appears to reliably crash parallel workers on master
as of 0832f2d.

--8<---------------cut here---------------start------------->8---
set max_parallel_workers_per_gather to 2;
set force_parallel_mode to 1;

select subq.context from pg_settings,
lateral (select context from pg_opclass limit 1) as subq
limit 1;
--8<---------------cut here---------------end--------------->8---

Backtrace of a worker below.

regards,
Andreas

Core was generated by `postgres: bgworker: parallel worker for PID 27448 '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 MakeExpandedObjectReadOnlyInternal (d=0) at expandeddatum.c:100
100 if (!VARATT_IS_EXTERNAL_EXPANDED_RW(DatumGetPointer(d)))
(gdb) bt
#0 MakeExpandedObjectReadOnlyInternal (d=0) at expandeddatum.c:100
#1 0x0000563b0c9a4e98 in ExecTargetList (tupdesc=<optimized out>, isDone=0x7ffdd20400ac, itemIsDone=0x563b0e6a8b50, isnull=0x563b0e6a8ae0 "", values=0x563b0e6a8ac0, econtext=0x563b0e6a7db8, targetlist=0x563b0e6a8498) at execQual.c:5491
#2 ExecProject (projInfo=projInfo(at)entry=0x563b0e6a8368, isDone=isDone(at)entry=0x7ffdd20400ac) at execQual.c:5710
#3 0x0000563b0c9a514f in ExecScan (node=node(at)entry=0x563b0e6a8038, accessMtd=accessMtd(at)entry=0x563b0c9bc910 <SeqNext>, recheckMtd=recheckMtd(at)entry=0x563b0c9bc900 <SeqRecheck>) at execScan.c:220
#4 0x0000563b0c9bc9c3 in ExecSeqScan (node=node(at)entry=0x563b0e6a8038) at nodeSeqscan.c:127
#5 0x0000563b0c99d6e8 in ExecProcNode (node=node(at)entry=0x563b0e6a8038) at execProcnode.c:419
#6 0x0000563b0c9995be in ExecutePlan (dest=0x563b0e67da40, direction=<optimized out>, numberTuples=0, sendTuples=<optimized out>, operation=CMD_SELECT, use_parallel_mode=<optimized out>, planstate=0x563b0e6a8038, estate=0x563b0e6a77f8) at execMain.c:1567
#7 standard_ExecutorRun (queryDesc=0x563b0e6a2828, direction=<optimized out>, count=0) at execMain.c:338
#8 0x0000563b0c99c911 in ParallelQueryMain (seg=<optimized out>, toc=0x7f55173aa000) at execParallel.c:745
#9 0x0000563b0c898b02 in ParallelWorkerMain (main_arg=<optimized out>) at parallel.c:1108
#10 0x0000563b0ca49cad in StartBackgroundWorker () at bgworker.c:726
#11 0x0000563b0ca55770 in do_start_bgworker (rw=0x563b0e621080) at postmaster.c:5535
#12 maybe_start_bgworker () at postmaster.c:5710
#13 0x0000563b0ca56238 in sigusr1_handler (postgres_signal_arg=<optimized out>) at postmaster.c:4959
#14 <signal handler called>
#15 0x00007f5516788293 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:84
#16 0x0000563b0c818249 in ServerLoop () at postmaster.c:1665
#17 0x0000563b0ca577e2 in PostmasterMain (argc=3, argv=0x563b0e5fa490) at postmaster.c:1309
#18 0x0000563b0c819f6d in main (argc=3, argv=0x563b0e5fa490) at main.c:228

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gilles Darold 2016-11-20 14:46:14 [patch] psql tab completion for ALTER DEFAULT PRIVILEGES
Previous Message Magnus Hagander 2016-11-20 11:55:44 Re: Mail thread references in commits