Global Data Management Forum

 View Only
  • 1.  .NET 6 NET.IBM.Data.DB2 access violation exception db2app64!cryptDecryptBuffer

    Posted Fri December 16, 2022 09:59 AM
    I am having trouble getting consistent behavior from the Net.IBM.Data.DB2 NuGet package in .NET 6. Given the same base configuration, some developers work fine while others throw this untrappable exception that crashes the process when attempting to open a connection(pulled from a crash dump):

    ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.
    
    EXCEPTION_CODE_STR:  c0000005
    
    EXCEPTION_PARAMETER1:  0000000000000000
    
    EXCEPTION_PARAMETER2:  ffffffffffffffff
    
    STACK_TEXT:  
    00000007`4d772f48 73776572`646e4144     : 00000000`00000000 00000000`00000000 00000000`00000004 00000007`4d773100 : db2app64!cryptDecryptBuffer+0x5279b
    Pulled from Windows Event Viewer:

    Faulting module name: db2app64.dll, version: 11.5.7000.1973, time stamp: 0x619ddc2d
    Exception code: 0xc0000005
    Fault offset: 0x0000000000dc8feb


    The behavior is not consistent between developer machines or even different user accounts on the same machine. The developer machine where I have been testing this is a Windows machine.

    The steps we go to prepare a machine to develop with the package are:

    1. Copy db2dsdriver.cfg with database catalog to developer machine
    2. Set environment variable DB2DSDRIVER_CFG_PATH environment variable to folder containing that file

    The package version in question is: Net.IBM.Data.Db2 6.0.0.300 pulled from nuget.org

    The database server in question does not seem to matter. We have both Z/OS and LUW DB2 and the behavior is the same.

    Can someone provide insight about what might be missing?

    Thanks in advance.



    ------------------------------
    Jim Thompson
    ------------------------------

    #DataManagementGlobal
    #DataServerDrivers


  • 2.  RE: .NET 6 NET.IBM.Data.DB2 access violation exception db2app64!cryptDecryptBuffer

    Posted 29 days ago

    Did you every figure out what the issue was, we are seeing a similar problem.

    Thank you!

    Charles Wilt



    ------------------------------
    Charles Wilt
    ------------------------------



  • 3.  RE: .NET 6 NET.IBM.Data.DB2 access violation exception db2app64!cryptDecryptBuffer

    Posted 21 days ago
    Edited by Jim Thompson 21 days ago

    There has not been a fix for this issue. We opened a support case that concluded in 2023. In our case, the issue seems to originate from the LUM module and is related to size allocated to the user token object. The only commitment we could get is it was being worked on in a new version with no committed fix date.

    For us, the only thing we could change to manipulate the token size was the number of Active Directory groups. By increasing or decreasing the number of groups we could work around it. We also have a DB2 Connect Gateway and by using the connect gateway instead of direct connect it bypasses whatever check causes this exception.

    * - I missed the 9.0.0.100 release of NET.IBM.Data.DB2 nuget package. It is bundled with the version 12.1 clidriver and appears to have the fix. The package only supports .NET 9, they did not back target it to .NET 8. 

    ------------------------------
    Jim Thompson
    ------------------------------