oracle/oci-java-sdk

SDK will deadlock for no apparent reason.

e3ndr opened this issue · 8 comments

Hi there! There appears to be a deadlock in the Oracle SDK that causes it to hang indefinitely. Any and all requests will block forever. Nothing will break it out of this, and interrupting the thread doesn't fix the underlying issue. I have to fully kill the application and restart it.

There are no logs, and the only reproduction I have is to use the containerinstances SDK for a couple of days.

Here's my (abridged) dependency pom:

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.oracle.oci.sdk</groupId>
				<artifactId>oci-java-sdk-bom</artifactId>
				<version>3.39.0</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>com.oracle.oci.sdk</groupId>
			<artifactId>oci-java-sdk-common-httpclient-jersey</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.oracle.oci.sdk</groupId>
			<artifactId>oci-java-sdk-core</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.oracle.oci.sdk</groupId>
			<artifactId>oci-java-sdk-containerinstances</artifactId>
			<scope>compile</scope>
		</dependency>
	</dependencies>

I am able to avoid this issue by disabling the Apache Http Connector:

            .clientConfigurator(builder -> {
                builder.property(JerseyClientProperties.USE_APACHE_CONNECTOR, false);
            })

Hi, If you are using any OCI Java SDK version(s) >= 3.31.0 and <= 3.38.0 then you could see a thread leak in IdleConnectionMonitor. We recommend you to update to version 3.39.0 or later. More info here - #587

I am already using 3.39.0. I believe this is a separate issue from 587 :)