Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » Executor has been shut down - help welcome(EGit, Apache Mina SSH, Executors)
Executor has been shut down - help welcome [message #1864044] Wed, 13 March 2024 05:43 Go to next message
Eclipse UserFriend
Hello,

in an eclipse-plugin I have to retrieve information from the remote-repository of a cloned-repository.
The clone is done via SSH, EGit (6.8) using Apache Mina Sshd-library.

For every selected java-project following code is run in its own thread:

final Repository r = repostoryMapping.getRepository();
try (final Git g = Git.wrap(r);) {
g.lsRemote().setHeads(true).setTags(true).call();
// ... and more ...
}

For more than one project this results in a lot of 'Executor has been shut down'-exceptions (almost a 1:1-relation to remote-call-per-project):

Exception in thread "Thread-2025" java.lang.IllegalStateException: Executor has been shut down
at org.apache.sshd.common.util.ValidateUtils.createFormattedException(ValidateUtils.java:213)
at org.apache.sshd.common.util.ValidateUtils.throwIllegalStateException(ValidateUtils.java:207)
at org.apache.sshd.common.util.ValidateUtils.checkState(ValidateUtils.java:184)
at org.apache.sshd.common.util.threads.NoCloseExecutor.execute(NoCloseExecutor.java:100)
at java.base/sun.nio.ch.AsynchronousChannelGroupImpl.executeOnPooledThread(AsynchronousChannelGroupImpl.java:190)
at java.base/sun.nio.ch.Invoker.invokeIndirectly(Invoker.java:215)
at java.base/sun.nio.ch.Invoker.invoke(Invoker.java:191)
at java.base/sun.nio.ch.Invoker.invoke(Invoker.java:300)
at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$ReadTask.failed(WindowsAsynchronousSocketChannelImpl.java:607)
at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:389)
at java.base/java.lang.Thread.run(Thread.java:840)

This makes debugging the pluging in eclipse almost impossible, as the debug-view get filled up with canceled threads
which have to be run to get finshed, which in turn fills up the console view.


Is there something I missed ? May I configure anything to prevent this ?

Thanks
Kurt
Re: Executor has been shut down - help welcome [message #1864089 is a reply to message #1864044] Thu, 14 March 2024 16:57 Go to previous messageGo to next message
Eclipse UserFriend
That sounds very much like https://github.com/apache/mina-sshd/issues/409 . Unfortunately I see no solution for this JDK bug. The JDK bug appears to have gone stale without a fix.
Re: Executor has been shut down - help welcome [message #1864519 is a reply to message #1864089] Thu, 21 March 2024 03:56 Go to previous message
Eclipse UserFriend
Thanks for the information.

Indeed I don't see that exception on Linux, Windows only.
Sadly my developmentenvironment is under Windows and that complicates debugging a lot as soon as egit/ssh + threads is involved.
Previous Topic:[Solved] Synchronization error for project
Next Topic:All branches say # WARNING after merge
Goto Forum:
  


Current Time: Tue May 13 00:57:04 EDT 2025

Powered by FUDForum. Page generated in 0.07645 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top