Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-463

.NET application crash using ODBC (x32)

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 3.2.5
    • None
    • None
    • None
    • Windows/Linux

    Description

      My application is a service (Windows/Linux) that works intensively with a database. It is 32-bit, due to interface requirements with other applications.

      When using the latest driver, I encountered freezes and subsequent crashes. Analysis of the dump showed that MariaDB ODBC is the cause.

      At the same time, the crash itself does not happen immediately. It can take several hours or even days.

      The situation is similar under Linux, at least according to the messages. I cannot get a dump of the crashed application under Linux yet.

      Log message:

      Faulting application name: xxx.exe, version: 5.0.9251.18303, time stamp: 0x6811ccd2
      Faulting module name: maodbc.dll, version: 3.2.5.0, time stamp: 0x67af243f
      Exception code: 0xc0000409
      Fault offset: 0x00150041
      Faulting process id: 0x1ba4
      Faulting application start time: 0x01dbbd6ab74ec310
      Faulting module path: C:\Program Files (x86)\MariaDB\MariaDB ODBC Driver\maodbc.dll
      

      Dump analysis:

      In xxx.dmp the assembly instruction at maodbc!SQLCancel+14381d in C:\Program Files (x86)\MariaDB\MariaDB ODBC Driver\maodbc.dll from MariaDB Corporation AB has caused an unknown exception (0xc0000409) on thread 9
      

      Thread 9 - System ID 6104
       
      Entry point   mscorwks!Thread::intermediateThreadProc 
      Create time   04.05.2025 12:05:24 
      Time spent in user mode   0 Days 00:06:46.343 
      Time spent in kernel mode   0 Days 00:00:16.546 
       
       
      This thread is waiting on data to be returned from the database server
       
      The thread has evidence of .net exceptions on the stack. Check the Previous .NET Exceptions Report (Exceptions in all .NET Thread Stacks) to view more details of the associated exception  
       
      Full Call Stack
       
      [0x694a0041] maodbc!SQLCancel+14381d    
      [0x694578b1] maodbc!SQLCancel+fb08d    
      [0x69457d27] maodbc!SQLCancel+fb503    
      [0x69450e82] maodbc!SQLCancel+f465e    
      [0x776e3612] ntdll!ExecuteHandler2+26    
      [0x776e35e4] ntdll!ExecuteHandler+24    
      [0x776d115f] ntdll!KiUserExceptionDispatcher+f    
      [0x7752d702] KERNELBASE!RaiseException+62    
      [0x69451772] maodbc!SQLCancel+f4f4e    
      [0x693df103] maodbc!SQLCancel+828df    
      [0x693ce34b] maodbc!SQLCancel+71b27    
      [0x693ce3ab] maodbc!SQLCancel+71b87    
      [0x693c9d88] maodbc!SQLCancel+6d564    
      [0x693cae0b] maodbc!SQLCancel+6e5e7    
      [0x6939c8a6] maodbc!SQLCancel+40082    
      [0x693a34b2] maodbc!SQLCancel+46c8e    
      [0x693842fd] maodbc!SQLCancel+27ad9    
      [0x6937d9a5] maodbc!SQLCancel+21181    
      [0x696026e7] odbc32!FreeStmt+2e8    
      [0x695ba13b] odbc32!SQLFreeHandle+aeab    
      [0x00b4ae21] 0x00b4ae21    
      [0x6d4d68db] System_Data_ni!System.Data.Odbc.OdbcHandle.ReleaseHandle()    
      [0x6d4d68db] System_Data_ni!System.Data.Odbc.OdbcHandle.ReleaseHandle()    
      [0x73981b8c] mscorwks!CallDescrWorker+33    
      [0x73998819] mscorwks!CallDescrWorkerWithHandler+a3    
      [0x739b26f1] mscorwks!MethodDesc::CallDescr+19c    
      [0x739b2724] mscorwks!MethodDesc::CallTargetWorker+1f    
      [0x739b2e0c] mscorwks!MethodDescCallSite::CallWithValueTypes_RetOleColor+1c    
      [0x739f7b5a] mscorwks!SafeHandle::RunReleaseMethod+89    
      [0x739f7b8e] mscorwks!SafeHandle::Release+11b    
      [0x739f7a24] mscorwks!SafeHandle::Dispose+23    
      [0x739f7c39] mscorwks!SafeHandle::DisposeNative+bf    
      [0x71243056] mscorlib_ni!System.Runtime.InteropServices.SafeHandle.Dispose(Boolean)    
      [0x7124302d] mscorlib_ni!System.Runtime.InteropServices.SafeHandle.Dispose()    
      [0x6d4d2ea5] System_Data_ni!System.Data.Odbc.CMDWrapper.DisposeStatementHandle()    
      [0x6d4d2e3e] System_Data_ni!System.Data.Odbc.CMDWrapper.Dispose()    
      [0x6d4ce7d2] System_Data_ni!System.Data.Odbc.OdbcCommand.CloseCommandWrapper()    
      [0x6d4ce789] System_Data_ni!System.Data.Odbc.OdbcCommand.CloseFromConnection()    
      [0x6d4e56ac] System_Data_ni!System.Data.Odbc.OdbcReferenceCollection.NotifyItem(Int32, Int32, System.Object)    
      [0x6d12cf01] System_Data_ni!System.Data.ProviderBase.DbReferenceCollection.Notify(Int32)    
      [0x6d12cf01] System_Data_ni!System.Data.ProviderBase.DbReferenceCollection.Notify(Int32)    
      [0x6d4db2ac] System_Data_ni!System.Data.ProviderBase.DbConnectionInternal.NotifyWeakReference(Int32)    
      [0x6d4ddb23] System_Data_ni!System.Data.Odbc.OdbcConnectionOpen.Deactivate()    
      [0x6d12ca3a] System_Data_ni!System.Data.ProviderBase.DbConnectionInternal.CloseConnection(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionFactory)    
      [0x6d4d032a] System_Data_ni!System.Data.Odbc.OdbcConnection.Close()    
      [0x6d4d032a] System_Data_ni!System.Data.Odbc.OdbcConnection.Close()    
      [0x6d5ea37a] System_Data_ni!System.Data.Odbc.OdbcConnection.ConnectionIsAlive(System.Exception)    
      [0x6d4cf453] System_Data_ni!System.Data.Odbc.OdbcConnection.HandleErrorNoThrow(System.Data.Odbc.OdbcHandle, RetCode)    
      [0x6d4cf396] System_Data_ni!System.Data.Odbc.OdbcConnection.HandleError(System.Data.Odbc.OdbcHandle, RetCode)    
      [0x6d4cf396] System_Data_ni!System.Data.Odbc.OdbcConnection.HandleError(System.Data.Odbc.OdbcHandle, RetCode)    
      [0x6d4ce038] System_Data_ni!System.Data.Odbc.OdbcCommand.ExecuteReaderObject(System.Data.CommandBehavior, System.String, Boolean, System.Object[], SQL_API)    
      [0x6d4ce566] System_Data_ni!System.Data.Odbc.OdbcCommand.ExecuteReaderObject(System.Data.CommandBehavior, System.String, Boolean)    
      [0x6d4ce566] System_Data_ni!System.Data.Odbc.OdbcCommand.ExecuteReaderObject(System.Data.CommandBehavior, System.String, Boolean)    
      [0x6d4ce689] System_Data_ni!System.Data.Odbc.OdbcCommand.ExecuteNonQuery()    
      [0x6d4ce689] System_Data_ni!System.Data.Odbc.OdbcCommand.ExecuteNonQuery() 
      

      Previous .NET Exceptions Report (Exceptions in all .NET Thread Stacks)
      8 System.Data.Odbc.OdbcException    ERROR [08S01] [ma-3.2.5][5.5.68-MariaDB]Lost connection to server during query     Remote Stack Trace not available  
      9 System.Data.Odbc.OdbcException    ERROR [08S01] [ma-3.2.5][5.5.68-MariaDB]Lost connection to server during query     Remote Stack Trace not available  
      

      Basically, the crash itself occurs because the thread in which the native code is executed blocks the .NET garbage collector. So it is most likely a freeze problem.

      ODBC parameters are all default.

      Attachments

        Activity

          People

            Lawrin Lawrin Novitsky
            S.S.V. Stepanov S.V.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.