IBM Support

IC75251: USING LARGER MEMORY BUFFER WITH DB2READLOGNOCONNINIT CAN LEAD TO FAILURE OR HANG

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Using larger memory allocation with db2ReadLogNoConnInit can
    either lead to SQLCODE = -2038 or hang.
    
    Example:
    
    dblognoconn API fails when increasing readLogMemSize.
    
    Following change is done in dblognoconn.sqc (from
    sqllib/samples/c)
    
      /* Allocate memory for the API's control blocks and log
       * buffer */
    
      readLogMemSize =  128 * 4096;
      readLogMemory = (char *)malloc(readLogMemSize);
    
    
    "dblognoconn sample db2luw00" fails with:
    
    ...
      Disconnecting from 'sample' database...
      Disconnected from 'sample' database.
    
    
    ##############  DETACH FROM THE INSTANCE: db2luw00 #####
    
    
    ---- error report -----------------------------
    
    application message = database logs no db conn -- read
    line                = 307
    file                = dblognoconn.sqc
    SQLCODE             = -2038
    
    SQL2038N  A database system error "" occurred during processing.
    
    ---- end error report ------------------------
    Non-zero rc from function DbReadLogRecordsNoConn.
    
    
    db2diag.log shows:
    
    2011-03-09-11.08.14.327604+060 I7424E347           LEVEL: Info
    PID     : 19068                TID  : 139781823645472PROC :
    dblognoconn
    INSTANCE: db2luw00             NODE : 000
    FUNCTION: DB2 UDB, data protection services, sqlpReadLogNoConn,
    probe:1800
    DATA #1 : <preformatted>
    API call: action 3, startLSN is NULL, endLSN is NULL,
    logBufferSize 0
    
    2011-03-09-11.08.14.329556+060 I7772E369           LEVEL: Info
    PID     : 19068                TID  : 139781823645472PROC :
    dblognoconn
    INSTANCE: db2luw00             NODE : 000
    FUNCTION: DB2 UDB, data protection services, sqlpReadLogNoConn,
    probe:1800
    DATA #1 : <preformatted>
    API call: action 1, startLSN 00000000032C8010, endLSN
    FFFFFFFFFFFFFFFF, logBufferSize 65536
    
    2011-03-09-11.08.14.391392+060 I10147E395          LEVEL: Error
    PID     : 19068                TID  : 139781823645472PROC :
    dblognoconn
    INSTANCE: db2luw00             NODE : 000
    FUNCTION: DB2 UDB, data protection services, sqlpgclf, probe:120
    MESSAGE : Error -2045837302 on closing file handle:
    DATA #1 : Hexdump, 8 bytes
    0x00007FFF784AA2D4 : 004E 3120 2020 2000
    .N1    .
    
    This is Sqlcode -980
    SQL0980C  A disk error occurred.  Subsequent SQL statements
    cannot be
    processed.
    
    
    2011-03-09-11.08.14.393328+060 I10543E180         LEVEL: Error
    PID:19068 TID:139781823645472 NODE:000 Title: SQLP_LFCB
    Dump File:/home/db2luw00/sqllib/db2dump/19068.0.000.dump.bin
    
    2011-03-09-11.08.14.432477+060 I10724E381          LEVEL: Severe
    PID     : 19068                TID  : 139781823645472PROC :
    dblognoconn
    INSTANCE: db2luw00             NODE : 000
    FUNCTION: DB2 UDB, data protection services, sqlpgclf, probe:40
    RETCODE : ZRC=0x8710001D=-2028994531=SQLP_LERR "Fatal Logic
    Error"
              DIA8526C A fatal error occurred in data protection
    services.
    
    2011-03-09-11.08.14.436126+060 I11106E395          LEVEL: Error
    PID     : 19068                TID  : 139781823645472PROC :
    dblognoconn
    INSTANCE: db2luw00             NODE : 000
    FUNCTION: DB2 UDB, data protection services, sqlpgclf, probe:120
    MESSAGE : Error -2028994531 on closing file handle:
    DATA #1 : Hexdump, 8 bytes
    0x00007FFF784AA2D4 : FFFF FFFF 0000 0000
    ........
    
    2011-03-09-11.08.14.439353+060 I11502E383          LEVEL: Error
    PID     : 19068                TID  : 139781823645472PROC :
    dblognoconn
    INSTANCE: db2luw00             NODE : 000
    FUNCTION: DB2 UDB, data protection services,
    sqlpLoadReadBufferNoConn, probe:1120
    MESSAGE : Received error:
    DATA #1 : Hexdump, 4 bytes
    0x00007FFF784AA3A8 : 0A00 0F86
    ....
    
    2011-03-09-11.08.14.442531+060 I11886E376          LEVEL: Error
    PID     : 19068                TID  : 139781823645472PROC :
    dblognoconn
    INSTANCE: db2luw00             NODE : 000
    FUNCTION: DB2 UDB, data protection services, sqlpReadLogNoConn,
    probe:1960
    MESSAGE : Received error:
    DATA #1 : Hexdump, 4 bytes
    0x00007FFF784AA7EC : 0A00 0F86
    
    
    db2trc shows:
    
    
    65908       | | sqlpLoadReadBufferNoConn data [probe 1]
    65909       | | | sqlpOpenLogFile entry
    65910       | | | | sqlpgolf entry
    65911       | | | | sqlpgolf data [probe 0]
    65912       | | | | | sqloopenp entry
    
    65912   entry DB2 UDB oper system services sqloopenp cei
    (1.3.15.823.2)
            pid 18656 tid 140324554061600 cpid 535 node 0
    
            bytes 117
    
            Data1   (PD_TYPE_FILE_NAME,69) File name:
    
    /home/db2luw00/logArch/db2luw00/SAMPLE/NODE0000/C0000000/S000000
    0.LOG
            Data2   (PD_TYPE_SQO_FILE_OPEN_OPTIONS,4) SQO Open File
    Options:
    SQLO_REVISE, SQLO_READONLY, SQLO_SHAREWRITE,
    SQLO_SECTOR_ALIGNED, SQLO_NO_THREAD_LEVEL_FILE_LOCK
            Data3   (PD_TYPE_HEXINT,4) Hex integer:
            0x00000180
            Data4   (PD_TYPE_PTR,8) Pointer:
            0x0000000000000000
    
    65913       | | | | | sqloopenp exit
    
    65913   exit DB2 UDB oper system services sqloopenp cei
    (2.3.15.823.2)
            pid 18656 tid 140324554061600 cpid 535 node 0
            codepath = 4:9:18
    
            rc = 0
            bytes 16
    
            Data1   (PD_TYPE_SQO_FILE_HDL,8) File handle:
      File Handle              = 3
      File System Block Size   = 0 bytes
      File System Type         = UNKNOWN
    
    65914       | | | | | sqloReadBlocks entry
    65915       | | | | | sqloReadBlocks exit
    65916       | | | | sqlpgolf exit
    65917       | | | | sqloseek entry
    65918       | | | | sqloseek exit
    65919       | | | | sqloseekread64 entry
    65920       | | | | sqloseekread64 data [probe 50]
    65921       | | | | sqloseekread64 exit
    65922       | | | sqlpOpenLogFile exit
    65923       | | | sqlpPageFromLSN entry
    65924       | | | sqlpPageFromLSN exit
    65925       | | | sqloReadBlocks entry
    65926       | | | sqloReadBlocks exit
    65927       | | | sqlpgclf entry
    65928       | | | sqlpgclf data [probe 0]
    65929       | | | | sqloclose entry
    
    65929   entry DB2 UDB oper system services sqloclose cei
    (1.3.15.681.2)
            pid 18656 tid 140324554061600 cpid 535 node 0
    
            bytes 16
    
            Data1   (PD_TYPE_SQO_FILE_HDL,8) File handle:
      File Handle              = 134305870
      File System Block Size   = 0 bytes
      File System Type         = nfs
    
    65930       | | | | | sqloSystemErrorHandler entry
    65931       | | | | | | pdLogSysRC entry
    
    
    file handle is overwritten with content from the logBuffer:
    
    134305870 is 0x0801584E ( byte swapped: 4E58 0108 )
    
    65926   exit DB2 UDB oper system services sqloReadBlocks cei
    (2.3.15.444.2)
            pid 18656 tid 140324554061600 cpid 535 node 0
            rc = 0
            bytes 65535
    
            Data1   (PD_TYPE_HEXDUMP,65527) Hexdump:
            EC0F 0000 0000 0000 4C98 2803 0000 0000
    ........L.(.....
            D001 0000 4E00 0000 0000 0000 0000 0000
    ....N...........
            0000 0000 2177 0000 01A1 0000 0D00 0000
    ....!w..........
            A401 B201 0F00 0500 0000 2E00 0000 A401
    ................
            0100 D600 D600 0800 DE00 0800 E600 0800
    ................
            5966 4261 694B 4544 6201 0030 EE00 2C00
    YfBaiKEDb..0..,.
            0000 0000 0143 5300 5500 3000 1A01 3600
    .....CS.U.0...6.
            2011 0304 1034 2693 2750 2011 0304 1034     ....4&.'P
    ....4
            2693 2750 0500 0000 204E 4E59 B804 0000    &.'P....
    NNY....
            0000 0144 5001 0800 4E58 0108 0060 0108
    ...DP...NX...`..
            004E 3120 2020 2000 0A4E 4E42 524E 0000    .N1
    ..NNBRN..
            0000 0000 0000 0000 0C20 1103 0410 1754    .........
    .....T
    

Local fix

  • n/a
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * see ERROR DESCRIPTION                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 Version 9.7 Fix Pack 5.                       *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 Version 9.7 Fix Pack 5.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC75251

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-03-24

  • Closed date

    2011-12-08

  • Last modified date

    2011-12-08

  • 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

  • R820 PSN

       UP

  • R910 PSN

       UP

  • R950 PSN

       UP

  • R970 PSN

       UP

  • R980 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC75251

Modified date: 08 December 2011