Bug on pldebugger

Поиск
Список
Период
Сортировка
От 陈佳昕(步真)
Тема Bug on pldebugger
Дата
Msg-id f7775fda-8346-4e12-bb36-32a872554585.buzhen.cjx@alibaba-inc.com
обсуждение исходный текст
Список pgsql-bugs
Hi, all

Recently, I used pldebugger to debug some plpgsql procedures and functions,and found some problems.
When the pldebugger is running, it will create two backends from client(pgadmin)to Postgresql server, communicate with each other by socket. When the socket client backend exits normally, the socket server exits, It's expected.  But when I disconnect the server directly in my pgadmin, the two backends just exit one. The another one is still there, and can not receive signal, so "select pg_terminate_backend()" can not kill it. The only method to force it to exit is "kill -9". The stack is:

#0  0x00007f4a799e89cd in accept () from /lib64/libpthread.so.0
#1  0x00007f4a70eaf5c2 in dbgcomm_listen_for_proxy () at dbgcomm.c:335
#2  0x00007f4a70eae165 in connectAsServer () at plugin_debugger.c:545
#3  attach_to_proxy (breakpoint=0x4053c10) at plugin_debugger.c:507
#4  0x00007f4a70eac2e8 in dbg_newstmt (estate=0x7ffe70b42090, stmt=0x3fffc28) at plpgsql_debugger.c:1430
#5  0x00007f4a70c90a03 in exec_stmt (estate=estate@entry=0x7ffe70b42090, stmt=0x3fffc28) at pl_exec.c:1929
#6  0x00007f4a70c941b5 in exec_stmts (stmts=<optimized out>, estate=0x7ffe70b42090) at pl_exec.c:1903
#7  exec_stmt_block (estate=estate@entry=0x7ffe70b42090, block=0x4000a20) at pl_exec.c:1695
#8  0x00007f4a70c94d10 in plpgsql_exec_function (func=func@entry=0x3ff9a48, fcinfo=fcinfo@entry=0x7ffe70b423f0, simple_eval_estate=simple_eval_estate@entry=0x0, atomic=atomic@entry=true) at pl_exec.c:597
#9  0x00007f4a70c8445b in plpgsql_call_handler (fcinfo=0x7ffe70b423f0) at pl_handler.c:264
#10 0x0000000000a467a0 in FunctionCallInvokeCheckSPL (fcinfo=<optimized out>) at fmgr.c:2271

It waits some new connections but no one to connect it.

How To Reproduce:
Step 1: Use pgadmin client to debug function.
Step 2: You will see two connections from your client using "ps -ef" on the server host.
Step 3: Disconnect the server in pgadmin
Step 4: You will see one exists connection on the Postgresql server using "ps -ef" or "select * from pg_stat_activity". The stack is shown above.

Environment:
client:pgadmin4 4.13
server: PostgreSQL 11.2 

Thanks & Best Regard
Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: incorrect pg_dump output due to not handling dropped rolescorrectly
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Reorderbuffer crash during recovery