[
https://issues.apache.org/jira/browse/HADOOP-19890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18080111#comment-18080111
]
ASF GitHub Bot commented on HADOOP-19890:
-----------------------------------------
ajfabbri opened a new pull request, #8491:
URL: https://github.com/apache/hadoop/pull/8491
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
The S3A isolated classloader test appears to be broken with newer JDKs'
restrictions on reflection access. The test fails with
`java.lang.IllegalAccessException: Attempt to lookup caller-sensitive method
using restricted lookup object`
### How was this patch tested?
```
./mvnw -pl :hadoop-aws -am -Dtest=none
-Dit.test=ITestS3AFileSystemIsolatedClassloader.java clean verify
```
with Java 17 and 21.
### For code changes:
- [x] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [x] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [na] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [na] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
### AI Tooling
If an AI tool was used:
- [na] The PR includes the phrase "Contains content generated by <tool>"
where <tool> is the name of the AI tool used.
- [x] My use of AI contributions follows the ASF legal policy
https://www.apache.org/legal/generative-tooling.html
> S3A isolated classloader test broken with JDK >=17
> --------------------------------------------------
>
> Key: HADOOP-19890
> URL: https://issues.apache.org/jira/browse/HADOOP-19890
> Project: Hadoop Common
> Issue Type: Test
> Components: fs/s3
> Affects Versions: 3.5.0
> Reporter: Aaron Fabbri
> Assignee: Aaron Fabbri
> Priority: Minor
>
> The S3A isolated classloader test appears to be broken with newer JDKs'
> restrictions on reflection access. The test fails with
> _java.lang.IllegalAccessException: Attempt to lookup caller-sensitive method
> using restricted lookup object_
> h3. Reproduction (same behavior w/ JDK 17 and 21):
> {{./mvnw -pl :hadoop-aws -am -Dtest=none
> -Dit.test=ITestS3AFileSystemIsolatedClassloader.java clean verify}}
>
> {{[ERROR]
> org.apache.hadoop.fs.s3a.ITestS3AFileSystemIsolatedClassloader.defaultIsolatedClassloader
> – Time elapsed: 0.301 s <<< ERROR!}}
> {{software.amazon.awssdk.thirdparty.org.apache.commons.logging.LogConfigurationException:
> java.lang.IllegalStateException: Could not invoke public final
> java.lang.ClassLoader java.lang.ClassLoader.getParent() on
> org.apache.hadoop.fs.s3a.ITestS3AFileSystemIsolatedClassloader$CustomClassLoader@2b62475a
> with arguments [] (Caused by java.lang.IllegalStateException: Could not
> invoke public final java.lang.ClassLoader java.lang.ClassLoader.getParent()
> on
> org.apache.hadoop.fs.s3a.ITestS3AFileSystemIsolatedClassloader$CustomClassLoader@2b62475a
> with arguments [])}}
> {{ at
> software.amazon.awssdk.thirdparty.org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:571)}}
> {{ at
> software.amazon.awssdk.thirdparty.org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:292)}}
> <snip>
> {{ at
> org.apache.hadoop.fs.s3a.ITestS3AFileSystemIsolatedClassloader.assertInNewFilesystem(ITestS3AFileSystemIsolatedClassloader.java:103)}}
> {{ at
> org.apache.hadoop.fs.s3a.ITestS3AFileSystemIsolatedClassloader.defaultIsolatedClassloader(ITestS3AFileSystemIsolatedClassloader.java:130)}}
> {{ at java.base/java.lang.reflect.Method.invoke(Method.java:580)}}
> {{ at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)}}
> {{ at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)}}
> {{Caused by: java.lang.IllegalStateException: Could not invoke public final
> java.lang.ClassLoader java.lang.ClassLoader.getParent() on
> org.apache.hadoop.fs.s3a.ITestS3AFileSystemIsolatedClassloader$CustomClassLoader@2b62475a
> with arguments []}}
> {{ at
> org.mockito.internal.util.reflection.InstrumentationMemberAccessor.invoke(InstrumentationMemberAccessor.java:255)}}
> {{ at
> org.mockito.internal.util.reflection.ModuleMemberAccessor.invoke(ModuleMemberAccessor.java:55)}}
> {{ at
> org.mockito.internal.creation.bytebuddy.MockMethodAdvice.tryInvoke(MockMethodAdvice.java:314)}}
> {{ at
> org.mockito.internal.creation.bytebuddy.MockMethodAdvice.access$500(MockMethodAdvice.java:64)}}
> {{ at
> org.mockito.internal.creation.bytebuddy.MockMethodAdvice$RealMethodCall.invoke(MockMethodAdvice.java:234)}}
> {{ at
> org.mockito.internal.invocation.InterceptedInvocation.callRealMethod(InterceptedInvocation.java:142)}}
> {{ at
> org.mockito.internal.stubbing.answers.CallsRealMethods.answer(CallsRealMethods.java:45)}}
> {{ at org.mockito.Answers.answer(Answers.java:90)}}
> {{ at}}
> {\{ <snip>}}
> {{
> software.amazon.awssdk.thirdparty.org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:541)}}
> {{ ... 23 more}}
> {{Caused by: java.lang.IllegalAccessException: Attempt to lookup
> caller-sensitive method using restricted lookup object}}
> {{ at
> java.base/java.lang.invoke.MethodHandles$Lookup.findBoundCallerLookup(MethodHandles.java:3815)}}
> {{ at
> java.base/java.lang.invoke.MethodHandles$Lookup.unreflect(MethodHandles.java:3451)}}
> {{ at
> org.mockito.internal.util.reflection.InstrumentationMemberAccessor.invoke(InstrumentationMemberAccessor.java:234)}}
> {{ ... 44 more}}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]