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

Martin Balao mbalao at openjdk.org
Wed Sep 11 18:14:18 UTC 2024


On Tue, 3 Sep 2024 19:48:42 GMT, Alexey Bakhtin <abakhtin at openjdk.org> wrote:

>> … on older docker releases
>> 
>> Please review the fix for regression on the old Docker versions (before v18.04).
>> 
>> [JDK-8316304](https://bugs.openjdk.org/browse/JDK-8316304) was backported to JDK21, requiring statx syscall support.
>> In the old Docker versions, the default seccomp profile does not allow statx syscall and fails with EPERM error code.
>> Suggest fixing this issue by fallback to alternative implementation at runtime if syscall is not allowed.
>> 
>> The same issue with copy_file_range syscall.
>> 
>> The fix was initially submitted against upstream jdk ( https://github.com/openjdk/jdk/pull/20484 ) but after discussion submitted to JDK21
>
> Alexey Bakhtin has updated the pull request incrementally with one additional commit since the last revision:
> 
>   added comments

The options that we have are not ideal. I'll approve this change for 21u on the basis that it should be harmless and that the double-call penalty (e.g. statx - stat) will only be experienced under rare circumstances (i.e. disabling statx with a seccomp filter, as EPERM does not seem to be returned otherwise).

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

Marked as reviewed by mbalao (Reviewer).

PR Review: https://git.openjdk.org/jdk21u-dev/pull/951#pullrequestreview-2298170536


More information about the jdk-updates-dev mailing list