Package: libodbc1
Version: 2.3.4
Severity: critical
Tags: patch upstream
Justification: causes serious data loss

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

     Using unixodbc + freetds as a backend to pyodbc with MS-SQL server under
     high load (many processes and threads using libodbc1 simultaneously).

     The file /etc/odbc.ini get randomly truncated, losing all connection data
     and rendering all programs using unixodbc useless until we restore
odbc.ini
     from a backup.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

     No triggering action by the user or programs was found. The file is
truncated
     seemingly at random. Many hours of high load may pass without problems.
Under
     low load, the problem was never found.

   * What was the outcome of this action?

     Does not apply here.

   * What outcome did you expect instead?

     Would be fine if the file odbc.ini would just stay put.

   * Countermeasure we tried

     A watchdog program was installed which notices the truncation and replaces
the
     file. Also, auditd was installed to track changes to odbc.ini, which
confirmed
     libodbc1 as the culprit.

     This alleviates the situation, but does not solve the problem. During the
short
     time until the watchdog notices the destruction, the other clients are
still
     unusable.



-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
--- unixodbc-2.3.4.orig/odbcinst/_odbcinst_SystemINI.c
+++ unixodbc-2.3.4/odbcinst/_odbcinst_SystemINI.c
@@ -176,11 +176,13 @@
                else
         {
             /* does not exist so try creating it */
-            hFile = uo_fopen( pszFileName, "w" );
-            if ( hFile )
-                uo_fclose( hFile );
-            else
-                return FALSE;
+            // hFile = uo_fopen( pszFileName, "w" );
+            // if ( hFile )
+            //     uo_fclose( hFile );
+            // else
+            //     return FALSE;
+            /* Does not exist. Do nothing. */
+            return FALSE;
         }
        }
 

Reply via email to