geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (GEODE-4362) view preparation throws uncaught RuntimeException
Date Wed, 28 Feb 2018 19:17:00 GMT


ASF subversion and git services commented on GEODE-4362:

Commit 0afb75bbaef7dfba7bfba70d8de0617c30db99c2 in geode's branch refs/heads/develop from
[;h=0afb75b ]

GEODE-4362: view preparation throws uncaught RuntimeException

The problem was happening when a new member joined with a coordinator that
suddenly shuts down before other members have been told to install the
new membership view.  They've received a "prepare for view change" message
containing the new view but have not been told to commit that change.

Another member then becomes coordinator and sees that there was a new member
in the prepared view.  It picks this up and adds it to the new view it
sends out.

The problem was that the public encryption keys of the members weren't
being transferred from the old view to the new view and when looking for
public keys we were fishing them out of GMSEncrypt instead of getting
them from the membership view.  This caused an NPE to be thrown when trying
to fish out the public key of the new member - GMSEncrypt didn't know about
this new member because the view containing it was never installed - it
was only prepared.

The fix is to transfer the public keys from the old view to the new one and
to look for public keys in the view instead of GMSEncrypt.

This closes #1520

> view preparation throws uncaught RuntimeException
> -------------------------------------------------
>                 Key: GEODE-4362
>                 URL:
>             Project: Geode
>          Issue Type: Bug
>          Components: membership
>            Reporter: Bruce Schuchardt
>            Assignee: Galen O'Sullivan
>            Priority: Major
> I put a pause in Services.installView() before the view is passed to the Messenger service
and ran LocatorUDPSecurityDUnitTest.testCollocatedLocatorWithSecurity() and encountered a
>  {noformat}
> [vm1] java.lang.RuntimeException: Not found public key for member<v31>:32773
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.GMSEncrypt.getPublicKey(
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.JGroupsMessenger.getPublicKey(
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave.addPublicKeysToView(
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave.sendView(
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave.prepareView(
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave$ViewCreator.prepareAndSendView(
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave$ViewCreator.sendInitialView(
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave$
> [vm1] Caused by: java.lang.NullPointerException
> [vm1] 	at<init>(
> [vm1] 	at<init>(
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.GMSEncrypt.getPublicKey(
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.GMSEncrypt$PeerEncryptor.<init>(
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.GMSEncrypt.createPeerEncryptor(
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.GMSEncrypt.getPeerEncryptor(
> [vm1] 	at org.apache.geode.distributed.internal.membership.gms.messenger.GMSEncrypt.getPublicKey(
> [vm1] 	... 7 more
> {noformat}
> Since GMSJoinLeave already had the new view installed and JGroupsMessenger did not have
the new view installed we were unable to find the public key for one of the recipients of
the new view.  View preparation should probably be synchronized with view installation so
that both aren't done in parallel.

This message was sent by Atlassian JIRA

View raw message