[ 
https://issues.apache.org/jira/browse/GEODE-3692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16502095#comment-16502095
 ] 

Bruce Schuchardt commented on GEODE-3692:
-----------------------------------------

The security manager is established in InternalDistributedSystem.initialize() 
before the server threads are created.  Sarge & I _think_ that this is 
establishing a security manager in SecurityUtils, which uses an unsynchronized 
non-volatile static variable to store the manager for later access.  This 
appears to have been null in the ServerConnection thread that threw the 
exception.  Perhaps some synchronization is needed around this variable, but 
it's in the Shiro library so we can't do this ourselves.

Somehow the Flaky category was removed from this test.  We're re-adding ig.

> Intermittent test failure: ClientAuthDUnitTest
> ----------------------------------------------
>
>                 Key: GEODE-3692
>                 URL: https://issues.apache.org/jira/browse/GEODE-3692
>             Project: Geode
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.2.1
>            Reporter: Kenneth Howe
>            Priority: Major
>              Labels: Ci, Flaky
>
> This {{authWithCorrectPasswordShouldPass}} fails intermittently in Geode 
> nightly builds.
> {code}
> [vm1] [info 2017/09/19 21:27:57.967 UTC <poolTimer-DEFAULT-2> tid=0x1bc] 
> Error prefilling connections : 
> org.apache.geode.security.AuthenticationFailedException: No SecurityManager 
> accessible to the calling code, either bound to the 
> org.apache.shiro.util.ThreadContext or as a vm static singleton.  This is an 
> invalid application configuration.
> [vm1] org.apache.geode.security.AuthenticationFailedException: No 
> SecurityManager accessible to the calling code, either bound to the 
> org.apache.shiro.util.ThreadContext or as a vm static singleton.  This is an 
> invalid application configuration.
> [vm1]         at 
> org.apache.geode.internal.cache.tier.sockets.HandShake.verifyCredentials(HandShake.java:1696)
> [vm1]         at 
> org.apache.geode.internal.cache.tier.sockets.ServerConnection.setCredentials(ServerConnection.java:1029)
> [vm1]         at 
> org.apache.geode.internal.cache.tier.sockets.command.PutUserCredentials.cmdExecute(PutUserCredentials.java:52)
> [vm1]         at 
> org.apache.geode.internal.cache.tier.sockets.BaseCommand.execute(BaseCommand.java:162)
> [vm1]         at 
> org.apache.geode.internal.cache.tier.sockets.ServerConnection.doNormalMsg(ServerConnection.java:785)
> [vm1]         at 
> org.apache.geode.internal.cache.tier.sockets.LegacyServerConnection.doOneMessage(LegacyServerConnection.java:85)
> [vm1]         at 
> org.apache.geode.internal.cache.tier.sockets.ServerConnection.run(ServerConnection.java:1166)
> [vm1]         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> [vm1]         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [vm1]         at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl$1$1.run(AcceptorImpl.java:557)
> [vm1]         at java.lang.Thread.run(Thread.java:748)
> [vm1] Caused by: org.apache.shiro.UnavailableSecurityManagerException: No 
> SecurityManager accessible to the calling code, either bound to the 
> org.apache.shiro.util.ThreadContext or as a vm static singleton.  This is an 
> invalid application configuration.
> [vm1]         at 
> org.apache.shiro.SecurityUtils.getSecurityManager(SecurityUtils.java:123)
> [vm1]         at 
> org.apache.shiro.subject.Subject$Builder.<init>(Subject.java:627)
> [vm1]         at 
> org.apache.shiro.SecurityUtils.getSubject(SecurityUtils.java:56)
> [vm1]         at 
> org.apache.geode.internal.security.IntegratedSecurityService.login(IntegratedSecurityService.java:133)
> [vm1]         at 
> org.apache.geode.internal.cache.tier.sockets.HandShake.verifyCredentials(HandShake.java:1686)
> [vm1]         ... 10 more
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to