Db2

 View Only
Expand all | Collapse all

CREATE DATABASE hangs when vm runs on one hypervisor

  • 1.  CREATE DATABASE hangs when vm runs on one hypervisor

    Posted Mon October 30, 2023 03:50 PM

    Hello,

    I face a very strange issues, running DB2 11.5.8.0 on Debian Buster virtualized with Proxmox.

    We have several hypervisors, several of them are AMD EPYC 7371 based and when I CREATE DATABASE on a virtual machine running on one of these everything runs smoothly.

    A new AMD EPYC 7343 hypervisor is now available, and when I migrate the exact same virtual machine on it, "CREATE DATABASE"  hangs with two db2sysc hitting 100%. In db2diag, nothing happens after "DB2SPCAT Views recreated", while the next step on the other hypervisors is "FUNCTION: DB2 Common, Cryptography, cryptContextRealInit, probe:2716".

    I checked the AESNI with openssl and it works fine in both contexts.

    I also tried to limit the CPU flags to the very basic set without more success.

    CREATE DATABASE is not only symptom but as it is can easily be reproduced I use it for debugging.

    I'm a bit lost here with the next steps for debugging, any help would be greatly appreciated.

    Thank you

    Patrick



    ------------------------------
    Patrick Ambuhl
    ------------------------------


  • 2.  RE: CREATE DATABASE hangs when vm runs on one hypervisor

    Posted Tue October 31, 2023 03:19 AM

    You may want to review the system requirements for running Db2. IBM provides a list of supported distributions and hypervisors. While you may be able to run in other environments, you may run in to strange issues like what you're seeing.


    Here is the report for Db2 11.5.8 Standard Edition on Linux:

    (http://www.ibm.com/software/reports/compatibility/clarity-reports/report/html/softwareReqsForProduct?deliverableId=8C80C510B6C311ECBDA1ED9610150DDC&osPlatforms=Linux&duComponentIds=S007%7CS006%7CS004%7CS005%7CS008%7CA002%7CA003%7CA001&mandatoryCapIds=183%7C25&optionalCapIds=47%7C17%7C1%7C131%7C35%7C20%7C28)



    ------------------------------
    Ian Bjorhovde
    XTIVIA
    ------------------------------



  • 3.  RE: CREATE DATABASE hangs when vm runs on one hypervisor

    Posted Wed November 01, 2023 08:23 AM

    Hi!

    As Ian stated - if you consider "production level" Db2 installation - you are strongly advised to follow and adhere to system requirements for running Db2.

    For my personal amusement I set up Debian (Debian 12) installation in Oracle Virtual Box VM and I installed Db2 V11.5.8.
    One of the red lights should grab your attention was message from db2prereqcheck:



    However - if you know Db2 prerequisites and how to address them - you may complete installation:


    As you can see - SAMPLE database was created and is accessible.

    I would suspect your virtualizer as guilty party.

    I would not run production workload on my Debian distribution in Virtual Box though.



    ------------------------------
    Jan Nelken
    ------------------------------



  • 4.  RE: CREATE DATABASE hangs when vm runs on one hypervisor

    Posted Wed November 01, 2023 10:48 AM

    Hello,

    Thanks for your answers, we tried with Ubuntu 20 on the same hypervisor and did not face the issue.

    I will follow your advice and switch to a supported OS.

    Thank a lot for your replies.

    Patrick



    ------------------------------
    Patrick Ambuhl
    ------------------------------



  • 5.  RE: CREATE DATABASE hangs when vm runs on one hypervisor

    Posted Wed November 01, 2023 10:57 AM

    I would strongly advise to switch to Supported OS (for example Ubuntu 2204 - which is LTS) under Supported virtualiser ...



    ------------------------------
    Jan Nelken
    ------------------------------



  • 6.  RE: CREATE DATABASE hangs when vm runs on one hypervisor

    Posted Wed August 28, 2024 01:58 AM

    Did anyone figure yout why this is happening?

    If have the same issue with DB2 11.5.9 on bare metal tested under ubuntu 20.04, 22.04, 24.04.

    It is successful in 4 / 10 test run, but fails in 6 / 10 test runs.

    We are now completly puzzled how to proceed.



    ------------------------------
    Nikolai Stein
    General Manager
    REQUISIS GmbH
    Berlin
    +49-30-536506-711
    ------------------------------



  • 7.  RE: CREATE DATABASE hangs when vm runs on one hypervisor

    Posted Wed August 28, 2024 04:27 AM

    What is the CPU on the bare metal box(es) that experience the Db2 hangs?

    If the CPU is from AMD EPYC family, study this document https://www.ibm.com/support/pages/db2-may-hang-while-processing-encryption-related-functions-ibm-gskit-library-some-amd-epyc-processor

    If the CPU is not from AMD, you might want to upgrade the GSKIT anyway (the latest build might not be incorporated in your specific fixlevel of 11.5.9)  , and then retry, contact IBM support for details.



    ------------------------------
    Mike O'Reilly
    ------------------------------



  • 8.  RE: CREATE DATABASE hangs when vm runs on one hypervisor

    Posted Wed August 28, 2024 08:40 AM
    Edited by Nikolai Stein Wed August 28, 2024 08:41 AM

    Yes it is an AMD EPYC CPU:

    vendor_id       : AuthenticAMD
    cpu family      : 23
    model           : 49
    model name      : AMD EPYC 7F72 24-Core Processor
    stepping        : 0

    The tests are still running, but it looks like that adding ICC_SHIFT=3 helped by executing

    echo ICC_SHIFT=3 >> /opt/ibm/db2/V11.5/lib64/gskit_db2/N/icc/icclib/ICCSIG.txt
    echo ICC_SHIFT=3 >> /opt/ibm/db2/V11.5/lib64/gskit_db2/C/icc/icclib/ICCSIG.txt

    Thank you for your support!

    BTW: With that change it also runs under KVM hypervisor and also under PROXMOX


    ------------------------------
    Nikolai Stein
    General Manager
    REQUISIS GmbH
    Berlin
    +49-30-536506-711
    ------------------------------



  • 9.  RE: CREATE DATABASE hangs when vm runs on one hypervisor

    Posted Mon September 02, 2024 05:07 AM

    I confirm that the ICC_SHIFT=3 works for us, we still have some tests to run but everything seems running well at the DBServer level. However we face a similar issue on client side servers with AMD EPYC CPUs  using the DB2 client, is there a setting like the ICC_SHIFT for the client stack (PHP8) in our case.

    Thanks a lot for the server solution !

    Patrick



    ------------------------------
    Patrick Ambuhl
    ------------------------------



  • 10.  RE: CREATE DATABASE hangs when vm runs on one hypervisor

    Posted Mon September 02, 2024 05:46 AM

    The workaround (of setting ICC_SHIFT=3 in the config files for GSKit) is applicable anywhere that the GSKit runs, and that includes on the Db2-clients as well as on Db2-servers .  The GsKit is the component that causes the hang on specific CPUs, and it is this component that the workaround targets, and GSKit libraries are supplied with many client and server products from IBM , it is pervasive.

    For example, if you are using php_ibm_db2 that is a wrapper for IBM's CLIDRIVER which includes the encryption algorithms of GSKit, although the directory paths will differ from those on the Db2-server. Just search the client filesystem for the two icclib directories, and adjust the ICCSIGN.TXT appropriately in both directories.

    However it is also possible to wait for IBM to re-issue a new build of clidriver that includes the updated GSKit that contains a code fix to solve the issue and in this case you do not then need to apply that specific workaround, although of course you will need to service (i.e. apply the fixed clidriver, or uninstall and re-install the php_ibm_db2 to get the latest clidriver downloaded from IBM automatically) your client environments. 

    It is wise to continually service clidriver in your estate anyway, to get the relevant security and stability fixes that arrive from time to time.



    ------------------------------
    Mike O'Reilly
    ------------------------------



  • 11.  RE: CREATE DATABASE hangs when vm runs on one hypervisor

    Posted Mon September 02, 2024 06:40 AM

    Thank you,

    It works ! My bad, I searched for ICCSIG.txt on the client machines but made a mistake and couldn't find it.

    Thank you again.



    ------------------------------
    Patrick Ambuhl
    ------------------------------