> Source: [sk52120](https://support.checkpoint.com/results/sk/sk52120)

# sk52120 - Log files can become corrupted when running debug of Check Point daemons on Gaia OS

| Property | Value |
|----------|-------|
| Solution ID | sk52120 |
| Date Created | 2010-08-07 |
| Last Modified | 2023-02-05 |
| Technical Level | Advanced |
| Products | Security Gateway, Security Management Server, Multi-Domain Security Management Server |
| Versions | R81.20, R81.10 (EOS), R81.20, R81 (EOS), R81.10 (EOS), R81 (EOS), R81 (EOS), R81.10 (EOS), R81.20 |
| OS | Gaia |

## Symptoms

- When running debug of Check Point daemons (FWM, CPD, FWD , VPND, etc), the corresponding log files (.elg) might become corrupted : when open the file, it is mostly filled with '`NULL`' characters (dots), and only at the end of the file, there are some readable lines.

## Cause

The issue occurs due to the fact that *two* different mechanisms open the .elg files for 'Write' operation.

1. When the daemon is under debug, the log file (.elg) will be rotated by the internal TDERROR mechanism.  

2. However, there is another mechanism - a Task 'RotateLogs' registered under the CPD daemon that is called every 100 sec. to rotate a log file, if it reached the maximum configured size.

   ```
   [Expert@FW]# cpd_sched_config print
   Task: "RotateLogs"
   Command: /sbin/cp_logrotate
   Arguments:
   Interval: 100
   Active: true
   RunAtStart: true
   ```

<br />

Probably there are two different mechanisms for log rotation because of historical reasons - the TDERROR mechanism was added later...

## Solution

This solution requires authentication. Please log in to view the full solution.

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
