Abhishek Chennaka has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/20626 )
Change subject: [clock] KUDU-3521 fix crash when clock is synchronized by PTPd ...................................................................... [clock] KUDU-3521 fix crash when clock is synchronized by PTPd There was an earlier attempt to address the issue [1], but the fix hasn't received +2 since there was not enough evidence behind the root cause analysis. With the report on #kudu-general Slack channel [2], from the analysis of the code [3] it's easy to see there isn't any other way to get such a manifestation of the issue but a negative value for the 'maxerror' field of the 'timex' structure returned by the ntp_adjtime()/adjtimex() system call. The essence of the problem is that in Kudu the maximum error is supposed to be a non-negative number. This patch addresses the issue. [1] https://gerrit.cloudera.org/#/c/12149/ [2] https://getkudu.slack.com/archives/C0CPXJ3CH/p1698246065354269 [3] https://github.com/apache/kudu/blob/04fdbd0974f4418295d57c0daa4b67de3e777a43/src/kudu/clock/hybrid_clock.cc#L627-L706 Change-Id: Ibbe1a50c4857b9742d2ffde35440d0dee082edc0 Reviewed-on: http://gerrit.cloudera.org:8080/20626 Tested-by: Kudu Jenkins Reviewed-by: Yingchun Lai <[email protected]> Reviewed-by: Abhishek Chennaka <[email protected]> --- M src/kudu/clock/builtin_ntp.cc M src/kudu/clock/hybrid_clock.cc M src/kudu/clock/system_ntp.cc 3 files changed, 27 insertions(+), 15 deletions(-) Approvals: Kudu Jenkins: Verified Yingchun Lai: Looks good to me, approved Abhishek Chennaka: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/20626 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ibbe1a50c4857b9742d2ffde35440d0dee082edc0 Gerrit-Change-Number: 20626 Gerrit-PatchSet: 3 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yingchun Lai <[email protected]>
