Skip to content

fs.getFileStatus NullPointException deal - #67

Open
chongchuanbing wants to merge 1 commit into
apache:masterfrom
chongchuanbing:tez-bugfix-20200518
Open

fs.getFileStatus NullPointException deal#67
chongchuanbing wants to merge 1 commit into
apache:masterfrom
chongchuanbing:tez-bugfix-20200518

Conversation

@chongchuanbing

Copy link
Copy Markdown

when the path is root and it has the excute permisson, it will continue get parent path to judge permisson. but the parent path of root will cause the NullPointException.

the statck trace:

2020-05-15T14:57:17,544 ERROR [HiveServer2-Background-Pool: Thread-117] exec.Task: Failed to execute tez graph.
org.apache.hadoop.ipc.RemoteException: java.lang.NullPointerException
at org.apache.hadoop.ipc.Client.call(Client.java:1476) ~[hadoop-common-2.7.7.jar:?]
at org.apache.hadoop.ipc.Client.call(Client.java:1413) ~[hadoop-common-2.7.7.jar:?]
at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:229) ~[hadoop-common-2.7.7.jar:?]
at com.sun.proxy.$Proxy30.getFileInfo(Unknown Source) ~[?:?]
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:776) ~[hadoop-hdfs-2.7.7.jar:?]
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:191) ~[hadoop-common-2.7.7.jar:?]
at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102) ~[hadoop-common-2.7.7.jar:?]
at com.sun.proxy.$Proxy31.getFileInfo(Unknown Source) ~[?:?]
at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:2117) ~[hadoop-hdfs-2.7.7.jar:?]
at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:1305) ~[hadoop-hdfs-2.7.7.jar:?]
at org.apache.hadoop.hdfs.DistributedFileSystem$22.doCall(DistributedFileSystem.java:1301) ~[hadoop-hdfs-2.7.7.jar:?]
at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81) ~[hadoop-common-2.7.7.jar:?]
at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1301) ~[hadoop-hdfs-2.7.7.jar:?]
at org.apache.tez.client.TezClientUtils.checkAncestorPermissionsForAllUsers(TezClientUtils.java:1033) ~[tez-api-0.9.2.jar:0.9.2]
at org.apache.tez.client.TezClientUtils.addLocalResources(TezClientUtils.java:277) ~[tez-api-0.9.2.jar:0.9.2]
at org.apache.tez.client.TezClientUtils.setupTezJarsLocalResources(TezClientUtils.java:185) ~[tez-api-0.9.2.jar:0.9.2]
at org.apache.tez.client.TezClient.getTezJarResources(TezClient.java:1156) ~[tez-api-0.9.2.jar:0.9.2]
at org.apache.tez.client.TezClient.setupApplicationContext(TezClient.java:473) ~[tez-api-0.9.2.jar:0.9.2]
at org.apache.tez.client.TezClient.start(TezClient.java:401) ~[tez-api-0.9.2.jar:0.9.2]
at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.startSessionAndContainers(TezSessionState.java:376) ~[hive-exec-2.3.6.jar:2.3.6]
at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.openInternal(TezSessionState.java:323) ~[hive-exec-2.3.6.jar:2.3.6]
at org.apache.hadoop.hive.ql.exec.tez.TezSessionPoolManager$TezSessionPoolSession.openInternal(TezSessionPoolManager.java:703) ~[hive-exec-2.3.6.jar:2.3.6]
at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.open(TezSessionState.java:196) ~[hive-exec-2.3.6.jar:2.3.6]
at org.apache.hadoop.hive.ql.exec.tez.TezTask.updateSession(TezTask.java:303) ~[hive-exec-2.3.6.jar:2.3.6]
at org.apache.hadoop.hive.ql.exec.tez.TezTask.execute(TezTask.java:168) ~[hive-exec-2.3.6.jar:2.3.6]
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:199) ~[hive-exec-2.3.6.jar:2.3.6]

@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 17sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall13m 55smaster passed
+1 💚compile0m 34smaster passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚compile0m 30smaster passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚checkstyle0m 55smaster passed
+1 💚javadoc0m 44smaster passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚javadoc0m 35smaster passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+0 🆗spotbugs1m 32sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs1m 29smaster passed
_ Patch Compile Tests _
+1 💚mvninstall0m 24sthe patch passed
+1 💚compile0m 25sthe patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚javac0m 25sthe patch passed
+1 💚compile0m 21sthe patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚javac0m 21sthe patch passed
+1 💚checkstyle0m 13sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 25sthe patch passed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04
+1 💚javadoc0m 25sthe patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚findbugs1m 6sthe patch passed
_ Other Tests _
+1 💚unit2m 5stez-api in the patch passed.
+1 💚asflicense0m 13sThe patch does not generate ASF License warnings.
26m 23s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-67/1/artifact/out/Dockerfile
GITHUB PR#67
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
unameLinux 9d1ef122daea 4.15.0-163-generic #171-Ubuntu SMP Fri Nov 5 11:55:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / 6d7ef20
Default JavaPrivate Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-67/1/testReport/
Max. process+thread count252 (vs. ulimit of 5500)
modulesC: tez-api U: tez-api
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-67/1/console
versionsgit=2.25.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ayushtkn

Copy link
Copy Markdown
Member

for root the parent will be null, in that case the while loop itself will break, I am not sure if I am catching this

@abstractdogabstractdog changed the title fs.getFukeStatus NullPointException dealfs.getFileStatus NullPointException dealDec 19, 2024
@abstractdog

Copy link
Copy Markdown
Contributor

could this be validated with a unit test against checkAncestorPermissionsForAllUsers with top-level path whose parent is root?

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@chongchuanbing@tez-yetus@ayushtkn@abstractdog