RFR: 8337966: (fs) Files.readAttributes fails with Operation not permitted on older docker releases [v2]

Brian Burkhalter bpb at openjdk.org
Thu Aug 29 14:49:22 UTC 2024


On Wed, 28 Aug 2024 23:44:37 GMT, Alexey Bakhtin <abakhtin at openjdk.org> wrote:

>> Please review the fix for regression on the old docker versions (before v18.04)
>> 
>> Suggest to verify if statx is permitted during initialization
>> 
>> statx(-1, "", AT_EMPTY_PATH, 0, &statx_buf) return EPERM if statx syscall not permitted and EBADF otherwise
>> 
>> Fallback to stat() if statx() not permitted
>> 
>> Related  jtreg tests passed
>
> Alexey Bakhtin has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Verify EPERM at runtime

src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c line 691:

> 689:             copy_statx_attributes(env, &statx_buf, attrs);
> 690:             return;
> 691:         } else if (errno != ENOSYS && errno != EPERM) {

Why is `ENOSYS` added here? Has this also been observed?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20484#discussion_r1736379289


More information about the nio-dev mailing list