Search code examples
windowsx86db2odbcamd-processor

DB2 ODBC connection hangs


I've installed DB2 11.5.7 (and 11.5.8) on my Windows 10. I've created SAMPLE DB (using db2sampl).
When I'm trying to connect to this DB through ODBC it hangs on connection stage (I have to kill process).
It doesn't matter either connection establishing from my x86 application (C++) or from ODBC Data Source Administrator (32-bit).

Screenshot

  • On screenshot above I just pressed button "connect".
  • ODBC Data Source Administrator becomes Not Responding and fully utilize 1-2 CPU cores
  • It happens not each time, but it hangs in 98% attempts. Sometimes I'm lucky, but it's enough to relaunch ODBC Data Source Administrator (32-bit) and connection hangs again.

If I launch ODBC Data Source Administrator (64-bit) - connection always success.

Some additional info of my machine:

On all other machines which I tested no any similar problems.

What I tried:

  • Input correct and wrong user's password - hangs in both cases
  • Perform it on Windows 11 - connect hangs
  • Perform it on Windows 10 - connect hangs
  • Perform it under Virtual Machine (VMWare) with guest Windows 10 - connect hangs
  • Connect to remote DB2 Server - connect hangs too
  • Connect to this machine from another - another machine connects successfully
  • Tried DB2 versions: 11.5.7 and 11.5.8 - on both connect hangs
  • ODBC Data Source Administrator (64-bit) - connects successfully

I expect success connection from ODBC 32-bit.


Solution

  • Finally found fix myself :)

    Accordingly to call stack from my C++ app and to process happened catched by ProcMon I was almost confident that hang happens inside icclib (it's by stack) and it's is a part of GSKIT.

    So I decided to search in google about some hang problem related to GSK8 and voila I find this IBM reported issue:

    IJ44774: GSKIT ISSUE WITH AMD EPYC FAMILY 25 PROCESSORS

    Error description

    Commands like mmcrcluster or mmaddnode may hang in GSKIT
    layer on AMD EPYC family 25 processors.  A particular model
    from family 25 that is known to hang in GSKIT layer is
    AMD EPYC 7343.
    

    Local fix

    Add "ICC_SHIFT=3" line in
    /usr/lpp/mmfs/lib/gsk8/Cicc/icclib/ICCSIG.txt
    file on problem nodes.
    

    ...

    Symptom:

    Admin commands hangs
    

    Platforms affected:

    Linux OS environments
    

    Functional Area affected:

    Admin Commands, gskit
    
    • it's describes fix for Linux, But! in my case it's a Windows!

    Path to ICCSIG.txt on Windows:

    C:\Program Files (x86)\ibm\gsk8\lib\C\icc\icclib\ICCSIG.txt
    
    • I've just added ICC_SHIFT=3 at the end of that file and that's it!