OpenSearch: [BUG] OpenSearch 2.19.0 with installed repository-s3 plugin cannot be stopped
Describe the bug
When the repository-s3 plugin is installed, it is no longer possible to stop a running OpenSearch instance. Happens since 2.19.0.
Related component
Plugins
To Reproduce
- Start OpenSearch with installed ‘repository-s3’ plugin
curl -O https://artifacts.opensearch.org/releases/bundle/opensearch/2.19.0/opensearch-2.19.0-linux-x64.tar.gz
tar xvfz opensearch-2.19.0-linux-x64.tar.gz
cd opensearch-2.19.0/
bin/opensearch-plugin install repository-s3
echo 'plugins.security.disabled: true' >> config/opensearch.yml
bin/opensearch
- now wait until OpenSearch has started … and try to stop it by pressing CONTROL/STRG+c
=> It does not stop, shows the following exception and hangs (must be killed)
[2025-02-14T11:02:16,876][ERROR][i.n.u.c.D.rejectedExecution] [Mac.lan] Failed to submit a listener notification task. Event loop shut down?
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")
at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:485) ~[?:?]
at java.base/java.security.AccessController.checkPermission(AccessController.java:1068) ~[?:?]
at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:416) ~[?:?]
at java.base/java.lang.ClassLoader.checkClassLoaderPermission(ClassLoader.java:2060) ~[?:?]
at java.base/java.lang.Thread.getContextClassLoader(Thread.java:1502) ~[?:?]
at io.netty.util.concurrent.GlobalEventExecutor.startThread(GlobalEventExecutor.java:239) ~[netty-common-4.1.117.Final.jar:4.1.117.Final]
at io.netty.util.concurrent.GlobalEventExecutor.execute0(GlobalEventExecutor.java:232) ~[netty-common-4.1.117.Final.jar:4.1.117.Final]
at io.netty.util.concurrent.GlobalEventExecutor.execute(GlobalEventExecutor.java:226) ~[netty-common-4.1.117.Final.jar:4.1.117.Final]
at io.netty.util.concurrent.DefaultPromise.safeExecute(DefaultPromise.java:862) [netty-common-4.1.117.Final.jar:4.1.117.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:500) [netty-common-4.1.117.Final.jar:4.1.117.Final]
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636) [netty-common-4.1.117.Final.jar:4.1.117.Final]
at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:625) [netty-common-4.1.117.Final.jar:4.1.117.Final]
at io.netty.util.concurrent.DefaultPromise.setSuccess(DefaultPromise.java:97) [netty-common-4.1.117.Final.jar:4.1.117.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:1059) [netty-common-4.1.117.Final.jar:4.1.117.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.117.Final.jar:4.1.117.Final]
at java.base/java.lang.Thread.run(Thread.java:840) [?:?]
Expected behavior
OpenSearch should not hang on stop when the repository-s3 plugin is installed.
Additional Details
Plugins
- all plugins of 2.19.0
- repository-s3
Host/Environment (please complete the following information):
- OS: macOS Sequoia
- Version 15.3.1
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 31 (21 by maintainers)
Commits related to this issue
- use patched repository-s3 (see https://github.com/opensearch-project/OpenSearch/issues/17363) — committed to Graylog2/graylog2-server by moesterheld 2 years ago
Facing the same problem. Since we use scripts to start/stop OS, this is a blocker for us to update. I will try to replace netty locally to see if that helps me as a workaround
Yes! Maven does not allow overwriting the same version binaries. Recommend to do a patch instead to avoid having different artifacts on different platforms.
Thanks @olfuerniss then we are good to release on Thursday!
LGTM 😃
Check installed plugins
curl 'localhost:9200/_cat/plugins'AND … now it can be stopped with Control+C. Thanks!!!
Yes, the issue is resolved, thanks @peterzhuamazon
2.19.1 Release Issue can be tracked here
Yeah, it looks like a 2.19.1 patch release is probably the way to go here. FYI @getsaurabh02
It’s also worth thinking about how we missed this in testing.
Why is this issue not mentioned in the release notes?
Tested the first RC of 2.19.1 to confirm if the issue is resolved. LGTM! . Find the RC details here for testing.
Adding @krisfreedain @nateynateynate @kolchfa-aws that 2.19.1 is coming next week.
I’m not sure if its possible with the current tests in the repository-s3 module, but ISM has interesting test cleanup logic that checks for running threads and I have seen it catch issues like this in the past.
yeap I double-confirm, everything seems happy without
repository-s3.@reta Yes
faced exactly the same just after the upgrade (running on AlmaLinux9 and installing using the RPM)