当前位置:首页>Linux>Linux 内核 Oops 技术指南

Linux 内核 Oops 技术指南

  • 2026-01-14 08:52:10
Linux 内核 Oops 技术指南

🎯 概述

什么是内核 Oops?

内核 Oops 是指 Linux 内核在执行过程中遇到了一个非致命性的错误。它表示内核代码中存在一个 bug,导致内核进入了一个不一致或不期望的状态,但这个错误不足以立即导致整个系统停止运行

Oops 的名称由来:

"Oops" 这个词来源于英语口语中的感叹词,表示"哎呀,出错了"。这个命名生动地描述了内核遇到错误时的状态。

Oops 发生时的系统行为


⚔️ Oops vs Kernel Panic

核心区别

对比表

特性
Kernel Oops
Kernel Panic
严重程度
非致命
致命
系统响应
杀死相关进程,尝试继续运行
立即停止系统
可恢复性
可能恢复(但不稳定)
不可恢复,必须重启
内核状态
Tainted(污染),不可信
完全停止
触发条件
一般性内核错误
严重的内核错误
典型原因
驱动程序 bug、空指针访问
核心数据结构损坏、硬件故障
日志输出
打印到 dmesg
打印到控制台/串口
后续影响
可能导致级联错误
系统完全停止

Oops 到 Panic 的演变


🔍 触发原因详解

常见触发原因分类

1. 空指针解引用 (Null Pointer Dereference)

最常见的 Oops 原因

错误代码示例:

// 错误示例 1: 直接解引用未检查的指针
struct device *dev = get_device();
dev->name = "example";  // ❌ 如果 get_device() 返回 NULL

// 错误示例 2: 函数参数未检查
void process_data(struct data *ptr) {
    ptr->value = 100;  // ❌ 调用者可能传入 NULL
}

// 错误示例 3: 内存分配失败后使用
struct buffer *buf = kmalloc(size, GFP_KERNEL);
buf->data[0] = 0x01;  // ❌ kmalloc 可能返回 NULL

正确做法:

// ✅ 正确示例 1: 检查指针有效性
struct device *dev = get_device();
if (dev) {
    dev->name = "example";
} else {
    pr_err("Failed to get device\n");
    return -ENODEV;
}

// ✅ 正确示例 2: 函数开始检查参数
void process_data(struct data *ptr) {
    if (!ptr) {
        pr_warn("Invalid pointer\n");
        return;
    }
    ptr->value = 100;
}

// ✅ 正确示例 3: 检查分配结果
struct buffer *buf = kmalloc(size, GFP_KERNEL);
if (!buf) {
    pr_err("Memory allocation failed\n");
    return -ENOMEM;
}
buf->data[0] = 0x01;
kfree(buf);

2. Use-After-Free (释放后使用)

内存管理中的经典错误

错误示例:

// ❌ Use-After-Free 错误
struct my_data {
    int value;
    char name[32];
};

void buggy_function(void) {
    struct my_data *data = kmalloc(sizeof(*data), GFP_KERNEL);

    data->value = 42;
    strcpy(data->name, "test");

    // 释放内存
    kfree(data);

    // ❌ 错误:继续使用已释放的内存
    printk("Value: %d\n", data->value);  // Oops!
}

正确做法:

// ✅ 正确的内存管理
void correct_function(void) {
    struct my_data *data = kmalloc(sizeof(*data), GFP_KERNEL);
    if (!data)
        return;

    data->value = 42;
    strcpy(data->name, "test");

    // 使用数据
    printk("Value: %d\n", data->value);

    // 释放内存并清空指针
    kfree(data);
    data = NULL;  // ✅ 防止后续误用
}

3. 竞态条件 (Race Conditions)

多核/多线程环境下的常见问题

错误示例:

// ❌ 竞态条件示例
static int shared_counter = 0;

void increment_counter(void) {
    // ❌ 不安全:多个CPU可能同时执行
    int temp = shared_counter;
    temp++;
    shared_counter = temp;
}

正确做法:

