IBM / node-odbc

ODBC bindings for node
MIT License
146 stars 77 forks source link

*** buffer overflow detected ***: terminated while connecting to pool #314

Closed getforschin closed 1 year ago

getforschin commented 1 year ago

Just Creating Pool using Parameter , most of the time it is showing buffer overflow detected but once in a blue moon it will turn automatilcally right

odbc.pool(POOL_PARAMETER, (err, pool) => { if (err) { reject({ message: err.message, }); } // handle else { this.pool = pool; resolve(pool); } });

Log of Odbcinst.ini are

[ODBC][89335][1676462410.916998][__handles.c][460]
        Exit:[SQL_SUCCESS]
            Environment = 0x4e05da0
[ODBC][89335][1676462410.917050][SQLSetEnvAttr.c][189]
        Entry:
            Environment = 0x4e05da0
            Attribute = SQL_ATTR_ODBC_VERSION
            Value = 0x3
            StrLen = -5
[ODBC][89335][1676462410.917064][SQLSetEnvAttr.c][381]
        Exit:[SQL_SUCCESS]
[ODBC][89335][1676462411.651350][SQLAllocHandle.c][377]
        Entry:
            Handle Type = 2
            Input Handle = 0x4e05da0
        UNICODE Using encoding ASCII 'ANSI_X3.4-1968' and UNICODE 'UCS-2LE'

[ODBC][89335][1676462411.651403][SQLAllocHandle.c][513]
        Exit:[SQL_SUCCESS]
            Output Handle = 0x7fa178000d50
[ODBC][89335][1676462411.651426][SQLDriverConnect.c][748]
        Entry:
            Connection = 0x7fa178000d50
            Window Hdl = (nil)
            Str In = [DRIVER=/home/sachin/Documents/tibero6/client/lib/libtbodbc.so;SERVER=192.168.13.162;PORT=8629;DB=gmdss_db;UID=db_user;PWD=*********][length = 131 (SQL_NTS)]
            Str Out = 0x7fa18b7fc520
            Str Out Max = 2048
            Str Out Ptr = (nil)
            Completion = 0
        DIAG [08001]  Generic I/O error.

[ODBC][89335][1676462411.657017][SQLDriverConnect.c][1479]
        Exit:[SQL_ERROR]
[ODBC][89335][1676462411.657028][SQLGetDiagField.c][958]
        Entry:
            Connection = 0x7fa178000d50
            Rec Number = 0
            Diag Ident = 2
            Diag Info Ptr = 0x7fa18b7fdd1c
            Buffer Length = -6
            String Len Ptr = (nil)
[ODBC][89335][1676462411.657037][SQLGetDiagField.c][990]
        Exit:[SQL_SUCCESS]
[ODBC][89335][1676462411.657045][SQLGetDiagRec.c][677]
        Entry:
            Connection = 0x7fa178000d50
            Rec Number = 1
            SQLState = 0x7fa18b7fdd20
            Native = 0x7fa18b7fdd28
            Message Text = 0x7fa1780143a0
            Buffer Length = 2048
            Text Len Ptr = 0x7fa18b7fdd1a

I am using node 14.12.1 , "odbc": "^2.4.7", and tibero 6

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

markdirish commented 1 year ago

Hi @getforschin ,

What is the value of POOL_PARAMETER? And what is the exact error that is returned in Node.js? I see it is calling SQLGetDiagField and SQLGetDiagRec, but not sure what they are returning as text.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.