Re: SegFault on 9.6.14

From: Jerry Sievers <gsievers19(at)comcast(dot)net>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Jerry Sievers <gsievers19(at)comcast(dot)net>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SegFault on 9.6.14
Date: 2019-07-17 00:26:20
Message-ID: 87lfwx8q1f.fsf@jsievers.enova.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:

> On Wed, Jul 17, 2019 at 12:05 PM Jerry Sievers <gsievers19(at)comcast(dot)net> wrote:
>
>> Program received signal SIGUSR1, User defined signal 1.
>
> Oh, we need to ignore those pesky signals with "handle SIGUSR1 noprint nostop".

Is this the right sequencing?

1. Start client and get backend pid
2. GDB; handle SIGUSR1, break, cont
3. Run query
4. bt

Thanks

Don't think I am doing this correctly. Please advise.

handle SIGUSR1 noprint nostop
Signal Stop Print Pass to program Description
SIGUSR1 No No Yes User defined signal 1
(gdb) break munmap
Breakpoint 1 at 0x7f3d09331740: file ../sysdeps/unix/syscall-template.S, line 84.
(gdb) cont
Continuing.

Breakpoint 1, munmap () at ../sysdeps/unix/syscall-template.S:84
84 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) bt
#0 munmap () at ../sysdeps/unix/syscall-template.S:84
#1 0x000055666e12d7f4 in dsm_impl_posix (impl_private=0x22, elevel=19,
mapped_size=0x556670205890, mapped_address=0x556670205888, request_size=0,
handle=<optimized out>, op=DSM_OP_DETACH)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/storage/ipc/dsm_impl.c:259
#2 dsm_impl_op (op=op(at)entry=DSM_OP_DETACH, handle=<optimized out>,
request_size=request_size(at)entry=0, impl_private=impl_private(at)entry=0x556670205880,
mapped_address=mapped_address(at)entry=0x556670205888,
mapped_size=mapped_size(at)entry=0x556670205890, elevel=19)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/storage/ipc/dsm_impl.c:176
#3 0x000055666e12efb1 in dsm_detach (seg=0x556670205860)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/storage/ipc/dsm.c:738
#4 0x000055666df31369 in DestroyParallelContext (pcxt=0x556670219b68)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/access/transam/parallel.c:750
#5 0x000055666e0357bb in ExecParallelCleanup (pei=0x7f3d012218b0)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/execParallel.c:575
#6 0x000055666e047ca2 in ExecShutdownGather (node=node(at)entry=0x55667033bed0)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/nodeGather.c:443
#7 0x000055666e0359f5 in ExecShutdownNode (node=0x55667033bed0)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/execProcnode.c:820
#8 0x000055666e0777e1 in planstate_tree_walker (planstate=0x55667033b2b0,
walker=0x55666e0359a0 <ExecShutdownNode>, context=0x0)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/nodes/nodeFuncs.c:3636
#9 0x000055666e0777e1 in planstate_tree_walker (planstate=0x55667033b040,
walker=0x55666e0359a0 <ExecShutdownNode>, context=0x0)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/nodes/nodeFuncs.c:3636
#10 0x000055666e0777e1 in planstate_tree_walker (planstate=planstate(at)entry=0x55667033a6c8,
walker=walker(at)entry=0x55666e0359a0 <ExecShutdownNode>, context=context(at)entry=0x0)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/nodes/nodeFuncs.c:3636
#11 0x000055666e0359df in ExecShutdownNode (node=node(at)entry=0x55667033a6c8)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/execProcnode.c:830
#12 0x000055666e04d0ff in ExecLimit (node=node(at)entry=0x55667033a428)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/nodeLimit.c:139
#13 0x000055666e035d28 in ExecProcNode (node=node(at)entry=0x55667033a428)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/execProcnode.c:531
#14 0x000055666e051f69 in ExecNestLoop (node=node(at)entry=0x55667031c660)
---Type <return> to continue, or q <return> to quit--- at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/nodeNestloop.c:174
#15 0x000055666e035e28 in ExecProcNode (node=node(at)entry=0x55667031c660)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/execProcnode.c:476
#16 0x000055666e054989 in ExecSort (node=node(at)entry=0x55667031c3f0)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/nodeSort.c:103
#17 0x000055666e035de8 in ExecProcNode (node=0x55667031c3f0)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/execProcnode.c:495
#18 0x000055666e041fe9 in fetch_input_tuple (aggstate=aggstate(at)entry=0x55667031ba18)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/nodeAgg.c:598
#19 0x000055666e043bb3 in agg_retrieve_direct (aggstate=0x55667031ba18)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/nodeAgg.c:2078
#20 ExecAgg (node=node(at)entry=0x55667031ba18)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/nodeAgg.c:1903
#21 0x000055666e035dc8 in ExecProcNode (node=node(at)entry=0x55667031ba18)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/execProcnode.c:503
#22 0x000055666e031f2e in ExecutePlan (dest=0x7f3d01277aa8, direction=<optimized out>,
numberTuples=0, sendTuples=<optimized out>, operation=CMD_SELECT,
use_parallel_mode=<optimized out>, planstate=0x55667031ba18, estate=0x55667031b878)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/execMain.c:1567
#23 standard_ExecutorRun (queryDesc=0x556670320a78, direction=<optimized out>, count=0)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/executor/execMain.c:339
#24 0x00007f3d01cd0515 in explain_ExecutorRun (queryDesc=0x556670320a78,
direction=ForwardScanDirection, count=0)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../contrib/auto_explain/auto_explain.c:281
#25 0x00007f3d01ac8db0 in pgss_ExecutorRun (queryDesc=0x556670320a78,
direction=ForwardScanDirection, count=0)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../contrib/pg_stat_statements/pg_stat_statements.c:875
#26 0x000055666e155167 in PortalRunSelect (portal=portal(at)entry=0x5566701d6df8,
forward=forward(at)entry=1 '\001', count=0, count(at)entry=9223372036854775807,
dest=dest(at)entry=0x7f3d01277aa8)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/tcop/pquery.c:948
#27 0x000055666e1567a0 in PortalRun (portal=portal(at)entry=0x5566701d6df8,
count=count(at)entry=9223372036854775807, isTopLevel=isTopLevel(at)entry=1 '\001',
dest=dest(at)entry=0x7f3d01277aa8, altdest=altdest(at)entry=0x7f3d01277aa8,
completionTag=completionTag(at)entry=0x7ffc37bea670 "")
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/tcop/pquery.c:---Type <return> to continue, or q <return> to quit---
789
#28 0x000055666e1532d6 in exec_simple_query (
query_string=0x5566702a4c68 "select v.account_id, COUNT(cnt.clicks), te.description,\nl.product_id\nfrom nbox_nc_ah.tracking_events te\njoin nbox_nc_ah.page_views pv on pv.page_view_id = te.page_view_id\njoin nbox_nc_ah.visits v on v"...)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/tcop/postgres.c:1109
#29 PostgresMain (argc=<optimized out>, argv=argv(at)entry=0x556670204630,
dbname=0x5566701bab88 "staging", username=<optimized out>)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/tcop/postgres.c:4101
#30 0x000055666dec8a1b in BackendRun (port=0x5566701fd500)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/postmaster/postmaster.c:4339
#31 BackendStartup (port=0x5566701fd500)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/postmaster/postmaster.c:4013
#32 ServerLoop ()
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/postmaster/postmaster.c:1722
#33 0x000055666e0ef281 in PostmasterMain (argc=13, argv=<optimized out>)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/postmaster/postmaster.c:1330
#34 0x000055666dec9bf1 in main (argc=13, argv=0x5566701b8840)
at /build/postgresql-9.6-5O8OLM/postgresql-9.6-9.6.14/build/../src/backend/main/main.c:228
(gdb)
(gdb) quit
A debugging session is active.

Inferior 1 [process 32291] will be detached.

Quit anyway? (y or n) y
Detaching from program: /usr/lib/postgresql/9.6/bin/postgres, process 32291
root(at)pgdev01:/home/jsievers#

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres(dot)consulting(at)comcast(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2019-07-17 00:44:49 Re: SegFault on 9.6.14
Previous Message Thomas Munro 2019-07-17 00:07:46 Re: SegFault on 9.6.14