// ✅ 使用自旋锁保护
static int shared_counter = 0;
static DEFINE_SPINLOCK(counter_lock);

void increment_counter(void) {
    spin_lock(&counter_lock);
    shared_counter++;
    spin_unlock(&counter_lock);
}

// ✅ 或使用原子操作
static atomic_t shared_counter = ATOMIC_INIT(0);

void increment_counter(void) {
    atomic_inc(&shared_counter);
}

4. 死锁 (Deadlock)

锁依赖循环

错误代码:

// ❌ 死锁示例
static DEFINE_SPINLOCK(lock_a);
static DEFINE_SPINLOCK(lock_b);

void function_1(void) {
    spin_lock(&lock_a);
    // ... do something ...
    spin_lock(&lock_b);  // 获取顺序: A -> B
    // ... do something ...
    spin_unlock(&lock_b);
    spin_unlock(&lock_a);
}

void function_2(void) {
    spin_lock(&lock_b);
    // ... do something ...
    spin_lock(&lock_a);  // ❌ 获取顺序: B -> A (死锁!)
    // ... do something ...
    spin_unlock(&lock_a);
    spin_unlock(&lock_b);
}

正确做法:

// ✅ 统一锁顺序
void function_1(void) {
    spin_lock(&lock_a);
    spin_lock(&lock_b);  // 顺序: A -> B
    // ... do something ...
    spin_unlock(&lock_b);
    spin_unlock(&lock_a);
}

void function_2(void) {
    spin_lock(&lock_a);
    spin_lock(&lock_b);  // ✅ 相同顺序: A -> B
    // ... do something ...
    spin_unlock(&lock_b);
    spin_unlock(&lock_a);
}

5. 在原子上下文中睡眠

常见的上下文违规

// ❌ 错误:在持有自旋锁时睡眠
static DEFINE_SPINLOCK(my_lock);

void buggy_function(void) {
    spin_lock(&my_lock);

    // ❌ 错误:GFP_KERNEL 可能导致睡眠
    void *buf = kmalloc(1024, GFP_KERNEL);

    spin_unlock(&my_lock);
}

// ✅ 正确做法
void correct_function(void) {
    spin_lock(&my_lock);

    // ✅ 使用 GFP_ATOMIC,不会睡眠
    void *buf = kmalloc(1024, GFP_ATOMIC);

    spin_unlock(&my_lock);
}

📊 Oops 信息解读

典型的 Oops 输出

