当前位置:首页>Linux>Linux Subreaper 机制及内核态逃离方法(PR_SET_CHILD_SUBREAPER, prctl, systemed)

Linux Subreaper 机制及内核态逃离方法(PR_SET_CHILD_SUBREAPER, prctl, systemed)

  • 2026-02-06 10:05:20
Linux Subreaper 机制及内核态逃离方法(PR_SET_CHILD_SUBREAPER, prctl, systemed)

PS:要转载请注明出处,本人版权所有。

PS: 这个只是基于《我自己》的理解,

如果和你的原则及想法相冲突,请谅解,勿喷。

环境说明

  无

前言


  由于某些其他的原因,我们在测试另外一个问题的时候发现了一个奇怪的现象:在我们一直朴素的认知下,如果一个程序创建了parent-process和child-process,这个时候,当child-process正在运行,parent-process退出的时候,child-process会被托孤到init进程。但是我们却通过pstree -p 发现了并不是这样的,他会被托孤到某一个特殊进程下面,这个特殊进程并不是init进程,而是init进程下面的某一个进程。下面是这个现象的验证过程:

  测试程序

#include<unistd.h>
#include<sys/types.h>
#include<stdio.h>

intmain(int argc, char * argv[])
{
int pid = fork();

if (pid < 0)
printf("fork failed.\n");

elseif (pid > 0){

printf("parent : child pid = %d\n", pid);
    }
else{

printf("child doing ... ...\n");
printf("first get ppid = %d\n", getppid());
        sleep(20);
printf("second get ppid = %d\n", getppid());
        sleep(1000);
    }
    sleep(15);
return0;
}

  我们运行这个程序后,其运行输出如下图:

  我们对这个图进行分析,可以知道,当前的运行a.out进程pid是72140,然后子进程的pid是72141,在parent-process退出后,我们再次获取ppid,可以看到输出是3203。

  接着我们看一下在parent-process未退出时的进程树图片节选:

  在图中我们可以知道,我们的a.out在systemd(3203)->gnome-terminal-(3741)->bash(5073)->a.out(72140)

  接着我们看一下在parent-process退出时的进程树图片节选:

  在图中我们可以知道,当parent-process退出后,子进程72141被托孤给了systemd(3203),并不是我们熟知的pid为1的init进程。这里提前透露一下3203是systemd --user一个进程(同时也是一个subreaper)。

  带着对这个问题的疑问,我查询了相关的资料,做了相关的实验,查询到这个现象的原因是PR_SET_CHILD_SUBREAPER相关导致的,因此有了本文的相关内容。





什么是Subreaper(PR_SET_CHILD_SUBREAPER) ?


  对于这个问题,我们还是要去看man手册,链接如下:https://man7.org/linux/man-pages/man2/prctl.2.html

  通过prctl函数,我们可以对当前进程做很多有趣的设置,其中一个就是PR_SET_CHILD_SUBREAPER选项,他主要是用来收集这些托孤进程的,一般是用来给一些守护进程管理进程(例如:上文提到的systemd)使用,使得一个进程能够管理自己的所有后代进程。其主要还是操作当前进程的task_struct中的is_child_subreaper属性,下面是实现的源码节选:

//kernel/sys.c
staticintpropagate_has_child_subreaper(struct task_struct *p, void *data)
{
/*
     * If task has has_child_subreaper - all its descendants
     * already have these flag too and new descendants will
     * inherit it on fork, skip them.
     *
     * If we've found child_reaper - skip descendants in
     * it's subtree as they will never get out pidns.
     */

if (p->signal->has_child_subreaper ||
        is_child_reaper(task_pid(p)))
return0;

    p->signal->has_child_subreaper = 1;
return1;
}

//kernel/sys.c
SYSCALL_DEFINE5(prctl, int, option, unsignedlong, arg2, unsignedlong, arg3,
unsignedlong, arg4, unsignedlong, arg5)
{
structtask_struct *me = current;
//...
switch (option){
//...
case PR_SET_CHILD_SUBREAPER:
            me->signal->is_child_subreaper = !!arg2;
if (!arg2)
break;
//此函数遍历当前进程的所有子进程,并调用propagate_has_child_subreaper设置has_child_subreaper属性。
            walk_process_tree(me, propagate_has_child_subreaper, NULL);
break;
case PR_GET_CHILD_SUBREAPER:
            error = put_user(me->signal->is_child_subreaper,
                    (int __user *)arg2);
break;
//...
    }
//...
}

  通过如上的源码,我们可以知道了PR_SET_CHILD_SUBREAPER的实现部分原理,但是现在我们还是不知道为啥这样设置之后,当一个进程还有子进程时,当前进程退出后,子进程就托孤给了这个子进程收割者。这里可以提前透露一下,主要是和task_struct中的has_child_subreaper属性有关系。





当含有子进程的父进程退出时,怎么进行托孤的?


  其实从问题就可以看出一点端倪,这个托孤的动作一般是发生在进程退出的时候,所以我们去找进程退出相关的代码应该能够找到一些启发。一般来说,我们的进程退出都会调用exit系统调用,对应到内核态,其实就是do_exit。我们通过has_child_subreaper来全局搜索,可以看到一些关联。下面是部分代码节选:

void __noreturn do_exit(long code)
{
structtask_struct *tsk = current;
int group_dead;

//...
    exit_notify(tsk, group_dead);
//...
}

/*
 * Send signals to all our closest relatives so that they know
 * to properly mourn us..
 */

staticvoidexit_notify(struct task_struct *tsk, int group_dead)
{
//...
    LIST_HEAD(dead);

//...
    forget_original_parent(tsk, &dead);
//...
}

/*
 * This does two things:
 *
 * A.  Make init inherit all the child processes
 * B.  Check to see if any process groups have become orphaned
 *    as a result of our exiting, and if they have any stopped
 *    jobs, send them a SIGHUP and then a SIGCONT.  (POSIX 3.2.2.2)
 */

staticvoidforget_original_parent(struct task_struct *father,
struct list_head *dead)

{
structtask_struct *p, *t, *reaper;

if (unlikely(!list_empty(&father->ptraced)))
        exit_ptrace(father, dead);

/* Can drop and reacquire tasklist_lock */
//通过task_active_pid_ns()->child_reaper查找到一个reaper,然后返回出来,注意一般情况下这里查出来的进程就是当前namespace的init进程。
    reaper = find_child_reaper(father, dead);
if (list_empty(&father->children))
return;

//根据init进程和has_child_subreaper属性,查询真正符合条件的reaper
    reaper = find_new_reaper(father, reaper);
    list_for_each_entry(p, &father->children, sibling) {//遍历当前退出进程的所有子进程
        for_each_thread(p, t) {//遍历所有子进程的线程
            RCU_INIT_POINTER(t->real_parent, reaper);//设置真正的父进程,这里的父进程就是上面我们查找出来了的满足要求的reaper
            BUG_ON((!t->ptrace) != (rcu_access_pointer(t->parent) == father));
if (likely(!t->ptrace))
                t->parent = t->real_parent;
if (t->pdeath_signal)
                group_send_sig_info(t->pdeath_signal,
                            SEND_SIG_NOINFO, t,
                            PIDTYPE_TGID);
        }
/*
         * If this is a threaded reparent there is no need to
         * notify anyone anything has happened.
         */

if (!same_thread_group(reaper, father))
            reparent_leader(father, p, dead);
    }
    list_splice_tail_init(&father->children, &reaper->children);
}

  在forget_original_parent中,我们可以看到整个方法的作用就是,找到一个reaper,然后将所有子进程交付给这个reaper。





我们怎么逃离PR_SET_CHILD_SUBREAPER的影响呢?


  其实这个问题就在forget_original_parent中的find_new_reaper函数中,也就是has_child_subreaper这个属性怎么生效,下面我们来看看这个函数的功能:

/*
 * When we die, we re-parent all our children, and try to:
 * 1. give them to another thread in our thread group, if such a member exists
 * 2. give it to the first ancestor process which prctl'd itself as a
 *    child_subreaper for its children (like a service manager)
 * 3. give it to the init process (PID 1) in our pid namespace
 */

staticstruct task_struct *find_new_reaper(struct task_struct *father,
struct task_struct *child_reaper)

{
structtask_struct *thread, *reaper;

    thread = find_alive_thread(father);
if (thread)
return thread;

if (father->signal->has_child_subreaper) {//注意has_child_subreaper属性生效的地方。
unsignedint ns_level = task_pid(father)->level;
/*
         * Find the first ->is_child_subreaper ancestor in our pid_ns.
         * We can't check reaper != child_reaper to ensure we do not
         * cross the namespaces, the exiting parent could be injected
         * by setns() + fork().
         * We check pid->level, this is slightly more efficient than
         * task_active_pid_ns(reaper) != task_active_pid_ns(father).
         */

for (reaper = father->real_parent;
             task_pid(reaper)->level == ns_level;
             reaper = reaper->real_parent) {
if (reaper == &init_task)
break;
if (!reaper->signal->is_child_subreaper)
continue;
            thread = find_alive_thread(reaper);
if (thread)
return thread;
        }
    }

return child_reaper;
}

  我们从find_new_reaper中可以知道,当has_child_subreaper有值时,我们就从当前进程的父进程开始查找,当找到一个进程的is_child_subreaper属性是有值时,我们就返回这个进程作为真正的reaper。当has_child_subreaper无值时,就是以init进程为reaper来托孤。

  从以上的推理来看,我们有两个方案可以逃离PR_SET_CHILD_SUBREAPER影响:

  • • 直接改写真正PR_SET_CHILD_SUBREAPER的地方,不启用这个属性。例如修改systemd的源码。
  • • 写一个内核态的小工具,修改指定进程的as_child_subreaper的值,当我们禁用此值时,在进程退出时,就会把子进程托孤给init进程。




我们怎么逃离PR_SET_CHILD_SUBREAPER的影响呢?


  按照上一个小结的结论,我们一般情况下是不会去改一些开源的系统程序,例如:systemd。因此我们选择直接写一个基本的内核态模块,直接修改其task_struct数据结构即可。ko文件如下:

#include<linux/module.h>/* Needed by all modules */
#include<linux/kernel.h>/* Needed for KERN_INFO */

#include<linux/pid.h>
#include<linux/sched.h>
#include<linux/sched/signal.h>
#include<linux/sched/mm.h>
#include<linux/mm_types.h>
#include<linux/rwsem.h>
#include<linux/slab.h>
#include<linux/fs.h>
#include<linux/mmap_lock.h>
#include<linux/pid_namespace.h>

MODULE_AUTHOR("sky <sky@sky.com>");
MODULE_DESCRIPTION("sky's hack");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0.0");

staticint hack_pid = -1;

module_param_named(hack_pid, hack_pid, uint, S_IRUGO);
MODULE_PARM_DESC(hack_pid, "hack_pid");


intinit_module(void)
{
    printk(KERN_INFO "Hello sky_hack.\n");
    printk(KERN_INFO "hack pid %d\n", hack_pid);

    rcu_read_lock();

structpid * _pid_struct = find_vpid(hack_pid);
if (NULL == _pid_struct){

        printk("get pid struct failed.\n");
        rcu_read_unlock();
return-1;
    }

structtask_struct * _task_struct = get_pid_task(_pid_struct, PIDTYPE_PID);
if (NULL == _task_struct){

        printk("get task struct failed.\n");
        rcu_read_unlock();
return-1;
    }


structmm_struct * _mm_struct = get_task_mm(_task_struct);
if (NULL == _mm_struct){

        printk("get mm struct failed.\n");
        rcu_read_unlock();
return-1;
    }

    mmap_read_lock(_mm_struct);
if (_mm_struct->exe_file) {

char * pathname = kmalloc(PATH_MAX, GFP_ATOMIC);
if (pathname) {
char * p = d_path(&_mm_struct->exe_file->f_path, pathname, PATH_MAX);
/*Now you have the path name of exe in p*/
                    printk(KERN_INFO "process full path %s\n", p);
                }
                kfree(pathname);
    }
    mmap_read_unlock(_mm_struct);

structpid_namespace *pid_ns = task_active_pid_ns(_task_struct);
structtask_struct *reaper = pid_ns->child_reaper;

    printk(KERN_INFO "pid_ns->child_reaper=%x, current task_struct=%x\n", pid_ns->child_reaper, _task_struct);
    printk(KERN_INFO "is_child_subreaper %d\n", _task_struct->signal->is_child_subreaper);
    printk(KERN_INFO "has_child_subreaper %d\n", _task_struct->signal->has_child_subreaper);

//escape from a subreaper by do_exit()
    _task_struct->signal->has_child_subreaper = 0;
    rcu_read_unlock();

return0;
}

voidcleanup_module(void)
{
    printk(KERN_INFO "Goodbye sky_hack.\n");
}

  当前这个驱动的唯一目的就是把指定pid进程的has_child_subreaper改为0,这样就可以逃离subreaper。

  编译Makefile

obj-m += sky_hack.o
all:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

  下面我们再一次做上面的测试,运行a.out,查看a.out相关的进程树,然后运行sky_hack.ko hack_pid=‘a.out进程id’,等待一段时间后,当a.out退出后,再次查看a.out的相关进程树即可。

  运行a.out的输出:

  我们其实可以看到,按照上面我们的说明进行操作后,a.out第二次打印的ppid已经是1了,这意味着我们逃离subreaper成功了。

  下面我们看看insmod sky_hack.ko hack_pid=14749的输出:

  我们其实可以看到,在驱动里面我们打印了a.out进程的has_child_subreaper属性是1,因此我们在驱动中重置了它,导致了退出时,成功托孤给了init进程。

  下面我们看看这整个阶段中的进程树状况:

  这里的进程分布和上述开始的一样。

  我们看看逃离subreaper后:

  这里的进程分布就和最开始的不一样的,我们成功的将我们的子进程托孤给了init进程。





后记


  我们首先从一个其他问题,遇到了这个现象,然后我们深究了这个现象产生的原因,并且最终尝试设计出逃离这种现象的技术方案。这其中会涉及一些内核源码,驱动编写,同时加深了我们对subreaper的理解。经过这些过程后,我们对Linux内核,Linux的应用开发会有一个新的认知和理解。同时也增强了我们解决问题的综合能力。

参考文献

  • • 无



打赏、订阅、收藏、丢香蕉、硬币,请关注公众号

PS: 请尊重原创,不喜勿喷。

PS: 要转载请注明出处,本人版权所有。

PS: 有问题请留言,看到后我会第一时间回复。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-07 12:17:10 HTTP/2.0 GET : https://f.mffb.com.cn/a/471064.html
  2. 运行时间 : 0.242232s [ 吞吐率:4.13req/s ] 内存消耗:4,561.73kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=11031330b6de20fd89fd5f570523a240
  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.000885s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001821s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.005764s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000761s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001777s ]
  6. SELECT * FROM `set` [ RunTime:0.000805s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001882s ]
  8. SELECT * FROM `article` WHERE `id` = 471064 LIMIT 1 [ RunTime:0.003934s ]
  9. UPDATE `article` SET `lasttime` = 1770437830 WHERE `id` = 471064 [ RunTime:0.005847s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000718s ]
  11. SELECT * FROM `article` WHERE `id` < 471064 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001354s ]
  12. SELECT * FROM `article` WHERE `id` > 471064 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.016266s ]
  13. SELECT * FROM `article` WHERE `id` < 471064 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.003707s ]
  14. SELECT * FROM `article` WHERE `id` < 471064 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.013056s ]
  15. SELECT * FROM `article` WHERE `id` < 471064 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.003400s ]
0.249963s