symat opened a new pull request #1833:
URL: https://github.com/apache/zookeeper/pull/1833


   This is the ZOOKEEPER-4477 patch for branch-3.5. Similar to the same fix on 
newer branches
   but using junit 4 in the tests (the junit upgrade happened in ZooKeeper 3.6).
   
   This bug is similar to the one fixed in 
https://issues.apache.org/jira/browse/KAFKA-12730.
   
   Our Kerberos ticket refresh thread performs re-login by logging out and then 
logging in again. If
   login fails, we retry after some sleep. Every reLogin() operation performs 
loginContext.logout()
   and loginContext.login(). If login fails, we end up with two consecutive 
logouts. This used to
   work in older Java versions, but from Java 9 onwards, this results in a 
NullPointerException due
   to https://bugs.openjdk.java.net/browse/JDK-8173069. We should check if 
logout is required before
   attempting logout.
   
   I fixed the issue and added a new unit test to test some ticket renewal 
scenarios. I managed to
   reproduce the problem in 
KerberosTicketRenewalTest.shouldRecoverIfKerberosNotAvailableForSomeTime()
   which (before the fix) failed with Java13 but succeeded with Java8.
   
   (cherry picked from commit 73ea6aaffc7a29a31df9007244f96d8d67fef953)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to