[pgpool-general: 9073] Re: Segmentation after switchover

Tatsuo Ishii ishii at sraoss.co.jp
Thu Apr 4 17:03:31 JST 2024


>> But there's a check at line 2604 of pgpool_main.c:
>>
>> if (pool_node_status[j] == POOL_NODE_STATUS_STANDBY)
>>
>> If pool_node_status[j] is POOL_NODE_STATUS_STANDBY, the target node
>> (0) must be alive in the past. I suspect node 0 goes down after the
>> pool_node_status[j] was updated. I should have checked slots
>> availability before calling get_query_result at 2609.
>>
> 
> I wasn't sure about line 2609, but adding a check does make sense. The loop
> at lines 2569-2579 definitely is broken. This also is where the segfault
> happens at this moment. I've attached a patch (against 4.5.1) that should
> address this issue.

Thanks. You are right. I will push your change.

> Great. I've added the patch to our build, including the attached patch and
> I'm rerunning the tests. I did have to alter the patch for
> pool_worker_child.c a bit to make it apply on 4.5.1.

Thank you!

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-general mailing list