Giter VIP home page Giter VIP logo

user_stack_backstrace-in-kernel's Introduction

#内核对异常应用栈回溯基本方法

1 将 user_stack_unwind.c 编译进内核

2 内核对应用段错误栈回溯实现方法:arm64架构,在 do_page_fault->__do_user_fault 函数中,添加 user_stack_backstrace(regs,current)。mips架构,do_page_fault 函数,if (user_mode(regs))分支里添加,user_stack_backstrace(regs,current)。

3 内核对应用double free 问题栈回溯实现方法: do_send_specific() 函数最后添加,if(SIGABRT == sig) user_stack_backstrace(task_pt_regs(current),current)。arm64架构对double free问题能完整栈回溯,mips架构由于栈回溯原理问题,栈回溯过程会出错返回。

其他应用,内核对应用进程栈回溯,对偶然出现的进程锁死、卡死、cpu使用率高等问题,在内核里打印该进程的函数调用栈,对排查这些问题很有帮助

user_stack_backstrace-in-kernel's People

Contributors

dongzhiyan-stack avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.