[pgpool-hackers: 4338] Re: Occasional 069.memory_leak_extended test failure

Tatsuo Ishii ishii at sraoss.co.jp
Mon May 22 16:27:08 JST 2023


> I have looked into this and found the cause:
> 
> 2023-05-21 01:27:01.362: pgbench pid 44167: LOG:  DB node id: 0 backend pid: 44180 statement: DISCARD ALL
> 2023-05-21 01:27:01.362: pgbench pid 44167: LOG:  DB node id: 1 backend pid: 44181 statement: DISCARD ALL
> 2023-05-21 01:27:01.362: pgbench pid 44167: LOG:  pool_send_and_wait: Error or notice message from backend: : DB node id: 0 backend pid: 44180 statement: "DISCARD ALL" message: "DISCARD ALL cannot be executed within a pipeline"
> 2023-05-21 01:27:01.362: pgbench pid 44167: WARNING:  packet kind of backend 1 ['C'] does not match with main/majority nodes packet kind ['E']
> 2023-05-21 01:27:01.362: pgbench pid 44167: FATAL:  failed to read kind from backend
> 2023-05-21 01:27:01.362: pgbench pid 44167: DETAIL:  kind mismatch among backends. Possible last query was: "DISCARD ALL" kind details are:0[E: DISCARD ALL cannot be executed within a pipeline] 1[C]
> 2023-05-21 01:27:01.362: pgbench pid 44167: HINT:  check data consistency among db nodes
> 
> After this, process 44167 exited as it was a FATAL error.
> test.sh then tried to read the process size of the process which was already gone.
> 
> after_size=`ps l $pid|tail -1|awk '{print $7}'`
>         delta=`expr $after_size - $init_size`
> 
>         echo "initial process size: $init_size after size: $after_size delta: $delta"
> 
> And the test failed.
> 
> We thought that we already have dealt with "cannot be executed within
> a pipeline" error, but this does not prevent child process from
> exiting as a result of the error like above.
> 
> https://www.pgpool.net/pipermail/pgpool-hackers/2023-April/004300.html
> 
> However I think there's nothing more in pgpool to do for the
> error. That says we have to fix the test.sh of
> 069.memory_leak_extended test failure.  Any idea?

Ok, I came up with an idea.

1. start pgbench in background (duration 30 seconds).
2. sleep 29 seconds.
3. run ps to get the process size.
4. wait for pgbench completes.

This way, we don't need to worry about the pgpool child process gone
away.

I will push the change to all stable branches. See how buildfarm reacts.

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