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

# sk101368 - SAM rules on Security Gateway do not survive a reboot

| Property | Value |
|----------|-------|
| Solution ID | sk101368 |
| Date Created | 2014-06-23 |
| Last Modified | 2017-05-18 |
| Technical Level | Advanced |
| Products | Security Gateway |
| Versions | R82.10, R82, R81.20 |

## Symptoms

- * SAM rules do not survive reboot, and therefore SAM policy is not enforced.

* Policy installation after rebooting the Security Gateway fails in SmartDashboard with:  

  `Error Reason: Load on Module Failed - Failed to Load Security Policy`

* Fetching the policy on Security Gateway under debug ('`fw -d fetch -d $FWDIR/state/__tmp/FW1`') shows:

  * `[ ...]@HostName[Date Time] failed to read type: No such file or directory`  
    `
    [ ...]@HostName[Date Time] `**fw_sam_recover_state: failed to read XXX entries**   
    `
    [ ...]@HostName[Date Time] [Time] [fw_atomic_add_sam_tables] [End]`  
    `
    [ ...]@HostName[Date Time] fw_atomic_download: unlocking mutex: install_policy_mutex`  
    `
    ... ...`  
    `
    [ ...]@HostName[Date Time] [Time] [fw_atomic_download] [End]`  
    `
    [ ...]@HostName[Date Time] [Time]] [fw_download] [End]`  
    `
    Failed to Load Security Policy: No such file or directory`  
    `
    [ ...]@HostName[Date Time] [Time] [filter_load] [End]`  
    `
    [ ...]@HostName[Date Time] fw_rfetchx_local_ex: failed to load Security Policy`  

  * `
    [ ...]@HostName[Date Time] [Time] [fw_atomic_add_sam_tables] [Start]`  
    `
    [ ...]@HostName[Date Time] fw_sam_recover_state called`  
    `
    ... ...`  
    `
    [ ...]@HostName[Date Time] fw_sam_recover_state: num of entries=XXX strings length=XXX`  
    `
    ... ...`  
    `
    [ ...]@HostName[Date Time] `**fw_sam_recover_state: failed to read XXX entries**   
    `
    [ ...]@HostName[Date Time] [Time] [fw_atomic_add_sam_tables] [End]`  
    `
    ... ...`  
    `
    [ ...]@HostName[Date Time] [Time] [fw_atomic_download] [End]`  
    `
    [ ...]@HostName[Date Time] [Time] [fw_download] [End]`  
    `
    Failed to Load Security Policy: No such file or directory`  
    `
    [ ...]@HostName[Date Time] [Time] [filter_load] [End]
    `
* Attempt to reviewing the SAM kernel table with fails:

  ```
  
  [Expert@HostName]# fw tab -t sam_requests -s
  HOST                  NAME                               ID #VALS #PEAK #SLINKS
   Cannot read the formats structure from localhost: No such file or directory
  ```

## Cause

* \[Issue 01404405\] *$FWDIR/log/sam.dat* file on Security Gateway has become corrupted.
* \[Issue 01404405\] Number of current SAM rules has reached a certain limit.
* \[Issue 01832521\] Incorrect processing of the *$FWDIR/log/sam.dat* file on Security Gateway after it was purged and Check Point services were restarted (either with "`cpstop;cpstart`" commands, or with reboot).

## 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
