Java/JDBC application crashes on assertion failure when using Windows integrated security
See original GitHub issueDriver version
7.4.1, 8.4.1
SQL Server version
Azure SQL Managed Instance
Client Operating System
Windows Server 2016 amd64 10.0
JAVA/JVM version
Oracle Corporation version 1.8.0_131 64-bit
Problem description
Java application randomly crashes with assertion error when accessing Azure SQL Managed Instance using integrated authentication. The assertion error happens inside sqljdbc_auth.dll
(for driver version 7.4.1). When upgrading the JDBC driver and DLL, the same assertion failure is shown for mssql-jdbc_auth-8.4.1.x64.dll
.
The issue happens randomly, typically several times a day. It may depend on total volume of connections/queries being executed.
-
Expected behaviour: No assertion failures.
-
Actual behaviour: Assertion failure popup when running as command-line. Application crashes when running as Windows service.
-
Error message/stack trace: No errors are reported from JDBC driver and no errors in log files.
Here is a screenshot of assertion popups:
- Any other details that can be helpful:
We are using 64-bit Java 1.8 and SQL Server JDBC driver.
Client application is basically a multithreaded web server, each thread running SQL Server queries using JDBC driver. A new connection is opened for every query being run.
We are using Windows integrated security with Authentication=ActiveDirectoryIntegrated
setting. The application is connecting to Azure SQL Server Managed Instance in a federated environment. There are no issues when connecting to on-prem SQL Server.
JDBC trace logs
We are trying to get more information on this assertion: https://github.com/microsoft/mssql-jdbc/issues/1429
Reproduction code
It’s not easy to reproduce in a test application due to sporadic nature of this failure.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
hi @lilgreenbird I can confirm we had no crashes for more than a week with the driver build that you’ve provided.
We want to take this into production, because production system also suffers from the issue. If this fix works, can it be published as part of official release, to be considered “production-ready”?
#1441 merged.