hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11934) Use of JavaKeyStoreProvider in LdapGroupsMapping causes infinite loop
Date Fri, 29 May 2015 11:55:19 GMT

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

Hudson commented on HADOOP-11934:
---------------------------------

SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #212 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/212/])
HADOOP-11934. Use of JavaKeyStoreProvider in LdapGroupsMapping causes infinite loop. Contributed
by Larry McCay. (cnauroth: rev 860b8373c3a851386b8cd2d4265dd35e5aabc941)
* hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/AbstractJavaKeyStoreProvider.java
* hadoop-common-project/hadoop-common/src/main/resources/META-INF/services/org.apache.hadoop.security.alias.CredentialProviderFactory
* hadoop-common-project/hadoop-common/CHANGES.txt
* hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/LocalJavaKeyStoreProvider.java
* hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/JavaKeyStoreProvider.java
* hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/alias/TestCredentialProviderFactory.java


> Use of JavaKeyStoreProvider in LdapGroupsMapping causes infinite loop
> ---------------------------------------------------------------------
>
>                 Key: HADOOP-11934
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11934
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.6.0
>            Reporter: Mike Yoder
>            Assignee: Larry McCay
>            Priority: Blocker
>             Fix For: 2.7.1
>
>         Attachments: HADOOP-11934-11.patch, HADOOP-11934.001.patch, HADOOP-11934.002.patch,
HADOOP-11934.003.patch, HADOOP-11934.004.patch, HADOOP-11934.005.patch, HADOOP-11934.006.patch,
HADOOP-11934.007.patch, HADOOP-11934.008.patch, HADOOP-11934.009.patch, HADOOP-11934.010.patch,
HADOOP-11934.012.patch, HADOOP-11934.013.patch
>
>
> I was attempting to use the LdapGroupsMapping code and the JavaKeyStoreProvider at the
same time, and hit a really interesting, yet fatal, issue.  The code goes into what ought
to have been an infinite loop, were it not for it overflowing the stack and Java ending the
loop.  Here is a snippet of the stack; my annotations are at the bottom.
> {noformat}
> 	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370)
> 	at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296)
> 	at org.apache.hadoop.security.alias.JavaKeyStoreProvider.<init>(JavaKeyStoreProvider.java:88)
> 	at org.apache.hadoop.security.alias.JavaKeyStoreProvider.<init>(JavaKeyStoreProvider.java:65)
> 	at org.apache.hadoop.security.alias.JavaKeyStoreProvider$Factory.createProvider(JavaKeyStoreProvider.java:291)
> 	at org.apache.hadoop.security.alias.CredentialProviderFactory.getProviders(CredentialProviderFactory.java:58)
> 	at org.apache.hadoop.conf.Configuration.getPasswordFromCredentialProviders(Configuration.java:1863)
> 	at org.apache.hadoop.conf.Configuration.getPassword(Configuration.java:1843)
> 	at org.apache.hadoop.security.LdapGroupsMapping.getPassword(LdapGroupsMapping.java:386)
> 	at org.apache.hadoop.security.LdapGroupsMapping.setConf(LdapGroupsMapping.java:349)
> 	at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:73)
> 	at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)
> 	at org.apache.hadoop.security.Groups.<init>(Groups.java:70)
> 	at org.apache.hadoop.security.Groups.<init>(Groups.java:66)
> 	at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:280)
> 	at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:283)
> 	at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:260)
> 	at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:804)
> 	at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:774)
> 	at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:647)
> 	at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:2753)
> 	at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:2745)
> 	at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2611)
> 	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370)
> 	at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296)
> 	at org.apache.hadoop.security.alias.JavaKeyStoreProvider.<init>(JavaKeyStoreProvider.java:88)
> 	at org.apache.hadoop.security.alias.JavaKeyStoreProvider.<init>(JavaKeyStoreProvider.java:65)
> 	at org.apache.hadoop.security.alias.JavaKeyStoreProvider$Factory.createProvider(JavaKeyStoreProvider.java:291)
> 	at org.apache.hadoop.security.alias.CredentialProviderFactory.getProviders(CredentialProviderFactory.java:58)
> 	at org.apache.hadoop.conf.Configuration.getPasswordFromCredentialProviders(Configuration.java:1863)
> 	at org.apache.hadoop.conf.Configuration.getPassword(Configuration.java:1843)
> 	at org.apache.hadoop.security.LdapGroupsMapping.getPassword(LdapGroupsMapping.java:386)
> 	at org.apache.hadoop.security.LdapGroupsMapping.setConf(LdapGroupsMapping.java:349)
> 	at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:73)
> 	at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)
> 	at org.apache.hadoop.security.Groups.<init>(Groups.java:70)
> 	at org.apache.hadoop.security.Groups.<init>(Groups.java:66)
> 	at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:280)
> 	at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:283)
> 	at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:260)
> 	at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:804)
> 	at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:774)
> 	at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:647)
> 	at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:2753)
> 	at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:2745)
> 	at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2611)
> 	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370)
> 	at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296){noformat}
> Here's my annotation, going from bottom to top.
> * Somehow we enter Path.getFileSystem()
> * This goes to FileSystem cache stuff, and then it wants the current user
> * So we get to UserGroupInformation.getCurrentUser(), which as you can imagine gets to
> * getUserToGroupsMappingService and thence to LdapGroupsMapping.setConf().
> * That code gets the needed passwords, and we're using the CredentialProvider, so unsurprisingly
we get to
> * getPasswordFromCredentialProviders() - which chooses the JavaKeyStoreProvider like
I told it to.
> * The JavaKeyStoreProvider, in its constructor, does "fs = path.getFileSystem(conf);"
> * And guess what, we're back in Path.getFileSystem, where we started at the beginning.
> Please let me know if I've somehow configured something incorrectly, but if I have I
can't figure out what it is...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message