ltrace killed by SIGTRAP
[Ltrace-devel] ltrace stucks with pthreads
Heiko Carstens heiko.carstens at de.ibm.com
Fri Apr 14 11:14:42 UTC 2006
- Previous message: [Ltrace-devel] ltrace stucks with pthreads
- Next message: [Ltrace-devel] ltrace stucks with pthreads
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> What am I doing wrong? Is there a hidden secret to use ltrace with threads? Any
> additional parameter to pass. Or any specific compilation switch to use?
You're doing nothing wrong, but came across a limitation of ltrace. ltrace is not able to trace threaded processes: If a process generates a thread
that shares the same address space (that is calling the "clone" system call with
parameters CLONE_VM, CLONE_THREAD) the traced process will die with SIGILL
(s390/s390x) or SIGTRAP (i386). The reason for this is that ltrace inserts breakpoints (illegal instructions)
into the traced thread's address space. This address space is shared between all
threads, but ltrace gets only notified for breakpoints of the first thread's
breakpoints. If the second thread reaches such a breakpoint the kernel notices
that this particular thread of the process is not traced and therefore sends it
a SIGILL signal (if a signal handler is present) or terminates it because of the
illegal instruction. Fixing ltrace to be able to trace threaded processes ain't easy. Additionaly
the follow-fork option of ltrace is also anything but perfect:
It attaches to the child when it is already running (or worst case: the child
already terminated). This could be fixed by using ptrace's PTRACE_SETOPTIONS
together with PTRACE_O_TRACEFORK. The only difficult thing would be to make
the changes in a way that ltrace still runs on older kernels that don't
support this ptrace interface (btw.: the latest man page release finally
documents all the different ptrace requests). 升级到
[root@localhost ~]# ltrace -V
ltrace version 0.5.
Copyright (C) 1997-2006 Juan Cespedes <cespedes@debian.org>.
This is free software; see the GNU General Public Licence
version 2 or later for copying conditions. There is NO warranty.
ltrace killed by SIGTRAP的更多相关文章
- #定位系统性能瓶颈# strace & ltrace
strace和ltrace分别相应的是系统调用和库函数调用, 系统调用实际上就是指最底层的一个调用,在linux程序设计里面就是底层调用的意思,面向的是硬件. 而库函数调用则面向的是应用开发的.相当于 ...
- ltrace命令详解
原文链接:https://ipcmen.com/ltrace 用来跟踪进程调用库函数的情况 补充说明 NAME ltrace - A library call tracer ltrace命 ...
- 安装lxml时gcc: internal compiler error: Killed (program cc1)的解决方法
在安装lxml时出现如下错误 gcc: internal compiler error: Killed (program cc1) 通过查看dmesg发现下述错误信息[2517343.500178] ...
- NPM install - killed error solution
在接手一个Node项目的时候,npm install.却出现了"killed"的错误.以为是Node版本的问题,熟练地切换了0.11与0.10版,同样无解. 由于新的npm版本吧, ...
- 线上mysql内存持续增长直至内存溢出被killed分析(已解决)
来新公司前,领导就说了,线上生产环境Mysql库经常会发生日间内存爆掉被killed的情况,结果来到这第一天,第一件事就是要根据线上服务器配置优化配置,同时必须找出现在mysql内存持续增加爆掉的原因 ...
- 锁_rac环境kill锁表会话后出现killed状态(解决)
原创作品,出自 "深蓝的blog" 博客,深蓝的blog:http://blog.csdn.net/huangyanlong/article/details/46876961 ra ...
- 阿里云linux服务器安装Phalcon-----"phalcon Volt directory can't be written" "gcc: internal compiler error: Killed (program cc1)"
这里特别蛋疼的一件事是官方英文文档和中文文档命令参数略有不同 中文文档: //通用平台下安装指定的软件包: sudo yum install git gcc make pcre-devel php-d ...
- 使用truss、strace或ltrace诊断软件的“疑难杂症”
简介 进程无法启动,软件运行速度突然变慢,程序的"Segment Fault"等等都是让每个Unix系统用户头痛的问题,本文通过三个实际案例演示如何使用truss.strace和l ...
- linux下的调试工具ltrace与strace
ltrace能够跟踪进程的库函数调用,它会显现出哪个库函数被调用,而strace则是跟踪程序的每个系统调用. 下面是一个ltrace与strace的对比 1)系统调用的输出对比 我们用输出he ...
随机推荐
- 目标识别:Bag-of-words表示图像
BOW (bag of words) 模型简介 Bag of words模型最初被用在文本分类中,将文档表示成特征矢量.它的基本思想是假定对于一个文本,忽略其词序和语法.句法,仅仅将其看做是一些词汇的 ...
- 基于ASP.NET的comet简单实现 http长连接,IAsyncResult
http://www.cnblogs.com/hanxianlong/archive/2010/04/27/1722018.html 我潜水很多年,今天忽然出现.很久没写过博客了,不是因为不想写,而是 ...
- [OJ] Wildcard Matching (Hard)
LintCode 192. Wildcard Matching (Hard) LeetCode 44. Wildcard Matching (Hard) 第二次刷还是被这题虐. 其实就是跪在一个地方, ...
- 正则 ?<= 和 ?= 用法
参考网址:http://baike.baidu.com/link?url=2zORJF9GOjU8AkmuHDLz9cyl9yiL68PdW3frayzLwWQhDvDEM51V_CcY_g1mZ7O ...
- linux进程间通信方式
(1)管道(Pipe):管道可用于具有亲缘关系进程间的通信,允许一个进程和另一个与它有共同祖先的进程之间进行通信. (2)命名管道(named pipe):命名管道克服了管道没有名字的限制,因此,除具 ...
- URAL1029. Ministry(DP+路径)
链接 路径麻烦啊 很多细节 倒回去搜一遍 卡了一节数据库.. #include <iostream> #include<cstdio> #include<cstring& ...
- Java Memory Management(1)
Java Memory Management, with its built-in garbage collection, is one of the language’s finest achiev ...
- 巧架个人BT服务器
BT的流行比之当年的江湖,传奇等的流行有过之而无不及.现在我们常说的话题是:“今天你BT了吗?”哇K!兄弟们你们怎么吐了?!假如你还不知道BT是什么,那似乎证明你已经到了归隐Internet的时候了, ...
- 年末促销 Windows Azure在线充值送微软商城硬件大礼包
春节前充值,尽享云端体验, 缤纷好礼持续进行时.即日起至2015年2月13日, 充值1000元以上即享好礼.您可以查阅WindowsAzure 官网活动页面,即刻参与活动:http://www.win ...
- 解决Dagger2和butterknife冲突
dagger2 和 RxJava butterknife 以及 Retrofit使用起来非常酸爽 代码非常干净清晰 动手尝试 配置编译 DaggerAppComponent的时候 出现问题 配置dag ...