Re: Most recent driver aborts transaction after one error - Mailing list pgsql-odbc

From Bart Samwel
Subject Re: Most recent driver aborts transaction after one error
Date
Msg-id 441BEA51.7070606@samwel.tk
Whole thread Raw
In response to Re: Most recent driver aborts transaction after one error  (Hiroshi Inoue <inoue@tpf.co.jp>)
Responses Re: Most recent driver aborts transaction after one error
List pgsql-odbc
Hiroshi Inoue wrote:
> Bart Samwel wrote:
>>
>> 2. I also encountered an access violation while exiting. The call
>> stack was not very informative:
>>
>>      ntdll.dll!_RtlpWaitForCriticalSection@4()  + 0x5b
>> ntdll.dll!_RtlEnterCriticalSection@4()  + 0x46
>> psqlodbc35w.dll!023a097e()         ntdll.dll!_RtlpFreeDebugInfo@4()  +
>> 0x57        ntdll.dll!_RtlDeleteCriticalSection@4()  + 0x78
>> If you want me to try this with a debug-compiled psqlodbc35w, just say
>> the word!
>
>
> It looks like a thread is about to Free a Handle while another thread is
> wating for the Handle.
> OK please send me the mylog output.

I've attached two mylogs: in the first, I ordered my debugger to
continue after the access violation, in the second, I immediately killed
the program at the point of the access violation. If you need more info,
let me know.

