Skip to content

When connecting with encrypt=true method, the Connection.abort(Executor) method does not work correctly #2288

@FischerRo2

Description

@FischerRo2

Driver version

Provide the JDBC driver version (e.g. 10.2.0).
12.4.1

SQL Server version

Microsoft SQL Server 2017 (RTM-CU31-GDR) (KB5021126) - 14.0.3460.9 (X64) Jan 25 2023 08:42:43 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2012 R2 Datacenter 6.3 (Build 9600: ) (Hypervisor)

Client Operating System

Windows 10

JAVA/JVM version

11.0.13+8

Problem description

if using Connections with encrypt=true it ist not possible to break an running Call () to the Database with the jdbc Connection Method
This is the stack trace of the hanging connection, which cannot be aborted using the abort(executor) method from the other thread
grafik
In my test I using die command "waitfor DELAY '00:10:00' to simulate a bad long running SQL.

The Problem is that with enabled ssl encryption the method "final void close()" in the class TDSChannel is calling disableSSL():

        if (null != sslSocket)
            disableSSL();

and this Method is using the same java lock witch is using in the method ProxyInputStream.readInternal(...).

Expected behavior

The corresponding socket is closed and the hanging thread aborts with a SQLException

Actual behavior

The on DB call hanging Thread can not abort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Closed Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions