IBM Support

IT33045: POSSIBLE DEADLATCH IN SQLOMEMINIT() WHEN IT LOADS CLIENT-SIDE LIBRARY

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • Possible deadlatch in sqloMemInit() when it loads client-side
    library to execute trusted routine as shown in the following
    stack trace:
    
    Thread 197 (Thread 0x7f47473fe700 (LWP 21766)):
    #0  0x00007f4b8b84d53d in nanosleep () from
    /usr/lib64/libpthread.so.0
    #1  0x00007f4b7f262efc in ossLockGetConflict () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2osse.so.1
    #2  0x00007f47057fbf3d in sqloMemInit() () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #3  0x00007f47057fbe9f in sqloGetMemSet () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #4  0x00007f470579d672 in sqloopenp () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #5  0x00007f4705621fd8 in openLogFile(char*, PD_LOGFILE_HANDLE*,
    long*, int*, unsigned int*, char*, unsigned long,
    #6  0x00007f4705629084 in PDLogFacility::open
    #7  0x00007f470561c376 in pdLogInternal
    #8  0x00007f470561b67b in pdLog () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #9  0x00007f470633db40 in sqloGetEnvInternal () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #10 0x00007f470580d72c in sqlo_refresh_env () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #11 0x00007f470580e933 in sqloInstanceLocalDataPath () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #12 0x00007f470580e6d9 in sqloGetConfigPath () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #13 0x00007f470581f8b6 in EnvKeyName(char*, int, char const*,
    int)
    #14 0x00007f470581fdb3 in EnvPrfOpen(char const*, int,
    SEnvProfile**)
    #15 0x00007f470581ad39 in EnvRegGetProfile(SEnvRegistry*, char
    const*, int, SEnvProfile**)
    #16 0x00007f470633d6e2 in sqloGetEnvInternal () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #17 0x00007f47057f3722 in md_Initialize() () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #18 0x00007f47057fc14f in sqloimem() () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #19 0x00007f47057fbf1b in sqloMemInit() () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #20 0x00007f47057fd163 in sqlogmshr () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #21 0x00007f47057fcf0f in sqloGetPrivateSet () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #22 0x00007f47057fce8f in MemOssPool(SQLO_MEM_POOL**) () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #23 0x00007f47057f8ef0 in sqlogmblkEx () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #24 0x00007f47056c6e66 in
    sqleBeginTrustedCtxInternal(sql_app_ctx**, sql_static_data*)
    #25 0x00007f47056ffa25 in sqleUCtrustedRtnInit () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2.so.1
    #26 0x00007f4b82b92654 in sqleUCtrustedLvlInit(sql_static_data*,
    sqlrr_cb*, sqlri_ufob*)
    #27 0x00007f4b83d2612c in sqlriOneTimeInitRtn1Trusted(sqlrr_cb*,
    sqlri_ufob*, bool)
    #28 0x00007f4b83d24c63 in sqlriOneTimeInitRtn(sqlrr_cb*,
    sqlri_ufob*, bool)
    #29 0x00007f4b86a14466 in sqlriusf_common(sqlrr_cb*,
    sqlri_ufob*) () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2e.so.1
    #30 0x00007f4b8600c294 in sqlriusf(sqlrr_cb*) () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2e.so.1
    #31 0x00007f4b86a05df6 in sqlriSectInvoke(sqlrr_cb*,
    sqlri_opparm*)
    #32 0x00007f4b869e8f8a in
    sqlrr_process_execute_request(sqlrr_cb*, int, bool)
    #33 0x00007f4b869e635c in sqlrr_execute(db2UCinterface*,
    UCstpInfo*)
    #34 0x00007f4b86929936 in sqljs_ddm_excsqlstt(db2UCinterface*,
    sqljDDMObject*)
    #35 0x00007f4b86928ece in sqljsParseRdbAccessed(sqljsDrdaAsCb*,
    sqljDDMObject*, db2UCinterface*)
    #36 0x00007f4b82c5a1ec in sqljsParse(sqljsDrdaAsCb*,
    db2UCinterface*, sqeAgent*, bool)
    #37 0x00007f4b82c54779 in sqljsSqlam(db2UCinterface*, sqeAgent*,
    bool)
    #38 0x00007f4b82c52c8c in sqljsDriveRequests(sqeAgent*,
    db2UCconHandle*)
    #39 0x00007f4b82c4fce9 in
    sqljsDrdaAsInnerDriver(SQLCC_INITSTRUCT_T*, bool)
    #40 0x00007f4b82c4f8db in sqljsDrdaAsDriver(SQLCC_INITSTRUCT_T*)
    () from /home/appusers/db2m7r/sqllib/lib64/libdb2e.so.1
    #41 0x00007f4b82949a4f in sqeAgent::RunEDU() () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2e.so.1
    #42 0x00007f4b84188eb7 in sqzEDUObj::EDUDriver() () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2e.so.1
    #43 0x00007f4b8392fb93 in sqloEDUEntry () from
    /home/appusers/db2m7r/sqllib/lib64/libdb2e.so.1
    #44 0x00007f4b8b84574a in start_thread () from
    /usr/lib64/libpthread.so.0
    #45 0x00007f4b7e4d9f6d in clone () from /usr/lib64/libc.so.6
    
    The problem has only been observed in an environment were there
    had been issues accessing the db2 global registry
    (/var/db2/global.reg). I.e. it is unlikely to happen in a
    "healthy" environment.
    

Local fix

  • Try to keep a "dummy" trusted routine opened in the instance, so
    the client side library will always be loaded in db2 (and never
    unloaded). For example have a db2 connection and issue something
    like this :
    
       db2 values dayofweek(current timestamp)
    
    and never let that go / keep it open for the lifetime of the
    database / instance (just need it for one database).
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 Version 11.1 Mod 4 Fix Pack 6.                *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 Version 11.1 Mod 4 Fix Pack 6.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT33045

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-06-02

  • Closed date

    2021-03-16

  • Last modified date

    2021-03-16

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1"}]

Document Information

Modified date:
18 March 2021