[pgpool-general: 9074] Re: Segmentation after switchover
Emond Papegaaij
emond.papegaaij at gmail.com
Thu Apr 4 19:50:11 JST 2024
Op do 4 apr 2024 om 10:03 schreef Tatsuo Ishii <ishii at sraoss.co.jp>:
> >> 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!
>
I can confirm that with all patches applied, I no longer see any
segmentation faults in our tests. I will add explicit checks for coredumps
and segfaults in our testsuite, so we can keep monitoring this. It seems
we've got them all fixed now. Thanks for the great support!
Best regards,
Emond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20240404/c76016a0/attachment.htm>
More information about the pgpool-general
mailing list