Cheers,
Bart
[2412]globals.extra_systable_prefixes = 'dd_;'
[2412][[SQLAllocHandle]][2412]**** in PGAPI_AllocEnv **
[2412]** exit PGAPI_AllocEnv: phenv = 23f4dc8 **
[2412][[SQLSetEnvAttr]] att=200,2
[2412][[SQLAllocHandle]][2412]PGAPI_AllocConnect: entering...
[2412]**** PGAPI_AllocConnect: henv = 23f4dc8, conn = 23f4e08
[2412]EN_add_connection: self = 23f4dc8, conn = 23f4e08
[2412]       added at i =0, conn->henv = 23f4dc8, conns[i]->henv = 23f4dc8
[2412][SQLGetInfoW(30)][2412]PGAPI_GetInfo: entering...fInfoType=77
[2412]PGAPI_GetInfo: p='03.51', len=0, value=0, cbMax=12
[2412][SQLSetConnectAttrW][2412]PGAPI_SetConnectAttr 115 1
[2412]the application is ansi
[2412][SQLSetConnectAttrW][2412]PGAPI_SetConnectAttr 103 f
[2412]PGAPI_SetConnectOption: entering fOption = 103 vParam = 15
[2412][SQLDriverConnectW][2412]PGAPI_DriverConnect: entering...
[2412]**** PGAPI_DriverConnect: fDriverCompletion=0, connStrIn='DSN=postgres;UID=kdba;PWD=xxxxxxxx;'
[2412]our_connect_string = 'DSN=postgres;UID=kdba;PWD=xxxxxxxx;'
[2412]attribute = 'DSN', value = 'postgres'
[2412]copyAttributes:
DSN='postgres',server='',dbase='',user='',passwd='xxxxx',port='',onlyread='',protocol='',conn_settings='',disallow_premature=-1)
[2412]attribute = 'UID', value = 'kdba'
[2412]copyAttributes:
DSN='postgres',server='',dbase='',user='kdba',passwd='xxxxx',port='',onlyread='',protocol='',conn_settings='',disallow_premature=-1)
[2412]attribute = 'PWD', value = 'xxxxx'
[2412]copyAttributes:
DSN='postgres',server='',dbase='',user='kdba',passwd='xxxxx',port='',onlyread='',protocol='',conn_settings='',disallow_premature=-1)
[2412]getDSNinfo: DSN=postgres overwrite=0
[2412]globals.extra_systable_prefixes = 'dd_;'
[2412]rollback_on_error=2
[2412]globals.extra_systable_prefixes = 'dd_;'
[2412]our_connect_string = 'DSN=postgres;UID=kdba;PWD=xxxxxxxx;'
[2412]attribute = 'DSN', value = 'postgres'
[2412]CopyCommonAttributes:
A7=100;A8=4096;A9=0;B0=254;B1=8190;B2=0;B3=0;B4=1;B5=1;B6=0;B7=1;B8=0;B9=1;C0=0;C1=0;C2=dd_;[2412]attribute= 'UID',
value= 'kdba' 
[2412]CopyCommonAttributes:
A7=100;A8=4096;A9=0;B0=254;B1=8190;B2=0;B3=0;B4=1;B5=1;B6=0;B7=1;B8=0;B9=1;C0=0;C1=0;C2=dd_;[2412]attribute= 'PWD',
value= 'xxxxx' 
[2412]CopyCommonAttributes:
A7=100;A8=4096;A9=0;B0=254;B1=8190;B2=0;B3=0;B4=1;B5=1;B6=0;B7=1;B8=0;B9=1;C0=0;C1=0;C2=dd_;[2412]PGAPI_Disconnect:
aboutto CC_cleanup 
[2412]in CC_Cleanup, self=23f4e08
[2412]after CC_abort
[2412]SOCK_Destructor
[2412]after SOCK destructor
[2412]exit CC_Cleanup
[2412]PGAPI_Disconnect: done CC_cleanup
[2412]PGAPI_Disconnect: returning...
[2412][[SQLFreeHandle]][2412]PGAPI_FreeConnect: entering...
[2412]**** in PGAPI_FreeConnect: hdbc=23f4e08
[2412]enter CC_Destructor, self=23f4e08
[2412]in CC_Cleanup, self=23f4e08
[2412]after SOCK destructor
[2412]exit CC_Cleanup
[2412]after CC_Cleanup
[2412]after free statement holders
[2412]exit CC_Destructor
[2412]PGAPI_FreeConnect: returning...
[2412][[SQLFreeHandle]][2412]**** in PGAPI_FreeEnv: env = 23f4dc8 **
[2412]in EN_Destructor, self=23f4dc8
[2412]exit EN_Destructor: rv = 1
[2412]   ok
[3692]globals.extra_systable_prefixes = 'dd_;'
[3692][[SQLAllocHandle]][3692]**** in PGAPI_AllocEnv **
[3692]** exit PGAPI_AllocEnv: phenv = 23f4dc8 **
[3692][[SQLSetEnvAttr]] att=200,2
[3692][[SQLAllocHandle]][3692]PGAPI_AllocConnect: entering...
[3692]**** PGAPI_AllocConnect: henv = 23f4dc8, conn = 23f4e08
[3692]EN_add_connection: self = 23f4dc8, conn = 23f4e08
[3692]       added at i =0, conn->henv = 23f4dc8, conns[i]->henv = 23f4dc8
[3692][SQLGetInfoW(30)][3692]PGAPI_GetInfo: entering...fInfoType=77
[3692]PGAPI_GetInfo: p='03.51', len=0, value=0, cbMax=12
[3692][SQLSetConnectAttrW][3692]PGAPI_SetConnectAttr 115 1
[3692]the application is ansi
[3692][SQLSetConnectAttrW][3692]PGAPI_SetConnectAttr 103 f
[3692]PGAPI_SetConnectOption: entering fOption = 103 vParam = 15
[3692][SQLDriverConnectW][3692]PGAPI_DriverConnect: entering...
[3692]**** PGAPI_DriverConnect: fDriverCompletion=0, connStrIn='DSN=postgres;UID=kdba;PWD=xxxxxxxx;'
[3692]our_connect_string = 'DSN=postgres;UID=kdba;PWD=xxxxxxxx;'
[3692]attribute = 'DSN', value = 'postgres'
[3692]copyAttributes:
DSN='postgres',server='',dbase='',user='',passwd='xxxxx',port='',onlyread='',protocol='',conn_settings='',disallow_premature=-1)
[3692]attribute = 'UID', value = 'kdba'
[3692]copyAttributes:
DSN='postgres',server='',dbase='',user='kdba',passwd='xxxxx',port='',onlyread='',protocol='',conn_settings='',disallow_premature=-1)
[3692]attribute = 'PWD', value = 'xxxxx'
[3692]copyAttributes:
DSN='postgres',server='',dbase='',user='kdba',passwd='xxxxx',port='',onlyread='',protocol='',conn_settings='',disallow_premature=-1)
[3692]getDSNinfo: DSN=postgres overwrite=0
[3692]globals.extra_systable_prefixes = 'dd_;'
[3692]rollback_on_error=2
[3692]globals.extra_systable_prefixes = 'dd_;'
[3692]our_connect_string = 'DSN=postgres;UID=kdba;PWD=xxxxxxxx;'
[3692]attribute = 'DSN', value = 'postgres'
[3692]CopyCommonAttributes:
A7=100;A8=4096;A9=0;B0=254;B1=8190;B2=0;B3=0;B4=1;B5=1;B6=0;B7=1;B8=0;B9=1;C0=0;C1=0;C2=dd_;[3692]attribute= 'UID',
value= 'kdba' 
[3692]CopyCommonAttributes:
A7=100;A8=4096;A9=0;B0=254;B1=8190;B2=0;B3=0;B4=1;B5=1;B6=0;B7=1;B8=0;B9=1;C0=0;C1=0;C2=dd_;[3692]attribute= 'PWD',
value= 'xxxxx' 
[3692]CopyCommonAttributes:
A7=100;A8=4096;A9=0;B0=254;B1=8190;B2=0;B3=0;B4=1;B5=1;B6=0;B7=1;B8=0;B9=1;C0=0;C1=0;C2=dd_;[3692]PGAPI_Disconnect:
aboutto CC_cleanup 
[3692]in CC_Cleanup, self=23f4e08
[3692]after CC_abort
[3692]SOCK_Destructor
[3692]after SOCK destructor
[3692]exit CC_Cleanup
[3692]PGAPI_Disconnect: done CC_cleanup
[3692]PGAPI_Disconnect: returning...
[3692][[SQLFreeHandle]][3692]PGAPI_FreeConnect: entering...
[3692]**** in PGAPI_FreeConnect: hdbc=23f4e08
[3692]enter CC_Destructor, self=23f4e08
[3692]in CC_Cleanup, self=23f4e08
[3692]after SOCK destructor
[3692]exit CC_Cleanup
[3692]after CC_Cleanup
[3692]after free statement holders
[3692]exit CC_Destructor
[3692]PGAPI_FreeConnect: returning...
[3692][[SQLFreeHandle]][3692]**** in PGAPI_FreeEnv: env = 23f4dc8 **
[3692]in EN_Destructor, self=23f4dc8
[3692]exit EN_Destructor: rv = 1
[3692]   ok

pgsql-odbc by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: Most recent driver aborts transaction after one error
Next
From: "pragadheeswaran gopalakrishnan"
Date:
Subject: How To Connect PostgreSQL thru VB without DSN