From: | daniel(at)heroku(dot)com |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #13246: Failure to pg_terminate_backend |
Date: | 2015-05-06 20:55:30 |
Message-ID: | 20150506205530.1095.52171@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 13246
Logged by: Daniel Farina
Email address: daniel(at)heroku(dot)com
PostgreSQL version: 9.4.1
Operating system: Ubuntu 12.04.5
Description:
Postgres gets stuck in this loop and, not checking for signals, will not
respect the SIGTERM from pg_terminate_backend. This seems like a variant of
other problems I've seen with pg_terminate_backend not being able to
function when one is stuck in Openssl, though it seems that in recent
versions of Postgres that PG provides its own low level I/O functions (e.g.
my_sock_write) and maybe this is fixable?
I ran strace too, butgot the ERESTARTSYS return code which appears to be
possibly a side effect of strace itself.
Information dump follows:
$ strace -p PID
sendto(10, "REDACTED-BUT-IS-ONE-STRING"..., 1092, 0, NULL, 0) = ?
ERESTARTSYS (To be restarted)
--- SIGTERM (Terminated) @ 0 (0) ---
rt_sigreturn(0x7fe41f56bcdc) = 44
sendto(10, "REDACTED-BUT-IS-ONE-STRING"..., 1092, 0, NULL, 0) = ?
ERESTARTSYS (To be restarted)
--- SIGTERM (Terminated) @ 0 (0) ---
rt_sigreturn(0x7fe41f56bcdc) = 44
sendto(10, "REDACTED-BUT-IS-ONE-STRING"..., 1092, 0, NULL, 0) = ?
ERESTARTSYS (To be restarted)
--- SIGTERM (Terminated) @ 0 (0) ---
rt_sigreturn(0x7fe41f56bcdc) = 44
sendto(10, "REDACTED-BUT-IS-ONE-STRING"..., 1092, 0, NULL, 0) = ?
ERESTARTSYS (To be restarted)
--- SIGTERM (Terminated) @ 0 (0) ---
rt_sigreturn(0x7fe41f56bcdc) = 44
sendto(10, "REDACTED-BUT-IS-ONE-STRING"..., 1092, 0, NULL, 0) = ?
ERESTARTSYS (To be restarted)
--- SIGTERM (Terminated) @ 0 (0) ---
rt_sigreturn(0x7fe41f56bcdc) = 44
sendto(10, "REDACTED-BUT-IS-ONE-STRING"..., 1092, 0, NULL, 0) = ?
ERESTARTSYS (To be restarted)
--- SIGTERM (Terminated) @ 0 (0) ---
$ gdb -p PID
(gdb) bt
#0 0x00007fe42be95462 in send () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007fe42dcbc487 in my_sock_write (h=0x7fe42efa5eb0, buf=<optimized
out>, size=<optimized out>)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/libpq/be-secure.c:516
#2 0x00007fe42cdd4667 in BIO_write () from
/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#3 0x00007fe42d0f0260 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.0.0
#4 0x00007fe42d0f0984 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.0.0
#5 0x00007fe42dcbd1d5 in secure_write (port=0x7fe42efa51b0,
ptr=0x7fe42efaad90, len=<optimized out>)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/libpq/be-secure.c:391
#6 0x00007fe42dcc7c06 in internal_flush () at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/libpq/pqcomm.c:1324
#7 0x00007fe42dcc7d77 in internal_putbytes (s=0x7fe42f0652cd "REDACTED",
len=4)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/libpq/pqcomm.c:1270
#8 0x00007fe42dcc8f2c in pq_putmessage (msgtype=100 'd', s=0x7fe42f065280
"", len=<optimized out>)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/libpq/pqcomm.c:1467
#9 0x00007fe42dc3a82d in CopySendEndOfRow (cstate=0x7fe42ef78d20) at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/commands/copy.c:546
#10 0x00007fe42dc3aa88 in CopyOneRowTo (cstate=0x7fe42ef78d20,
tupleOid=<optimized out>, values=0x7fe42f05c990, nulls=<optimized out>)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/commands/copy.c:1939
#11 0x00007fe42dc3af55 in copy_dest_receive (slot=0x7fe42f05ac20,
self=0x7fe42f049fb0)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/commands/copy.c:4310
#12 0x00007fe42dc9182a in ExecutePlan (dest=0x7fe42f049fb0,
direction=<optimized out>, numberTuples=0, sendTuples=1 '\001',
operation=CMD_SELECT, planstate=0x7fe42f05ad70, estate=0x7fe42f05aa30)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/executor/execMain.c:1511
#13 standard_ExecutorRun (queryDesc=0x7fe42f047850, direction=<optimized
out>, count=0)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/executor/execMain.c:319
#14 0x00007fe4214a2d75 in pgss_ExecutorRun (queryDesc=0x7fe42f047850,
direction=ForwardScanDirection, count=0)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../contrib/pg_stat_statements/pg_stat_statements.c:875
#15 0x00007fe42dc3b3c9 in CopyTo (cstate=0x7fe42ef78d20) at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/commands/copy.c:1836
#16 DoCopyTo (cstate=0x7fe42ef78d20) at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/commands/copy.c:1659
#17 0x00007fe42dc3fc9d in DoCopy (stmt=<optimized out>,
queryString=<optimized out>, processed=0x7ffc2581b9f8)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/commands/copy.c:878
#18 0x00007fe42dd8fa8f in standard_ProcessUtility (parsetree=0x7fe42effd760,
queryString=0x7fe42effbae0 "set work_mem = '1GB'; COPY (REDACTED) TO
STDOUT BINARY", context=<optimized out>, params=0x0,
dest=<optimized out>, completionTag=0x7ffc2581c140 "") at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/tcop/utility.c:525
#19 0x00007fe4214a5813 in pgss_ProcessUtility (parsetree=0x7fe42effd760,
queryString=0x7fe42effbae0 "set work_mem = '1GB'; COPY (REDACTED) TO
STDOUT BINARY", context=PROCESS_UTILITY_QUERY,
params=0x0, dest=0x7fe42f02c440, completionTag=0x7ffc2581c140 "")
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../contrib/pg_stat_statements/pg_stat_statements.c:984
#20 0x00007fe2115cd2ca in extwlist_ProcessUtility (parsetree=0x7fe42effd760,
queryString=0x7fe42effbae0 "set work_mem = '1GB'; COPY (REDACTED) TO
STDOUT BINARY", context=PROCESS_UTILITY_QUERY,
params=0x0, dest=0x7fe42f02c440, completionTag=0x7ffc2581c140 "") at
pgextwlist.c:346
#21 0x00007fe42dd8c683 in PortalRunUtility (portal=0x7fe42f02a430,
utilityStmt=0x7fe42effd760, isTopLevel=0 '\000', dest=0x7fe42f02c440,
completionTag=0x7ffc2581c140 "") at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/tcop/pquery.c:1187
#22 0x00007fe42dd8d2c6 in PortalRunMulti (portal=0x7fe42f02a430,
isTopLevel=0 '\000', dest=0x7fe42f02c440, altdest=0x7fe42f02c440,
completionTag=0x7ffc2581c140 "") at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/tcop/pquery.c:1318
#23 0x00007fe42dd8df5d in PortalRun (portal=0x7fe42f02a430,
count=9223372036854775807, isTopLevel=0 '\000', dest=0x7fe42f02c440,
altdest=0x7fe42f02c440, completionTag=0x7ffc2581c140 "") at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/tcop/pquery.c:816
#24 0x00007fe42dd8a09c in exec_simple_query (
query_string=0x7fe42effbae0 "set work_mem = '1GB'; COPY (REDACTED) TO
STDOUT BINARY")
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/tcop/postgres.c:1072
#25 PostgresMain (argc=<optimized out>, argv=<optimized out>,
dbname=0x7fe42ef5f288 "REDACTED", username=<optimized out>)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/tcop/postgres.c:4074
#26 0x00007fe42dd3574b in BackendRun (port=0x7fe42efa51b0)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/postmaster/postmaster.c:4155
#27 BackendStartup (port=0x7fe42efa51b0) at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/postmaster/postmaster.c:3829
#28 ServerLoop () at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/postmaster/postmaster.c:1597
#29 PostmasterMain (argc=<optimized out>, argv=<optimized out>)
at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/postmaster/postmaster.c:1244
#30 0x00007fe42db54a31 in main (argc=5, argv=0x7fe42ef5e3b0) at
/tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/main/main.c:228
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-05-06 21:03:39 | Re: BUG #13246: Failure to pg_terminate_backend |
Previous Message | Corey Huinker | 2015-05-06 18:58:01 | Re: BUG #13179: pg_upgrade failure. |