Bug 582279 - Git.lsRemoteRepository - Executor has been shut down
Summary: Git.lsRemoteRepository - Executor has been shut down
Status: NEW
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 6.6   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-08 05:47 EDT by kurt ablinger CLA
Modified: 2023-08-08 05:47 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kurt ablinger CLA 2023-08-08 05:47:09 EDT
Apache sshd prints out a stacktrace with above mentioned excpetion, but application seems still running normal.

This occurs in different constellations using JGit.

One big problem with this is, that for example searching logs for 'exception' will always be true. So we have to filter it out as far as possible.
That makes every configuration for build tools very complicated.
Or every search by hand one has to filter these messages out.

My current version of JGit is 6.6.0.

The simpliest code to reproduce is:

    System.setProperty("sun.security.jgss.native", "true");
    final Collection<Ref> c = Git.lsRemoteRepository() //
      .setRemote(REPO) //
      .call();
    System.out.printf("%s: %d%n", REPO, Integer.valueOf(c.size()));


Which then gives me following output:

ssh://hostname/repopathandname.git: Exception in thread "Thread-3" 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:833)
48


One strange behaviour I found:

Having a breakpoint in the constructor of org.apache.sshd.client.SshClient.SshClient and running that code in debug-mode in Eclipse does not reproduce the exception.
Running normally does.