[pgpool-hackers: 4235] Re: segmentation fault error

Tatsuo Ishii ishii at sraoss.co.jp
Mon Dec 5 14:41:22 JST 2022


Hi Inagaki-san,

> Hi, Ishii-san.
> 
> Sorry for the late reply, I was organizing the information.
> 
>>case T_InsertStmt:
>>
>>which is absolutely nonsense because the stack #1 is processing T_List. There's no such a thing in a parse tree which consists of list of INSERT statements.
> 
>>From which information is the jump destination T_InsertStmt?
> #3 on the stack is inside case T_SelectStmt:, so it is recognized as a SELECT statement.
> Also, I could be confirmed that the SQL I was executing was a SELECT statement.

You are right. I was confused.

> #0 0x0000559ff3b977f4 in function_call_walker (node=0x1000100000000, context=0x7ffcefcf1390) at utils/pool_select_walker.c:341
> #1 0x0000559ff3b9458d in raw_expression_tree_walker (node=0x559ff531aa10, walker=0x559ff3b977e0 <function_call_walker>, context=0x7ffcefcf1390) at rewrite/pool_timestamp.c:1454

As you said the memory area pointed by "node" was broken or
smashed. The segfault was occurred inside Execute() which is called
when "execute" message was sent from frontend. Because there's no
place to modify "node" parameter inside Execute(), my guess is "node"
had been already smashed before calling Execute(). The "node" memory
area was created by SQL parser in Parse() which was called when parse
message arrived. So it is likely somewhere between Parse() and
Execute() the "node" was smashed.

Maybe you could insert "pool_has_function_call(node)" somewhere to see
where the "node" memory was first smashed.

>>Can you share pgpool.conf and pgpool log?
> 
> I'll pick it up and send it to you.
> Please let me know if you need any additional information.
> 
> 
> pgpool log
> [2022-11-08 00:09:29][14402][main] WARNING:  child process with pid: 24266 was terminated by segmentation fault
> [2022-11-08 00:09:29][14402][main] LOG:  fork a new child process with pid: 10357
> 
> The previous log for pid:24266 is below.(It's old, so I don't think it will affect it.)
> 
> [2022-11-07 21:00:02][24266][psql] LOG:  pool_send_and_wait: Error or notice message from backend: : DB node id: 0 backend pid: 17873 statement: xxx

Unfortunately this does not help a lot.

> pgpool.conf
> I'll let you know what the parameters change.

Thanks for the info. Looks usual except num_init_children is high but
I don't think it's insane if you have enough memory.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list