backend crash

Поиск
Список
Период
Сортировка
От kjonca@fastmail.com (Kamil Jońca)
Тема backend crash
Дата
Msg-id 87imi37spc.fsf@alfa.kjonca
обсуждение исходный текст
Ответы Re: backend crash  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Re: backend crash  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-bugs
I have problem with (pseudo) random backend crashes.
They seems to happen at one query, but not every time.

table:

--8<---------------cut here---------------start------------->8---
CREATE TABLE digitalocean.log (
    ts timestamp with time zone DEFAULT now() NOT NULL,
    actions jsonb NOT NULL,
    account text NOT NULL
);

ALTER TABLE ONLY digitalocean.log
    ADD CONSTRAINT log_ts_key UNIQUE (ts);
--8<---------------cut here---------------end--------------->8---







query:
--8<---------------cut here---------------start------------->8---
with x as (select jsonb_array_elements (actions->'actions')->'id' as id ,ts  from digitalocean.log where
account='onet')select max(x.id::bigint) from x;
 
--8<---------------cut here---------------end--------------->8---





stacktrace from core:

--8<---------------cut here---------------start------------->8---
sudo gdb -c core /usr/lib/postgresql/12/bin/postgres    
GNU gdb (Debian 9.1-3) 9.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/postgresql/12/bin/postgres...
Reading symbols from /usr/lib/debug/.build-id/20/7804ddc4a915f7f080ecec71883176fde6d69e.debug...
[New LWP 1820750]

warning: .dynamic section for "/usr/lib/x86_64-linux-gnu/libgnutls.so.30" is not at the expected address (wrong library
orversion mismatch?)
 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `postgres: parallel worker for PID 1820747                                     '.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007f562e80555b in __GI_abort () at abort.c:79
#2  0x000055f675632af4 in ExceptionalCondition (conditionName=conditionName@entry=0x55f6758523f8 "!(result->tdrefcount
==-1)", errorType=errorType@entry=0x55f67568a016 "FailedAssertion", 
 
    fileName=fileName@entry=0x55f675852008
"/build/postgresql-12-kUaQt8/postgresql-12-12.2/build/../src/backend/utils/cache/typcache.c",
lineNumber=lineNumber@entry=2621)at ./build/../src/backend/utils/error/assert.c:54
 
#3  0x000055f6756309ae in find_or_make_matching_shared_tupledesc (tupdesc=<optimized out>) at
./build/../src/backend/utils/cache/typcache.c:2621
#4  0x000055f675632191 in assign_record_type_typmod (tupDesc=<optimized out>, tupDesc@entry=0x55f6768ac950) at
./build/../src/backend/utils/cache/typcache.c:1815
#5  0x000055f675383328 in BlessTupleDesc (tupdesc=0x55f6768ac950) at ./build/../src/backend/executor/execTuples.c:2056
#6  BlessTupleDesc (tupdesc=tupdesc@entry=0x55f6768ac950) at ./build/../src/backend/executor/execTuples.c:2052
#7  0x000055f6755804fe in elements_worker_jsonb (fcinfo=0x55f6768ab788, as_text=false, funcname=<optimized out>) at
./build/../src/backend/utils/adt/jsonfuncs.c:2030
#8  0x000055f67537f57f in ExecMakeFunctionResultSet (fcache=0x55f67689ee90, econtext=econtext@entry=0x55f67689df48,
argContext=0x55f6768ad000,isNull=0x55f67689e5f8, isDone=isDone@entry=0x55f6768ab078) at
./build/../src/backend/executor/execSRF.c:606
#9  0x000055f6753a2b38 in ExecProjectSRF (node=node@entry=0x55f67689dc18, continuing=continuing@entry=false) at
./build/../src/backend/executor/nodeProjectSet.c:175
#10 0x000055f6753a2c1d in ExecProjectSet (pstate=0x55f67689dc18) at
./build/../src/backend/executor/nodeProjectSet.c:105
#11 0x000055f6753a3642 in ExecProcNode (node=0x55f67689dc18) at ./build/../src/include/executor/executor.h:239
#12 ExecResult (pstate=0x55f67689daa0) at ./build/../src/backend/executor/nodeResult.c:115
#13 0x000055f67538858c in ExecProcNode (node=0x55f67689daa0) at ./build/../src/include/executor/executor.h:239
#14 fetch_input_tuple (aggstate=aggstate@entry=0x55f67689d340) at ./build/../src/backend/executor/nodeAgg.c:406
#15 0x000055f67538a348 in agg_retrieve_direct (aggstate=0x55f67689d340) at
./build/../src/backend/executor/nodeAgg.c:1747
#16 ExecAgg (pstate=0x55f67689d340) at ./build/../src/backend/executor/nodeAgg.c:1562
#17 0x000055f67537499c in ExecProcNode (node=0x55f67689d340) at ./build/../src/include/executor/executor.h:239
#18 ExecutePlan (execute_once=<optimized out>, dest=0x55f676846288, direction=<optimized out>, numberTuples=0,
sendTuples=<optimizedout>, operation=CMD_SELECT, use_parallel_mode=<optimized out>, planstate=0x55f67689d340,
estate=0x55f67689d098)at ./build/../src/backend/executor/execMain.c:1646
 
#19 standard_ExecutorRun (queryDesc=0x55f676847950, direction=<optimized out>, count=0, execute_once=<optimized out>)
at./build/../src/backend/executor/execMain.c:364
 
#20 0x000055f675379837 in ParallelQueryMain (seg=seg@entry=0x55f6767f9948, toc=toc@entry=0x7f562343f000) at
./build/../src/backend/executor/execParallel.c:1399
#21 0x000055f67522d70f in ParallelWorkerMain (main_arg=<optimized out>) at
./build/../src/backend/access/transam/parallel.c:1431
#22 0x000055f6754644d7 in StartBackgroundWorker () at ./build/../src/backend/postmaster/bgworker.c:834
#23 0x000055f675472504 in do_start_bgworker (rw=<optimized out>) at
./build/../src/backend/postmaster/postmaster.c:5770
#24 maybe_start_bgworkers () at ./build/../src/backend/postmaster/postmaster.c:5996
#25 0x000055f675472f92 in sigusr1_handler (postgres_signal_arg=<optimized out>) at
./build/../src/backend/postmaster/postmaster.c:5167
#26 <signal handler called>
#27 0x00007f562e8d4fd6 in __GI___select (nfds=nfds@entry=5, readfds=readfds@entry=0x7ffc8caa4420,
writefds=writefds@entry=0x0,exceptfds=exceptfds@entry=0x0, timeout=timeout@entry=0x7ffc8caa4380) at
../sysdeps/unix/sysv/linux/select.c:41
#28 0x000055f675473844 in ServerLoop () at ./build/../src/backend/postmaster/postmaster.c:1668
#29 0x000055f67547550d in PostmasterMain (argc=5, argv=<optimized out>) at
./build/../src/backend/postmaster/postmaster.c:1377
#30 0x000055f6751872b4 in main (argc=5, argv=0x55f67679dc40) at ./build/../src/backend/main/main.c:228
(gdb) quit
--8<---------------cut here---------------end--------------->8---


--8<---------------cut here---------------start------------->8---
 SELECT version();
                                                   version                                                    
-------------------------------------------------------------------------------------------------------------
PostgreSQL 12.2 (Debian 12.2-3.pgdg+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 9.3.0-7) 9.3.0, 64-bit
--8<---------------cut here---------------end--------------->8---

-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [BUG] non archived WAL removed during production crash recovery
Следующее
От: wenjing
Дата:
Сообщение: [bug] Table not have typarray when created by single user mode