Open tobwen opened 3 years ago
I can reproduce it. Backtrace:
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `postgres: 12/regress: myon postgres 127.0.0.1(49624) SELECT '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
65 ../sysdeps/x86_64/multiarch/strlen-avx2.S: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
#1 0x00005561135ff3a1 in cstring_to_text (s=0x2000 <error: Cannot access memory at address 0x2000>)
at ./build/../src/backend/utils/adt/varlena.c:173
#2 0x00007f1709facae4 in pcre_match (fcinfo=0x556113f99b50) at pgpcre.c:264
#3 0x0000556113393c1e in ExecInterpExpr (state=0x556113f99a70, econtext=0x556113f99c70,
isnull=<optimized out>) at ./build/../src/backend/executor/execExprInterp.c:649
#4 0x00005561134528db in ExecEvalExprSwitchContext (isNull=0x7ffd8dce4f64, econtext=<optimized out>,
state=0x556113f99a70) at ./build/../src/include/executor/executor.h:307
#5 evaluate_expr (expr=<optimized out>, result_type=result_type@entry=25,
result_typmod=result_typmod@entry=-1, result_collation=result_collation@entry=100)
at ./build/../src/backend/optimizer/util/clauses.c:4812
#6 0x00005561134540c8 in evaluate_function (context=0x7ffd8dce52e0, func_tuple=0x7f1709fbaa98,
funcvariadic=false, args=0x556113eb1970, input_collid=100, result_collid=100, result_typmod=-1,
result_type=25, funcid=16398) at ./build/../src/backend/optimizer/util/clauses.c:4354
#7 simplify_function (funcid=16398, result_type=25, result_typmod=-1, result_collid=100,
input_collid=100, args_p=<optimized out>, funcvariadic=false, process_args=true,
allow_non_const=true, context=0x7ffd8dce52e0)
at ./build/../src/backend/optimizer/util/clauses.c:3984
#8 0x0000556113452cfa in eval_const_expressions_mutator (node=0x556113eb1270, context=0x7ffd8dce52e0)
at ./build/../src/backend/optimizer/util/clauses.c:2477
#9 0x00005561133ea591 in expression_tree_mutator (node=node@entry=0x556113eb12c0,
mutator=mutator@entry=0x5561134529a0 <eval_const_expressions_mutator>,
context=context@entry=0x7ffd8dce52e0) at ./build/../src/backend/nodes/nodeFuncs.c:2953
#10 0x00005561134529fa in eval_const_expressions_mutator (node=0x556113eb12c0, context=0x7ffd8dce52e0)
at ./build/../src/backend/optimizer/util/clauses.c:3539
#11 0x00005561133eaa6b in expression_tree_mutator (node=node@entry=0x556113eb1310,
mutator=mutator@entry=0x5561134529a0 <eval_const_expressions_mutator>,
context=context@entry=0x7ffd8dce52e0) at ./build/../src/backend/nodes/nodeFuncs.c:3011
#12 0x00005561134529fa in eval_const_expressions_mutator (node=0x556113eb1310, context=0x7ffd8dce52e0)
at ./build/../src/backend/optimizer/util/clauses.c:3539
#13 0x0000556113453f0f in eval_const_expressions (root=root@entry=0x556113eb13d0, node=<optimized out>)
at ./build/../src/backend/optimizer/util/clauses.c:2269
#14 0x000055611343bb58 in preprocess_expression (root=root@entry=0x556113eb13d0, expr=<optimized out>,
kind=kind@entry=1) at ./build/../src/backend/optimizer/plan/planner.c:1087
#15 0x0000556113442308 in subquery_planner (glob=glob@entry=0x556113eb1140,
parse=parse@entry=0x556113eb0a08, parent_root=parent_root@entry=0x0,
hasRecursion=hasRecursion@entry=false, tuple_fraction=tuple_fraction@entry=0)
at ./build/../src/backend/optimizer/plan/planner.c:768
#16 0x0000556113443815 in standard_planner (parse=0x556113eb0a08, cursorOptions=256,
boundParams=<optimized out>) at ./build/../src/backend/optimizer/plan/planner.c:406
#17 0x00005561134f9832 in pg_plan_query (querytree=querytree@entry=0x556113eb0a08,
cursorOptions=cursorOptions@entry=256, boundParams=boundParams@entry=0x0)
at ./build/../src/backend/tcop/postgres.c:878
#18 0x00005561134f9906 in pg_plan_queries (querytrees=<optimized out>,
cursorOptions=cursorOptions@entry=256, boundParams=boundParams@entry=0x0)
at ./build/../src/backend/tcop/postgres.c:968
#19 0x00005561134f9e0e in exec_simple_query (
query_string=0x556113eafaa0 "SELECT pcre_match('([0-9]+)(k?)mN([0-9]+)E([0-9]+)', '1kmN2745E4432');") at ./build/../src/backend/tcop/postgres.c:1143
#20 0x00005561134fb6ae in PostgresMain (argc=<optimized out>, argv=argv@entry=0x556113edb918,
dbname=<optimized out>, username=<optimized out>) at ./build/../src/backend/tcop/postgres.c:4247
#21 0x0000556113481088 in BackendRun (port=0x556113ed4030, port=0x556113ed4030)
at ./build/../src/backend/postmaster/postmaster.c:4448
#22 BackendStartup (port=0x556113ed4030) at ./build/../src/backend/postmaster/postmaster.c:4139
#23 ServerLoop () at ./build/../src/backend/postmaster/postmaster.c:1704
#24 0x0000556113481faf in PostmasterMain (argc=5, argv=0x556113ea8c50)
at ./build/../src/backend/postmaster/postmaster.c:1377
#25 0x00005561131ebeed in main (argc=5, argv=0x556113ea8c50) at ./build/../src/backend/main/main.c:228
... and full in case it helps:
(gdb) bt f
#0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
No locals.
#1 0x00005561135ff3a1 in cstring_to_text (s=0x2000 <error: Cannot access memory at address 0x2000>)
at ./build/../src/backend/utils/adt/varlena.c:173
No locals.
#2 0x00007f1709facae4 in pcre_match (fcinfo=0x556113f99b50) at pgpcre.c:264
pattern = 0x556113eb0d90
subject = <optimized out>
matches = 0x556113f81420
#3 0x0000556113393c1e in ExecInterpExpr (state=0x556113f99a70, econtext=0x556113f99c70,
isnull=<optimized out>) at ./build/../src/backend/executor/execExprInterp.c:649
fcinfo = 0x556113f99b50
args = 0x556113f99b70
argno = <optimized out>
d = <optimized out>
op = <optimized out>
resultslot = 0x0
innerslot = <optimized out>
outerslot = <optimized out>
scanslot = 0x0
dispatch_table = {0x556113393068 <ExecInterpExpr+168>, 0x556113393de8 <ExecInterpExpr+3624>,
0x556113393dc0 <ExecInterpExpr+3584>, 0x556113393da0 <ExecInterpExpr+3552>,
0x556113393d70 <ExecInterpExpr+3504>, 0x556113393d40 <ExecInterpExpr+3456>,
0x556113393d18 <ExecInterpExpr+3416>, 0x556113393d08 <ExecInterpExpr+3400>,
0x556113393b48 <ExecInterpExpr+2952>, 0x556113393cd0 <ExecInterpExpr+3344>,
0x556113393cf0 <ExecInterpExpr+3376>, 0x556113393cb8 <ExecInterpExpr+3320>,
0x556113393b20 <ExecInterpExpr+2912>, 0x556113393af0 <ExecInterpExpr+2864>,
0x556113393c90 <ExecInterpExpr+3280>, 0x556113393c60 <ExecInterpExpr+3232>,
0x556113393c40 <ExecInterpExpr+3200>, 0x556113393860 <ExecInterpExpr+2208>,
0x556113393bd8 <ExecInterpExpr+3096>, 0x556113393bc0 <ExecInterpExpr+3072>,
0x556113393ba8 <ExecInterpExpr+3048>, 0x556113393008 <ExecInterpExpr+72>,
0x55611339300f <ExecInterpExpr+79>, 0x556113393b68 <ExecInterpExpr+2984>,
0x556113393030 <ExecInterpExpr+112>, 0x556113393037 <ExecInterpExpr+119>,
0x556113393ab8 <ExecInterpExpr+2808>, 0x556113393ab0 <ExecInterpExpr+2800>,
0x556113393a88 <ExecInterpExpr+2760>, 0x556113393a80 <ExecInterpExpr+2752>,
0x556113393a70 <ExecInterpExpr+2736>, 0x556113393a58 <ExecInterpExpr+2712>,
0x556113393a28 <ExecInterpExpr+2664>, 0x556113393a08 <ExecInterpExpr+2632>,
0x5561133939e0 <ExecInterpExpr+2592>, 0x5561133939d0 <ExecInterpExpr+2576>,
0x5561133939b8 <ExecInterpExpr+2552>, 0x5561133939a0 <ExecInterpExpr+2528>,
0x556113393978 <ExecInterpExpr+2488>, 0x556113393950 <ExecInterpExpr+2448>,
0x556113393920 <ExecInterpExpr+2400>, 0x556113393938 <ExecInterpExpr+2424>,
0x556113393908 <ExecInterpExpr+2376>, 0x5561133938f0 <ExecInterpExpr+2352>,
0x5561133938c0 <ExecInterpExpr+2304>, 0x556113393810 <ExecInterpExpr+2128>,
0x5561133937c0 <ExecInterpExpr+2048>, 0x556113393780 <ExecInterpExpr+1984>,
0x556113393830 <ExecInterpExpr+2160>, 0x556113393718 <ExecInterpExpr+1880>,
0x556113393700 <ExecInterpExpr+1856>, 0x556113393fc0 <ExecInterpExpr+4096>,
0x5561133936e8 <ExecInterpExpr+1832>, 0x5561133936d0 <ExecInterpExpr+1808>,
0x5561133936b0 <ExecInterpExpr+1776>, 0x556113393648 <ExecInterpExpr+1672>,
0x556113393678 <ExecInterpExpr+1720>, 0x5561133935f8 <ExecInterpExpr+1592>,
0x5561133935e0 <ExecInterpExpr+1568>, 0x5561133935c8 <ExecInterpExpr+1544>,
0x5561133935b0 <ExecInterpExpr+1520>, 0x556113393598 <ExecInterpExpr+1496>,
0x556113393578 <ExecInterpExpr+1464>, 0x556113393560 <ExecInterpExpr+1440>,
0x556113393660 <ExecInterpExpr+1696>, 0x556113393548 <ExecInterpExpr+1416>,
0x556113393890 <ExecInterpExpr+2256>, 0x556113393500 <ExecInterpExpr+1344>,
0x5561133930f0 <ExecInterpExpr+304>, 0x556113393530 <ExecInterpExpr+1392>,
0x556113393518 <ExecInterpExpr+1368>, 0x5561133934e8 <ExecInterpExpr+1320>,
0x5561133934a8 <ExecInterpExpr+1256>, 0x5561133934d0 <ExecInterpExpr+1296>,
0x556113393470 <ExecInterpExpr+1200>, 0x556113393458 <ExecInterpExpr+1176>,
0x556113393440 <ExecInterpExpr+1152>, 0x556113393418 <ExecInterpExpr+1112>,
0x556113393088 <ExecInterpExpr+200>, 0x556113393358 <ExecInterpExpr+920>,
0x5561133933e0 <ExecInterpExpr+1056>, 0x556113393300 <ExecInterpExpr+832>,
0x5561133933a0 <ExecInterpExpr+992>, 0x556113393258 <ExecInterpExpr+664>,
0x556113393170 <ExecInterpExpr+432>, 0x556113393158 <ExecInterpExpr+408>,
0x556113393140 <ExecInterpExpr+384>, 0x556113393068 <ExecInterpExpr+168>}
#4 0x00005561134528db in ExecEvalExprSwitchContext (isNull=0x7ffd8dce4f64, econtext=<optimized out>,
state=0x556113f99a70) at ./build/../src/include/executor/executor.h:307
retDatum = <optimized out>
oldContext = 0x556113f99750
retDatum = <optimized out>
oldContext = <optimized out>
#5 evaluate_expr (expr=<optimized out>, result_type=result_type@entry=25,
result_typmod=result_typmod@entry=-1, result_collation=result_collation@entry=100)
at ./build/../src/backend/optimizer/util/clauses.c:4812
estate = 0x556113f99860
exprstate = 0x556113f99a70
oldcontext = 0x556113eaf990
const_val = <optimized out>
const_is_null = false
resultTypLen = 0
resultTypByVal = false
#6 0x00005561134540c8 in evaluate_function (context=0x7ffd8dce52e0, func_tuple=0x7f1709fbaa98,
funcvariadic=false, args=0x556113eb1970, input_collid=100, result_collid=100, result_typmod=-1,
result_type=25, funcid=16398) at ./build/../src/backend/optimizer/util/clauses.c:4354
funcform = <optimized out>
has_nonconst_input = <optimized out>
newexpr = <optimized out>
has_null_input = <optimized out>
arg = <optimized out>
funcform = <optimized out>
has_nonconst_input = <optimized out>
has_null_input = <optimized out>
arg = <optimized out>
newexpr = <optimized out>
_result = <optimized out>
#7 simplify_function (funcid=16398, result_type=25, result_typmod=-1, result_collid=100,
input_collid=100, args_p=<optimized out>, funcvariadic=false, process_args=true,
allow_non_const=true, context=0x7ffd8dce52e0)
at ./build/../src/backend/optimizer/util/clauses.c:3984
args = 0x556113eb1970
func_tuple = 0x7f1709fbaa98
func_form = <optimized out>
newexpr = <optimized out>
__func__ = "simplify_function"
#8 0x0000556113452cfa in eval_const_expressions_mutator (node=0x556113eb1270, context=0x7ffd8dce52e0)
at ./build/../src/backend/optimizer/util/clauses.c:2477
expr = 0x556113eb1270
args = 0x556113eb1970
simple = <optimized out>
newexpr = <optimized out>
__func__ = "eval_const_expressions_mutator"
#9 0x00005561133ea591 in expression_tree_mutator (node=node@entry=0x556113eb12c0,
mutator=mutator@entry=0x5561134529a0 <eval_const_expressions_mutator>,
context=context@entry=0x7ffd8dce52e0) at ./build/../src/backend/nodes/nodeFuncs.c:2953
expr = <optimized out>
newnode = <optimized out>
__func__ = "expression_tree_mutator"
oldnode = <optimized out>
newnode = <optimized out>
wco = <optimized out>
newnode = <optimized out>
nexpr = <optimized out>
newnode = <optimized out>
expr = <optimized out>
newnode = <optimized out>
relabel = <optimized out>
newnode = <optimized out>
collate = <optimized out>
newnode = <optimized out>
#10 0x00005561134529fa in eval_const_expressions_mutator (node=0x556113eb12c0, context=0x7ffd8dce52e0)
at ./build/../src/backend/optimizer/util/clauses.c:3539
__func__ = "eval_const_expressions_mutator"
#11 0x00005561133eaa6b in expression_tree_mutator (node=node@entry=0x556113eb1310,
mutator=mutator@entry=0x5561134529a0 <eval_const_expressions_mutator>,
context=context@entry=0x7ffd8dce52e0) at ./build/../src/backend/nodes/nodeFuncs.c:3011
resultlist = 0x0
temp = 0x556113eb0cd0
__func__ = "expression_tree_mutator"
oldnode = <optimized out>
newnode = <optimized out>
wco = <optimized out>
newnode = <optimized out>
nexpr = <optimized out>
newnode = <optimized out>
expr = <optimized out>
newnode = <optimized out>
relabel = <optimized out>
newnode = <optimized out>
collate = <optimized out>
newnode = <optimized out>
#12 0x00005561134529fa in eval_const_expressions_mutator (node=0x556113eb1310, context=0x7ffd8dce52e0)
at ./build/../src/backend/optimizer/util/clauses.c:3539
__func__ = "eval_const_expressions_mutator"
#13 0x0000556113453f0f in eval_const_expressions (root=root@entry=0x556113eb13d0, node=<optimized out>)
at ./build/../src/backend/optimizer/util/clauses.c:2269
context = {boundParams = 0x0, root = 0x556113eb13d0, active_fns = 0x0, case_val = 0x0,
estimate = false}
#14 0x000055611343bb58 in preprocess_expression (root=root@entry=0x556113eb13d0, expr=<optimized out>,
kind=kind@entry=1) at ./build/../src/backend/optimizer/plan/planner.c:1087
No locals.
#15 0x0000556113442308 in subquery_planner (glob=glob@entry=0x556113eb1140,
parse=parse@entry=0x556113eb0a08, parent_root=parent_root@entry=0x0,
hasRecursion=hasRecursion@entry=false, tuple_fraction=tuple_fraction@entry=0)
at ./build/../src/backend/optimizer/plan/planner.c:768
root = 0x556113eb13d0
newWithCheckOptions = <optimized out>
newHaving = <optimized out>
hasOuterJoins = <optimized out>
hasResultRTEs = <optimized out>
final_rel = <optimized out>
l = <optimized out>
#16 0x0000556113443815 in standard_planner (parse=0x556113eb0a08, cursorOptions=256,
boundParams=<optimized out>) at ./build/../src/backend/optimizer/plan/planner.c:406
result = <optimized out>
glob = 0x556113eb1140
tuple_fraction = 0
root = <optimized out>
final_rel = <optimized out>
best_path = <optimized out>
top_plan = <optimized out>
lp = <optimized out>
lr = <optimized out>
#17 0x00005561134f9832 in pg_plan_query (querytree=querytree@entry=0x556113eb0a08,
cursorOptions=cursorOptions@entry=256, boundParams=boundParams@entry=0x0)
at ./build/../src/backend/tcop/postgres.c:878
plan = <optimized out>
#18 0x00005561134f9906 in pg_plan_queries (querytrees=<optimized out>,
cursorOptions=cursorOptions@entry=256, boundParams=boundParams@entry=0x0)
at ./build/../src/backend/tcop/postgres.c:968
query = 0x556113eb0a08
stmt = <optimized out>
stmt_list = 0x0
query_list = 0x556113eb0c48
#19 0x00005561134f9e0e in exec_simple_query (
query_string=0x556113eafaa0 "SELECT pcre_match('([0-9]+)(k?)mN([0-9]+)E([0-9]+)', '1kmN2745E4432');") at ./build/../src/backend/tcop/postgres.c:1143
parsetree = 0x556113eb0878
portal = <optimized out>
snapshot_set = true
commandTag = 0x556113761704 "SELECT"
completionTag = "\000\000\000\000\002\000\000\000\b", '\000' <repeats 15 times>, "i\270ڍ\375\177\000\000\260U\316\215\375\177\000\000\020W\316\215\375\177\000\000\240\372\352\023aU\000\000ȷ\355\023aU\000"
querytree_list = <optimized out>
plantree_list = <optimized out>
receiver = <optimized out>
format = 0
dest = DestRemote
oldcontext = 0x556113f97740
parsetree_list = 0x556113eb08c8
parsetree_item = 0x556113eb08a8
save_log_statement_stats = false
was_logged = false
use_implicit_block = false
msec_str = "\000\000\000\000\002\000\000\000\b", '\000' <repeats 15 times>, "i\270ڍ\375\177\000"
__func__ = "exec_simple_query"
#20 0x00005561134fb6ae in PostgresMain (argc=<optimized out>, argv=argv@entry=0x556113edb918,
dbname=<optimized out>, username=<optimized out>) at ./build/../src/backend/tcop/postgres.c:4247
query_string = 0x556113eafaa0 "SELECT pcre_match('([0-9]+)(k?)mN([0-9]+)E([0-9]+)', '1kmN2745E4432');"
firstchar = <optimized out>
input_message = {
data = 0x556113eafaa0 "SELECT pcre_match('([0-9]+)(k?)mN([0-9]+)E([0-9]+)', '1kmN2745E4432');", len = 71, maxlen = 1024, cursor = 71}
local_sigjmp_buf = {{__jmpbuf = {140726982563632, 9210154814901074139, 1, 93875434534856,
140726982564496, 93875434504240, 9210154814777342171, 3091780527543695579},
__mask_was_saved = 1, __saved_mask = {__val = {0, 140726982569599, 140726982569546,
140726982569938, 0, 139637976727552, 93875423068396, 93875434360518,
541282203669691904, 140726982564064, 93875425696975, 206158430256, 140726982564088,
140726982563888, 541282203669691904, 140726982563920}}}}
send_ready_for_query = false
disable_idle_in_transaction_timeout = false
__func__ = "PostgresMain"
#21 0x0000556113481088 in BackendRun (port=0x556113ed4030, port=0x556113ed4030)
at ./build/../src/backend/postmaster/postmaster.c:4448
av = 0x556113edb918
maxac = <optimized out>
ac = 1
i = 1
av = <optimized out>
maxac = <optimized out>
ac = <optimized out>
i = <optimized out>
__func__ = "BackendRun"
__errno_location = <optimized out>
__errno_location = <optimized out>
__errno_location = <optimized out>
#22 BackendStartup (port=0x556113ed4030) at ./build/../src/backend/postmaster/postmaster.c:4139
bn = <optimized out>
pid = <optimized out>
bn = <optimized out>
pid = <optimized out>
__func__ = "BackendStartup"
__errno_location = <optimized out>
__errno_location = <optimized out>
save_errno = <optimized out>
__errno_location = <optimized out>
__errno_location = <optimized out>
#23 ServerLoop () at ./build/../src/backend/postmaster/postmaster.c:1704
port = 0x556113ed4030
i = <optimized out>
rmask = {fds_bits = {8, 0 <repeats 15 times>}}
selres = <optimized out>
now = <optimized out>
readmask = {fds_bits = {24, 0 <repeats 15 times>}}
nSockets = 5
last_lockfile_recheck_time = 1604788565
last_touch_time = 1604788565
__func__ = "ServerLoop"
#24 0x0000556113481faf in PostmasterMain (argc=5, argv=0x556113ea8c50)
at ./build/../src/backend/postmaster/postmaster.c:1377
opt = <optimized out>
status = <optimized out>
userDoption = <optimized out>
listen_addr_saved = <optimized out>
i = <optimized out>
output_config_variable = <optimized out>
__func__ = "PostmasterMain"
#25 0x00005561131ebeed in main (argc=5, argv=0x556113ea8c50) at ./build/../src/backend/main/main.c:228
No locals.
It does not crash on PG13, fwiw.
What did I do?
What did I expect?
What did it do?
PG crashed without a message (and it took all the unlogged tables with it).
Log
What is my setup?