Did this article resolve your question/issue?



What is the -MemCheck Parameter?

« Go Back


TitleWhat is the -MemCheck Parameter?
URL NameP128291
Article Number000128136
EnvironmentProduct: OpenEdge
Version: 10.1B02+, 10.1C, 10.2x, 11.x, 12.x
OS: All supported platforms
Question/Problem Description
What is the Memory consistency check (-MemCheck) parameter?
How to enable memory overwrite checking ?
Can -MemCheck be enabled while the database is online?
What error messages will Memory consistency Checking log when a memory overwrite is detected?
What performance overhead is expected with -MemCheck?
How is -MemCheck different to -DbCheck, -TableCheck, -IndexCheck, -AreaCheck
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
OpenEdge 10.1B02 Service Pack, 10.1C introduced a realtime memory consistency check as a proactive utility that enables memory overwrite checking within the buffer pool. This consistency check is a form of memory corruption detection which detects illegal operations in memory movement, such as a buffer copy with a negative length of data or a memory move to an incorrect location. Other consistency check parameters (-DbCheck, -TableCheck, -IndexCheck, -AreaCheck) check physical block contents whereas -MemCheck is a proactive parameter that applies memory overwrite checking to the buffer pool block boundaries (memory boundaries) in realtime before data is committed to disk. If -MemCheck is enabled and if it detects a memory overwrite issue within the buffer pool a fatal error will be generated, and database integrity will be preserved by forcing an Emergency database shutdown.

What is a Memory Overwrite ?
  • When a user performs an operation like an insert, a delete or an update, the data within the associated buffer pools’ block(s) may need to be re-arranged within that block(s)
  • A ‘memory overwrite’ is an erroneous operation occurring when data that should be rearranged within a given block is accidentally written to a location outside of that block. Such a scenario can arise for example as a result of a corruption in memory.
  • -MemCheck is designed to check for a large variety of potential memory overwrite issues within the database buffer pool
  • If -MemCheck is enabled and it detects a memory overwrite in the buffer pool, a fatal error will be generated and database integrity will be preserved by forcing an Emergency database shutdown.
  • When the data that are expected to move around within the block is accidentally written outside of that block, caused by corruption in memory for some reason, this is called a “memory overwrite”.
What is Memory Overwrite Checking:  
  • The purpose of the Memory Consistency Check is to prevent memory operations that exceed the database block size and in effect, decrease the time needed to find and fix corruption when a crash issue results with the usual utilites: dbtool, idxcheck, dbrpr scans, idxfix, idxbuild.
  • It enables memory overwrite checking which focuses on preventing potential memory overwrites.
  • It is different to the Physical Block Consistency Checking (-DbCheck, -TableCheck, -IndexCheck,-AreaCheck) which validates index blocks and record block content. Memory Overwrite Checking checks the block boundary, which validates index blocks and record blocks in the Buffer Pool (memory).
  • Enabling -MemCheck enhances the buffer pool manager to help identify block overwrites at crucial steps in the management of the life cycle of the block. Physical record and index block operations are checked for conditions that provide an opportunity to overwrite block buffers in the buffer pool after each write operation.
  • It checks that the note offset plus note length of the intended operation does not exceed the database blocksize prior to the before-image note write and subsequent database block write.
  • During RM block changes, this means the transaction note is prevented from being written at all and the database block if corrupt, is prevented from being written.
  • During index expansion, insert operations are checked during the strategic points of the insertion of a key element. Leaf blocks are checked for the information byte size, and non leaf blocks for compression size changes, key element changes, after the data portion of the key is added.
  • In addition, potential overwrite during index block split operations are checked during the strategic points of the insertion of a key element to ensure that the end of the index block is not overwritten and the key element is properly split in the new index block.
  • Performance loss when using -MemCheck is expected to be nearly 0%.
Using Memory consistency check (-MemCheck) 

1.   Memory consistency check can be enabled for a single user client or for any offline utility:
  • For single-user access, as a Client Connection parameter:
$   progres <dbname> -MemCheck
  • For offline utilities:
$   rfutil <dbname> -C roll forward -a dbname.a1 -MemCheck
$   proutil <dbname> -C idxbuild -MemCheck
If the utility is read-only, such as DBANALYS, IDXCHECK the -MemCheck parameter is ignored

2.   Memory consistency check can be enabled for multi-user access:
  • As a startup parameter on the database Primary Broker:
$   proserve <dbname> -S 5768 -B 100000 -L 100000 -MemCheck
  • At runtime enable/disable with PROMON or the _DbParam VST:
$   PROMON [dbname] > R&D > 4. Administrative Functions > 8. Enable/Disable block level consistency check > 1. -MemCheck

Queried with the OpenEdge 11.5 _DbParam VST and enabled/disabled:
// Enable MemCheck 
    FIND FIRST _DbParams WHERE _DbParams._DbParams-Name = "-MemCheck".
    ASSIGN _DbParams._DbParams-value = "1". /* ENABLED */

// Query the current value: 
FIND FIRST _DbParams NO-LOCK WHERE _DbParams._DbParams-Name = "-MemCheck".
        DISPLAY _DbParams-Desc SKIP
       _DbParams-Name _DbParams-Msg-Num _DbParams-Value _DbParams-Is-Modifiable SKIP.

Memory Overwrite Messages:

The advantage of Memory Overwrite Checking is that corruption are likely to be found at the time as opposed to later when next accessed.
When a “memory overwrite” is detected, the current operation is halted and messages are produced detailing the nature of the potential memory overwrite in the database lg file. This information needs to be provided to OpenEdge Technical Support for further evaluation:

The following messages confirm when Memory Overwrite Checking is enabled:
  • Memory overwrite check (-MemCheck): [Not Enabled | Enabled] (14015)
  • Memory overwrite check: Disabled (-MemCheck) (14023)
When Memory Overwrite Checking detects a possible memory overwrite, the block and supporting information correlating to the specific check that failed are dumped to the database lg file:

During RM block changes:
  • SYSTEM ERROR: Internal Error: memory check fatal (14047)
  • Internal ERROR: bkReplace: data too long! offset:   len , dumping block dbkey: (14048)
During strategic points of the insertion of a key element to an Index:
  • cxDoInsert: About to copy too much! (a), dumping block dbkey: (14043)
  • cxDoInsert: About to copy too much! (b), dumping block dbkey: (14044)
  • cxDoInsert: About to copy too much! (c), dumping block dbkey: (14045)
  • cxDoInsert: About to copy too much! (d), dumping block dbkey: (14046)
During strategic points index block split operations:
  • Internal ERROR: cxDoSplit(aa) data too long! offset:  len (14038)
  • SYSTEM ERROR: Internal ERROR: memory check fatal (14039)
  • cxDoEndSplit: Index  About to copy too much! (a), dumping block dbkey: (14040)
  • cxDoEndSplit: Index  About to copy too much! (b), dbkey: (14041)
  • cxDoEndSplit: Index  About to copy too much! (c), dumping block dbkey:  (14042)
During single-user access:
  • <function name>: Index <index-number> about to copy too much!()  Dumping block dbkey: <area>/<dbkey> (15152)

Last Modified Date11/20/2020 6:59 AM
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.