hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao Chen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-15593) UserGroupInformation TGT renewer throws NPE
Date Fri, 20 Jul 2018 18:29:00 GMT

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

Xiao Chen commented on HADOOP-15593:

Thanks [~gabor.bota] for working on this and others for comments! It makes sense to me to
improve existing behavior in HADOOP-15622.

>From the JDK issue [~jojochuang] pointed to, it looks like there are some JDK improvement
as well (https://bugs.openjdk.java.net/browse/JDK-8147772). {code:java}
     public final java.util.Date getEndTime() {
-        return (Date) endTime.clone();
+        return (endTime == null) ? null : (Date) endTime.clone();
So we also need to handle getEndTime() == null in the UGI code. Otherwise we'll see real NPEs
from UGI this time :)

Stepping back, the original exception is from {{KerberosTicket}}, whose {{endTime}} is null
judging from some [code grepping|https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/javax/security/auth/kerberos/KerberosTicket.java#L482].
While I think Daryn's comment would make this better, there is no atomicity guarantee between
the {{tgt.isDestroyed}} check and the {{tgt.getEndTime}} call and older versions of JDK could
still result in UGI to fail the same way - but that's the best we can do here.

> UserGroupInformation TGT renewer throws NPE
> -------------------------------------------
>                 Key: HADOOP-15593
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15593
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 3.0.0
>            Reporter: Wei-Chiu Chuang
>            Assignee: Gabor Bota
>            Priority: Blocker
>         Attachments: HADOOP-15593.001.patch, HADOOP-15593.002.patch
> Found the following NPE thrown in UGI tgt renewer. The NPE was thrown within an exception
handler so the original exception was hidden, though it's likely caused by expired tgt.
> {noformat}
> 18/07/02 10:30:57 ERROR util.SparkUncaughtExceptionHandler: Uncaught exception in thread
Thread[TGT Renewer for foo@EXAMPLE.COM,5,main]
> java.lang.NullPointerException
>         at javax.security.auth.kerberos.KerberosTicket.getEndTime(KerberosTicket.java:482)
>         at org.apache.hadoop.security.UserGroupInformation$1.run(UserGroupInformation.java:894)
>         at java.lang.Thread.run(Thread.java:748){noformat}
> Suspect it's related to [https://bugs.openjdk.java.net/browse/JDK-8154889].
> The relevant code was added in HADOOP-13590. File this jira to handle the exception better.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org

View raw message