You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "ConfX (Jira)" <ji...@apache.org> on 2023/07/14 14:18:00 UTC
[jira] [Updated] (YARN-11532) Incorrect File Path
[ https://issues.apache.org/jira/browse/YARN-11532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ConfX updated YARN-11532:
-------------------------
Priority: Critical (was: Major)
> Incorrect File Path
> -------------------
>
> Key: YARN-11532
> URL: https://issues.apache.org/jira/browse/YARN-11532
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: ConfX
> Priority: Critical
>
> h2. What happened:
> In test org.apache.hadoop.yarn.util.TestFSDownload#testDownloadPublicWithStatCache, the file path is not correct and cause java.io.FileNotFoundException.
> h2. Buggy code:
> {code:java}
> public void testDownloadPublicWithStatCache() throws IOException,
> URISyntaxException, InterruptedException, ExecutionException {
> ...
> Path basedir = files.makeQualified(new Path("target", TestFSDownload.class.getSimpleName())); // <-- basedir is not correct
> ...
> FileSystem f = basedir.getFileSystem(conf);
> assumeTrue(FSDownload.ancestorsHaveExecutePermissions(f, basedir, null)); {code}
> The path basedir is not correct because it does not consider the file suffix. In FSDownload.ancestorsHaveExecutePermissions(f, basedir, null), FileNotFoundException is thrown.
> h2. How to reproduce:
> Run test org.apache.hadoop.yarn.util.TestFSDownload#testDownloadPublicWithStatCache and observe the failure.
> For an easy reproduction, run the reproduce.sh in the attachment.
> h2. Stack trace:
> {code:java}
> java.io.FileNotFoundException: File file:/home/shuai/xlab/configuration-fuzzing/debug-proj/fuzz-hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/target/TestFSDownload does not exist
> at org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:779)
> at org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:1100)
> at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:769)
> at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:462)
> at org.apache.hadoop.yarn.util.FSDownload.getFileStatus(FSDownload.java:236)
> at org.apache.hadoop.yarn.util.FSDownload.checkPermissionOfOther(FSDownload.java:218)
> at org.apache.hadoop.yarn.util.FSDownload.ancestorsHaveExecutePermissions(FSDownload.java:198)
> at org.apache.hadoop.yarn.util.TestFSDownload.testDownloadPublicWithStatCache(TestFSDownload.java:332) {code}
> You can use the reproduce.sh in the attachment to easily reproduce the bug.
> We are happy to provide a patch if this issue is confirmed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org