---
title: 如何快速确认 core 是否是由于爆栈导致-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于 如何快速确认 core 是否是由于爆栈导致相关的常见问题和使用技巧，帮助您快速解决 如何快速确认 core 是否是由于爆栈导致的难题。
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

划线反馈

# 如何快速确认 core 是否是由于爆栈导致

更新时间：2024-01-16 11:56

适用版本： V2.1.x、V2.2.x、V3.1.x、V3.2.x 内容类型：How-to

#### 说明

该内容适用于 OceanBase 数据库 V2.x 和 V3.x 版本。

1. 获取 crash 堆栈信息，类似如下内容：

   ```shell
   CRASH ERROR!!! sig=11, sig_code=2, sig_addr=7ff5000eaff8, timestamp=1664366994522192, tid=3441460, tname=TNT_L0_1002, trace_id=1237827481****-166138027986****, extra_info=((null)), lbt=0xa13ecfb 0xa13a737 0x7ff884d2a5cf 0x9502e0b 0x958ff33 0x95847aa 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc

   ```

   这段信息是一个程序崩溃时的堆栈信息，其中包含了以下内容：

      - sig=11：程序崩溃时捕获到的信号编号，这里是11，通常表示访问了非法的内存地址。
      - sig_code=2：信号的错误代码，这里是2，具体含义需要结合信号编号来解释。
      - sig_addr=7ff5000eaff8：信号发生的地址，这里是一个十六进制的地址。
      - timestamp=1664366994522192：崩溃发生的时间戳。
      - tid=3441460：崩溃时所在的线程 ID。
      - tname=TNT_L0_1002：线程的名称。
      - trace_id=12378274812623-1661380279865382：崩溃发生时的追踪 ID。
      - extra_info=((null))：额外的信息，在这里是空的。
      - lbt=...：堆栈信息，列出了多个内存地址，通常是调用栈的信息，可以用来分析程序崩溃时的调用链。
 2. 观察最后的几个栈地址，当最后几个栈地址重复度非常高时，大概率是递归函数导致的爆栈，类似如下内容：

   ```shell
    [root@ob12 log]# addr2line -pCfe /home/admin/oceanbase/bin/observer 0xa13ecfb 0xa13a737 0x7ff884d2a5cf 0x9502e0b 0x958ff33 0x95847aa 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc 0x95847fc
    safe_backtrace at ??:?
    oceanbase::common::coredump_cb(int, siginfo_t*) at ??:?
    ?? ??:0
    oceanbase::sql::ObDMLStmt::get_child_stmts(oceanbase::common::ObIArray<oceanbase::sql::ObSelectStmt*>&) const at ??:?
    oceanbase::sql::ObSelectStmt::get_child_stmts(oceanbase::common::ObIArray<oceanbase::sql::ObSelectStmt*>&) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    oceanbase::sql::ObSelectStmt::check_table_be_modified(unsigned long) const at ??:?
    [root@ob12 log]#

   ```

上一篇

[如何从 core 文件中找到导致 core 的 SQL](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000340650)

下一篇

[CRASH ERROR 日志中 trace_id 的转化方法](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207653) ![有帮助](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) 咨询热线
