Heap Corruption Crash on x64 Redshift Driver 2.0.0.6 when accessing Spectrum table

0

Having an issue with the latest Redshift x64 version 2.0.0.6 on Windows 10 Issue does not occur on 2.0.0.5 or earlier. Process hard crashes with the following in the event log:

Faulting application name: RedshiftOdbc2.exe, version: 1.0.0.0, time stamp: 0x8008141b Faulting module name: ntdll.dll, version: 10.0.19041.3086, time stamp: 0x6349a4f2 Exception code: 0xc0000374 Fault offset: 0x00000000000ff4c9 Faulting process id: 0x734c Faulting application start time: 0x01d99eed79c1b853 Faulting application path: C:\Users\xxxx\source\repos\RedshiftOdbc2\RedshiftOdbc2\bin\Debug\RedshiftOdbc2.exe Faulting module path: C:\Windows\SYSTEM32\ntdll.dll Report Id: be26831d-f25f-47ba-a6f2-2ee8b6ebaed1 Faulting package full name: Faulting package-relative application ID:

The following code reliably reproduces the issue (not sure if the table definition is important, but can provide that). Issue occurs on both legacy .Net 4.8 and .Net 7.0 frameworks The code will complete 1-3 iterations of the loop and then crash:

using System; using System.Collections.Generic; using System.Data; using System.Data.Common; using System.Linq; using System.Data.Odbc; using System.Net; namespace RedshiftOdbc { internal class Program { static void Main(string[] args) { OdbcConnectionStringBuilder ocsb = new OdbcConnectionStringBuilder() { //Driver = "{Amazon Redshift (x64)}" // 1.x Driver = "{Amazon Redshift ODBC Driver (x64)}" // 2.x }; ocsb.Add("Database", "xxx"); ocsb.Add("Server", "xxx"); ocsb.Add("Port", 5439); ocsb.Add("UID", "xxx"); ocsb.Add("PWD", "xxx"); ocsb.Add("SingleRowMode", 1); ocsb.Add("KeepAlive", 1); ocsb.Add("KeepAliveCount", 5); ocsb.Add("KeepAliveTime", 200); ocsb.Add("KeepAliveInterval", 200); ocsb.Add("SSLMode", "require"); while (true) { DbConnection conn = OdbcFactory.Instance.CreateConnection(); conn.ConnectionString = ocsb.ToString(); conn.Open(); DbCommand comm = OdbcFactory.Instance.CreateCommand(); comm.CommandText = "select * from spectrum.my_table limit 1000"; comm.Connection = conn; var reader = comm.ExecuteReader(); DataTable schema = reader.GetSchemaTable(); int cols = schema.Rows.Count; int count = 0; while (reader.Read()) { object[] obj = new object[cols]; reader.GetValues(obj); count++; } comm.Dispose(); Console.WriteLine($"Read {count} rows"); } } } }

fedak
asked a year ago197 views
1 Answer
0

Hi, AWS service team do not monitor forums like re:Post to respond to issues. Here, you seem to have tangible details of an issue in the service. So, you should open a ticket with AWS Console: go to https://support.console.aws.amazon.com/support/home?region=us-west-2#/case/create (adapt to your own region)

profile pictureAWS
EXPERT
answered a year ago
  • I don't have a service plan that allows me to open tickets on my personal account. And I'm not in the organization that owns the AWS account that houses the Redshift clusters we are accessing (and I was hoping to avoid having to relay the issue through that group and L1 AWS support)

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions