计算机工程与应用 ›› 2019, Vol. 55 ›› Issue (6): 57-66.DOI: 10.3778/j.issn.1002-8331.1805-0105

• 理论与研发 • 上一篇    下一篇

Linux系统调用跟踪和进程错误退出分析

毛英明1,陆慧梅1,向  勇2   

  1. 1.北京理工大学 计算机学院,北京 100081
    2.清华大学 计算机科学与技术系,北京 100084
  • 出版日期:2019-03-15 发布日期:2019-03-14

Linux Syscall Trace and Process Error Exit Analysis

MAO Yingming1, LU Huimei1 , XIANG Yong2   

  1. 1.School of Computer Science and Technology, Beijing Institute of Technology, Beijing 100081, China
    2.Department of Computer Science and Technology, Tsinghua University, Beijing 100084, China
  • Online:2019-03-15 Published:2019-03-14

摘要: 现有的Linux系统调用跟踪工具存在跟踪上下文信息不全、无法高效地对通过网络通信的多进程应用程序进行跟踪以及跟踪结果缺少图形化展现的问题。通过扩展Linux系统调用跟踪工具strace,实现了启发式跟踪工具heuristic-strace,其能够实时发现和自动跟踪应用程序中通过网络通信的进程,形成进程创建关系图、进程网络通信关系图,并结合系统调用的栈回溯信息,定位进程的错误退出原因。实验结果表明,此工具对能对典型的GUI和网络应用软件进行跟踪,引入的性能开销比较低,并能保证被跟踪软件的正常交互。

关键词: Linux系统调用, 启发式跟踪, 网络通信, 进程错误退出分析

Abstract: The existing Linux syscall tracing tools can’t effectively trace multi process applications that communicate with other processes through network. The tracing result’s context information is incomplete and lacks of graphical display. So a new tracing tool named heuristic-strace is designed based on the existing syscall tracing tool strace. It can automatically find and trace the processes that communicate through network. Moreover, it can display the tracing result in the form of process creation graph and network communication graph. Combined with the stack trace info, it can locate the process error exit reason. The experimental results show that this tool can trace typical GUI and network applications with lower performance overhead and ensure normal interact with the traced software.

Key words: Linux syscall, heuristic trace, network communication, process error exit analysis