当内核发生 Oops 时,会输出详细的调试信息。下面是一个典型的 Oops 输出示例:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
IP: [<ffffffffa0123456>] my_driver_function+0x12/0x50 [my_module]
PGD 0 
Oops: 0002 [
#1] SMP 
Modules linked in: my_module(O) ...
CPU: 2 PID: 1234 Comm: test_app Tainted: G           O     #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)
RIP: 0010:my_driver_function+0x12/0x50 [my_module]
Code: 48 8b 47 08 48 c7 00 00 00 00 00 c3 0f 1f 44 00 00 ...
RSP: 0018:ffffc90001a3bd88 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88007c123000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffff88007c456000 RDI: 0000000000000000
RBP: ffffc90001a3bd98 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88007c789000
R13: 0000000000000000 R14: ffff88007c012000 R15: 0000000000000000
FS:  00007f1234567000(0000) GS:ffff88007fc80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000008 CR3: 000000007c123000 CR4: 00000000000006e0
Call Trace:
 my_driver_ioctl+0x45/0x100 [my_module]
 do_vfs_ioctl+0xa4/0x600
 SyS_ioctl+0x79/0x90
 do_syscall_64+0x73/0x130
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2

Oops 信息结构解析

关键字段详解

1. 错误类型识别

错误信息
含义
典型原因
unable to handle kernel NULL pointer dereference
空指针解引用
访问了NULL指针
general protection fault
通用保护错误
段错误、权限违规
unable to handle kernel paging request
页面请求失败
访问无效地址
kernel BUG at ...
内核断言失败
BUG_ON() 触发
divide error
除零错误
除数为0

2. Oops 代码解析

Oops: 0002 [#1] SMP
      ^^^^  ^^  ^^^
      |     |    |
      |     |    +--- 系统类型 (SMP=多核, PREEMPT=可抢占)
      |     +-------- Oops 序号 (#1=第1次, #2=第2次...)
      +-------------- 错误代码 (十六进制)

错误代码位含义:

含义
bit 0
0
页不存在
bit 0
1
保护违规
bit 1
0
读操作
bit 1
1
写操作
bit 2
0
内核模式
bit 2
1
用户模式

示例:
0000 = 内核读取不存在的页
0002 = 内核写入不存在的页
0003 = 内核写入保护违规

3. 寄存器状态

RIP: 0010:my_driver_function+0x12/0x50 [my_module]
      ^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^  ^^  ^^^^^^^^^^
      |     |                         |   |
      |     |                         |   +--- 模块名
      |     |                         +------- 函数大小 (80字节)
      |     +--------------------------------- 函数名+偏移 (偏移0x12字节)
      +--------------------------------------- 代码段选择子

RSP: 0018:ffffc90001a3bd88  EFLAGS: 00010246
     ^^^^  ^^^^^^^^^^^^^^^^          ^^^^^^^^
     |     |                         |
     |     |                         +--- CPU标志寄存器
     |     +----------------------------- 栈指针地址
     +----------------------------------- 栈段选择子

CR2: 0000000000000008
     ^^^^^^^^^^^^^^^^
     |
     +--- 导致页错误的地址 (Page Fault Address)

关键寄存器:

寄存器
用途
Oops中的意义
RIP
指令指针
出错的代码位置
RSP
栈指针
当前栈顶地址
CR2
页错误地址
访问的非法地址
RAX-R15
通用寄存器
函数参数、局部变量

4. 调用栈 (Call Trace)

Call Trace:
 my_driver_ioctl+0x45/0x100 [my_module]
 do_vfs_ioctl+0xa4/0x600
 SyS_ioctl+0x79/0x90
 do_syscall_64+0x73/0x130
 entry_SYSCALL_64_after_hwframe+0x3d/0xa2

调用栈解读流程:


🔧 调试方法

调试工具链

1. 使用 addr2line 定位源码

# 从 Oops 信息中提取地址
# IP: [<ffffffffa0123456>] my_driver_function+0x12/0x50 [my_module]

# 使用 addr2line 转换为源代码行
addr2line -e my_module.ko 0x123456

# 输出示例:
# /path/to/driver/my_driver.c:123

# 或者使用内核脚本
./scripts/decode_stacktrace.sh vmlinux /path/to/modules < oops.txt

2. 使用 objdump 查看汇编

# 反汇编模块
objdump -dS my_module.ko > my_module.asm

# 查找出错的函数
# 在 my_module.asm 中搜索 my_driver_function
# 找到 +0x12 偏移处的指令

# 示例输出:
# 0000000000000450 <my_driver_function>:
#  450:   48 8b 47 08             mov    0x8(%rdi),%rax  ← 偏移 0x12
#  454:   48 c7 00 00 00 00 00    movq   $0x0,(%rax)     ← 这里解引用了空指针!

3. 使用 GDB 分析

# 启动 GDB
gdb vmlinux

# 加载模块符号
(gdb) add-symbol-file /path/to/my_module.ko 0xffffffffa0123000

# 查看出错位置的源代码
(gdb) list *(my_driver_function+0x12)

# 输出:
# 123    void my_driver_function(struct my_device *dev)
# 124    {
# 125        struct data *ptr = dev->data;  ← 假设 dev 是 NULL
# 126        ptr->value = 0;                 ← 这里触发 Oops!
# 127    }

# 反汇编函数
(gdb) disassemble my_driver_function

4. 分析 vmcore (Kernel Crash Dump)

# 配置 kdump 捕获内核崩溃转储
# /etc/default/grub
GRUB_CMDLINE_LINUX="crashkernel=256M"

# 重启后,Oops/Panic 会生成 vmcore 文件在 /var/crash/

# 使用 crash 工具分析
crash vmlinux /var/crash/vmcore

# crash 命令示例:
crash> bt                    # 显示调用栈
crash> ps                    # 显示进程列表
crash> log                   # 显示内核日志
crash> struct my_device 0xffff88007c123000  # 查看数据结构
crash> dis my_driver_function   # 反汇编函数

5. 使用 ftrace/perf 追踪

# 启用函数追踪
echo function > /sys/kernel/debug/tracing/current_tracer
echo my_driver_function > /sys/kernel/debug/tracing/set_ftrace_filter
echo 1 > /sys/kernel/debug/tracing/tracing_on

# 触发问题后查看追踪
cat /sys/kernel/debug/tracing/trace

# 使用 perf 记录
perf record -e 'kmem:*' -ag
# 触发 Oops
perf report

调试流程


🛡️ 预防措施

编码最佳实践

1. 指针使用规范

// ✅ 总是检查指针有效性
if (ptr == NULL) {
    pr_err("Invalid pointer\n");
    return -EINVAL;
}

// ✅ 释放后清空指针
kfree(ptr);
ptr = NULL;

// ✅ 使用内核宏简化检查
if (IS_ERR_OR_NULL(ptr)) {
    return PTR_ERR(ptr);
}

// ✅ 防御性编程
#define SAFE_DEREF(ptr, member, default) \
    ((ptr) ? (ptr)->member : (default))

int value = SAFE_DEREF(dev, status, -1);

2. 内存分配规范

// ✅ 分配后检查
void *buf = kmalloc(size, GFP_KERNEL);
if (!buf) {
    pr_err("Memory allocation failed\n");
    return -ENOMEM;
}

// ✅ 使用资源管理的自动清理
void *buf = devm_kmalloc(dev, size, GFP_KERNEL);
// 设备移除时自动释放

// ✅ 清零敏感内存
memzero_explicit(password, sizeof(password));
kfree(password);

3. 锁使用规范

// ✅ 使用 RAII 风格的锁保护
static DEFINE_SPINLOCK(my_lock);

void safe_function(void) {
    unsigned long flags;

    spin_lock_irqsave(&my_lock, flags);
    // 临界区代码
    spin_unlock_irqrestore(&my_lock, flags);
}

// ✅ 使用锁验证工具
#ifdef CONFIG_PROVE_LOCKING
    lockdep_assert_held(&my_lock);
#endif

静态分析工具

使用示例:

# Sparse - 检查类型、地址空间、锁
make C=1 CF="-D__CHECK_ENDIAN__"

# Coccinelle - 查找模式
spatch --sp-file null_check.cocci my_driver.c

# Smatch - 静态分析
~/smatch/smatch_scripts/kchecker my_driver.c

# 内核测试工具
make W=1  # 启用额外警告

运行时检测工具

# KASAN - 检测内存错误
CONFIG_KASAN=y
CONFIG_KASAN_INLINE=y

# UBSAN - 未定义行为检测
CONFIG_UBSAN=y

# LOCKDEP - 死锁检测
CONFIG_PROVE_LOCKING=y
CONFIG_LOCK_STAT=y

# KMEMLEAK - 内存泄漏检测
CONFIG_DEBUG_KMEMLEAK=y
echo scan > /sys/kernel/debug/kmemleak

# DEBUG_LIST - 链表调试
CONFIG_DEBUG_LIST=y

# DEBUG_ATOMIC_SLEEP - 检测原子上下文睡眠
CONFIG_DEBUG_ATOMIC_SLEEP=y

📖 实际案例分析

案例 1:空指针解引用

Oops 输出:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
IP: [<ffffffffa0234567>] my_read+0x8/0x30 [faulty_module]

源代码:

struct my_device {
    int status;
    char *name;      // 偏移 0x10
};

static ssize_t my_read(struct file *file, char __user *buf,
                       size_t count, loff_t *ppos)
{
    struct my_device *dev = file->private_data;
    // ❌ 未检查 dev 是否为 NULL
    return simple_read_from_buffer(buf, count, ppos,
                                   dev->name, strlen(dev->name));
    // 如果 dev == NULL,访问 dev->name (偏移 0x10) 会触发 Oops
}

修复:

static ssize_t my_read(struct file *file, char __user *buf,
                       size_t count, loff_t *ppos)
{
    struct my_device *dev = file->private_data;

    // ✅ 添加检查
    if (!dev || !dev->name) {
        pr_err("Invalid device or device name\n");
        return -EINVAL;
    }

    return simple_read_from_buffer(buf, count, ppos,
                                   dev->name, strlen(dev->name));
}

案例 2:Use-After-Free

场景:

struct work_item {
    struct work_struct work;
    char *data;
};

static void work_handler(struct work_struct *work)
{
    struct work_item *item = container_of(work, struct work_item, work);

    process_data(item->data);

    // ❌ 释放内存
    kfree(item->data);
    kfree(item);
}

static int submit_work(void)
{
    struct work_item *item = kmalloc(sizeof(*item), GFP_KERNEL);
    item->data = kmalloc(1024, GFP_KERNEL);

    INIT_WORK(&item->work, work_handler);
    schedule_work(&item->work);

    // ❌ 可能在 work_handler 执行期间被访问
    return 0;
}

// 在模块卸载时
static void cleanup(void)
{
    // ❌ 没有等待工作项完成
    // 如果 work_handler 还在执行,访问已卸载的代码 -> Oops
}

修复:

static struct workqueue_struct *my_wq;

static void cleanup(void)
{
    // ✅ 等待所有工作完成
    flush_workqueue(my_wq);
    destroy_workqueue(my_wq);
}

📝 总结

Oops 处理检查清单

关键要点

方面
要点
理解
Oops 是非致命错误,但系统可能不稳定
定位
使用 addr2line、objdump、GDB 定位代码
分析
重点关注 IP、CR2、调用栈
修复
添加检查、修正逻辑、使用正确的同步
预防
静态分析、运行时检测、代码审查
测试
使用 KASAN、UBSAN、LOCKDEP 等工具

开发建议

  1. 永远不要忽略编译警告
    bash make W=1 # 启用额外警告

  2. 使用内核调试选项
    CONFIG_DEBUG_KERNEL=y CONFIG_KASAN=y CONFIG_UBSAN=y CONFIG_PROVE_LOCKING=y

  3. 编写防御性代码
    - 检查所有指针
    - 验证所有输入
    - 正确处理错误

  4. 进行充分测试
    - 单元测试
    - 压力测试
    - 边界条件测试

  5. 持续学习
    - 阅读内核文档
    - 分析其他开发者的补丁
    - 参与社区讨论


希望这份技术指南能帮助您理解和调试 Linux 内核 Oops!如有任何疑问,欢迎继续探讨。🚀

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-10 01:43:01 HTTP/2.0 GET : https://f.mffb.com.cn/a/459173.html
  2. 运行时间 : 0.160777s [ 吞吐率:6.22req/s ] 内存消耗:4,868.26kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=d921e18fac027084c7bd25976abc4a8a
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000614s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000669s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000270s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000287s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000500s ]
  6. SELECT * FROM `set` [ RunTime:0.005035s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000653s ]
  8. SELECT * FROM `article` WHERE `id` = 459173 LIMIT 1 [ RunTime:0.012629s ]
  9. UPDATE `article` SET `lasttime` = 1770658981 WHERE `id` = 459173 [ RunTime:0.000962s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.001099s ]
  11. SELECT * FROM `article` WHERE `id` < 459173 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.005524s ]
  12. SELECT * FROM `article` WHERE `id` > 459173 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.003530s ]
  13. SELECT * FROM `article` WHERE `id` < 459173 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.024363s ]
  14. SELECT * FROM `article` WHERE `id` < 459173 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.021171s ]
  15. SELECT * FROM `article` WHERE `id` < 459173 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.014798s ]
0.162395s