IBM Support

IT19442: A DB2 FENCED ROUTINE MAY FAIL WITH ERROR SQL1646N DUE TO SHARED MEMORY PERMISSION PROBLEMS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A routine ( procedure or function ) can fail with error SQL1646N
    because the fenced user ID does not have permissions to attach
    to the shared memory used for db2fmp <-> db2sysc communication.
    
    The error will not necessarily reflect this problem as the error
    can have different causes.
    
    The db2diag.log will report this message :
    
    EDUID   : 117                  EDUNAME: db2agent (SAMPLE) 0
    FUNCTION: DB2 UDB, routine_infrastructure,
    sqlerInvokeFencedRoutine, probe:1220
    MESSAGE : ZRC=0xFFFFF992=-1646
              SQL1646N  A routine failed because the fenced user ID
    cannot access
              required files in the sqllib directory or other
    instance or database directories.
    
    The problem is that the main DB2 process will have allocated a
    shared memory segment for db2fmp communication but due to
    operating system settings, this segment might be split across
    multiple segments. The db2diag.log also reports this :
    
    FUNCTION: DB2 UDB, SQO Memory Management,
    sqloGetSharedMemoryFromOs, probe:2026
    DATA #1 : <preformatted>
    Unable to allocate 56832 MB in a single segment, 14 segments
    were required.
    Possible causes may include an improper setting for the shmmax
    Linux kernel
    tuneable, or a system-wide limit on the segment size.
    
    After allocation of this memory, the correct permissions should
    be set so that the fenced user id can access these, however this
    is incorrectly only done for the first segment that was
    allocated. The apar fix will ensure that all segments have the
    right permissions.
    
    Note that this problem is likely to surface since V11.1 M1 FP1
    due to a changed memory allocation strategy for the FMP memory
    segment. This change may have too much impact and expose
    problems like the problem documented in this apar.
    Hence, the change will be altered by apar IT19471.
    

Local fix

  • Set the FMP memory segment size to the original 256MB amount
    
       db2set DB2NTMEMSIZE=APLD:268435456
    
    This requires recycling the instance (db2stop force; db2start)
    
    While the documentation indicates that DB2NTMEMSIZE is valid
    only for the Windows platform,
    it is also effective for UNIX platforms on the DB2 level
    vulnerable to APAR IT19471 (DB2 v11.1 mod 1 fix pack 1).
    Its use is not generally supported on UNIX platforms, and the
    setting should be removed upon upgrading to a level containing
    APAR fix for apar IT19471.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users of DB2 version 11.1                                    *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Update to V11.1 M1 FP2 or higher.                            *
    ****************************************************************
    

Problem conclusion

  • Update to V11.1 M1 FP2 or higher.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT19442

  • 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

    2017-02-27

  • Closed date

    2017-06-23

  • Last modified date

    2017-06-23

  • 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

[{"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","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
29 June 2020