---
title: OceanBase 数据库集群出现 ERROR 告警HAS UNFREE PTR 的原因和解决方法-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于OceanBase 数据库集群出现 ERROR 告警HAS UNFREE PTR 的原因和解决方法相关的常见问题和使用技巧，帮助您快速解决OceanBase 数据库集群出现 ERROR 告警HAS UNFREE PTR 的原因和解决方法的难题。
---
切换语言

- 简体中文
- English

划线反馈

# OceanBase 数据库集群出现 ERROR 告警HAS UNFREE PTR 的原因和解决方法

更新时间：2026-07-02 15:41

适用版本： V3.1.x、V3.2.x 内容类型：Troubleshoot  

## 问题现象

OCP 会出现以下 OceanBase 数据库日志告警项。

```shell
[OB 日志告警] 集群=tlobsc001, 机器=xxx.xxx.xxx.xxx，日志类型=observer 错误码=-1, 错误名称=ERROR, 错误详情=[2024-09-12 09:57:08.976688] ERROR has_unfree_callback (object_set.cpp:41) [8623][0][xxxxx-xxxxx-xxxxx-xxxxx] [lt=2043] [dc=0] HAS UNFREE PTR!!! context: 0xff3a79193930, label: oci_statement, static_id: 0x2ef8c220, static_info: {filename_:"ob_oci_environment.cpp", line_:842, function_:"create_memory_ctx"}, dynamic_info: {tid_:8623, cid_:0, create_time_:1726106228972367} BACKTRACE:0xe88a1d7 0xe7221ab 0xa56a63f 0xe7145bb 0xe89c913 0xe89c82b 0xa37d9bb 0xa37ba47 0xa37ba23 0x4fecdff 0xa37bb77 0x5019a17 0xe830f43 0xe85a06f 0xe859f0b 0xe5cacff 0xe5d14cb 0xd62e0ef 0xd632e43 0xa58898f 0xbd1de33 0xbd589fb 0xbd59d83 0xa58898f 0xc92a13f 0xc92e5df 0xa58898f 0xa38a17f 0xa389f4b 0xa958c1f 0xa388b0b 0xa994777 0xa383677 0xa381833 0xa37fceb 0xacaa58f 0xa37f01f 0xaca7e7b 0xa37ae13 0xaca84b7 0xe6081b3 0xe607ff7 0xe89e69b 0xe89e69b

```

关键 OBServer 日志信息。

```shell
observer.log.20240912102918:[2024-09-12 10:12:47.983056] ERROR has_unfree_callback (object_set.cpp:41) [8623][0][xxxxx-xxxxx-xxxxx-xxxxx] [lt=5] [dc=0] HAS UNFREE PTR!!! context: 0xff30c4264640, label: oci_result, static_id: 0x2ef8c220, static_info: {filename_:"ob_oci_environment.cpp", line_:842, function_:"create_memory_ctx"}, dynamic_info: {tid_:8623, cid_:0, create_time_:1726107167982939} BACKTRACE:0xe88a1d7 0xe7221ab 0xa56a63f 0xe7145bb 0xe89c913 0xe89c82b 0xa37d9bb 0xa37ba47 0xa37ba23 0x4fecdff 0xa37bb77 0x5019a17 0x50199fb 0xe830f43 0xe85a06f 0xe859f0b 0xe5cacff 0xe5d14cb 0xd62e0ef 0xd632e43 0xa58898f 0xbd1de33 0xbd589fb 0xbd59d83 0xa58898f 0xc92a13f 0xc92e5df 0xa58898f 0xa38a17f 0xa389f4b 0xa958c1f 0xa388b0b 0xa994777 0xa383677 0xa381833 0xa37fceb 0xacaa58f 0xa37f01f 0xaca7e7b 0xa37ae13 0xaca84b7 0xe6081b3 0xe607ff7 0xe89e69b 0xe89e69b
observer.log.20240912102918:[2024-09-12 10:12:47.985113] ERROR has_unfree_callback (object_set.cpp:41) [8623][0][xxxxx-xxxxx-xxxxx-xxxxx] [lt=2051] [dc=0] HAS UNFREE PTR!!! context: 0xff3a79193930, label: oci_statement, static_id: 0x2ef8c220, static_info: {filename_:"ob_oci_environment.cpp", line_:842, function_:"create_memory_ctx"}, dynamic_info: {tid_:8623, cid_:0, create_time_:1726107167980380} BACKTRACE:0xe88a1d7 0xe7221ab 0xa56a63f 0xe7145bb 0xe89c913 0xe89c82b 0xa37d9bb 0xa37ba47 0xa37ba23 0x4fecdff 0xa37bb77 0x5019a17 0xe830f43 0xe85a06f 0xe859f0b 0xe5cacff 0xe5d14cb 0xd62e0ef 0xd632e43 0xa58898f 0xbd1de33 0xbd589fb 0xbd59d83 0xa58898f 0xc92a13f 0xc92e5df 0xa58898f 0xa38a17f 0xa389f4b 0xa958c1f 0xa388b0b 0xa994777 0xa383677 0xa381833 0xa37fceb 0xacaa58f 0xa37f01f 0xaca7e7b 0xa37ae13 0xaca84b7 0xe6081b3 0xe607ff7 0xe89e69b 0xe89e69b

```

## 问题原因

该原因为 DBLink 的 OCI 接口在执行查询之后没有显式释放，出现内存泄漏，最后由内存管理机制释放了，导致出现这个告警。

## 问题的风险及影响

导致 OCP 告警，无其他影响。

## 影响租户

影响 OceanBase 数据库中的 SYS 租户和 Oracle 租户以及 MySQL 租户。

## 适用版本

OceanBase 数据库 V3.x 版本。

## 解决方法及规避方式

- 解决方法：

  升级至问题已修复版本。目前已修复的版本包括 OceanBase 数据库 V3.2.3 BP2（oceanbase-3.2.3.2-105000062022090916）及之后版本。
 - 规避方式：

  无。

Previous

[OceanBase 数据库集群修改 locality 后任务卡住，__all_rootservice_job 显示任务一直在 inprogress](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000002973742)

Next

[OceanBase 数据库 V4.x 版本中 Location Service 问题排查](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000941489) ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
