linux core dump debug

1.check core dump;

ulimit -c
or
ulimit -a
[email protected]:~$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 31156
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 31156
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

2.set

[email protected]:~$ ulimit -c unlimited
[email protected]-ubuntu:~$ ulimit -c
unlimited
[email protected]-ubuntu:~$ ulimit -c 1024
[email protected]-ubuntu:~$ ulimit -c
1024

$ulimit -c unlimited  (只对当前shell进程有效)
或在~/.bashrc 的最后加入: ulimit -c unlimited (一劳永逸)

3.gdb with core

re:

1.https://www.cnblogs.com/bodhitree/p/5850212.html

原文地址:https://www.cnblogs.com/happyamyhope/p/9550638.html

时间: 2024-08-04 20:19:52

linux core dump debug的相关文章

Linux core dump file详解

Linux core dump file详解 http://www.cnblogs.com/langqi250/archive/2013/03/05/2944931.html

Segment fault及LINUX core dump详解

源自:http://andyniu.iteye.com/blog/1965571 core dump的概念: A core dump is the recorded state of the working memory of a computer program at a specific time, generally when the program has terminated abnormally (crashed). In practice, other key pieces of

Linux core dump 分析及相关调试

core是core dump文件,是linux服务器的一种机制.core是个程序的严重问题,会致使程序直接挂掉,需要恢复. 需要注意的东西 在程序挂掉的过程中,会纪录程序的内存信息和cpu调用堆栈信息,当程序占用大量内存的时候,比如40G,那core文件可能会达到60G多,那写文件会持续数十分钟,这么长时间流量都会损失,并且写大文件对wio的占用特别大,严重影响本台服务器的其他服务,对于在线服务,会用很多超时,或者严重的是一段时间无法提供服务.所以,core文件监控,大小控制也很重要. 产生的原

Segment fault及LINUX core dump详解 (zz)

C 程序在进行中发生segment fault(core dump)错误,通常与内存操作不当有关,主要有以下几种情况: (1)数组越界. (2)修改了只读内存. (3)scanf("%d",n),n不是指针. …… 1. 前言: 有的程序可以通过编译, 但在运行时会出现Segment fault(段错误). 这通常都是指针错误引起的. 但这不像编译错误一样会提示到文件->行, 而是没有任何信息, 使得我们的调试变得困难起来. 2. gdb: 有一种办法是, 我们用gdb的step

LINUX core dump详解(转)

转自:http://blog.163.com/[email protected]/blog/static/8442751200710255441327/ 1. 前言: 有的程序可以通过编译, 但在运行时会出现Segment fault(段错误). 这通常都是指针错误引起的. 但这不像编译错误一样会提示到文件->行, 而是没有任何信息, 使得我们的调试变得困难起来.2. gdb: 有一种办法是, 我们用gdb的step, 一步一步寻找. 这放在短小的代码中是可行的, 但要让你step一个上万行的代

linux core dump

core dump  调试: gdb  + 可执行文件名  + core dump 文件 gdb   Searcher    core.8159 bt 查看 原文地址:https://www.cnblogs.com/xinping-study/p/11757476.html

Linux core dump文件生成与使用

一.说明 在前一家公司经常测出一些缓冲区溢出导致进程挂掉的问题,开发经常要求在调试模式进行测试,生成core文件给他们定位问题. 当时的调试模式启动只是修改某些配置文件重新启动即可,所以在很长一段时间内并不知道到底要如何生成core文件及core文件如何使用. 二.配置允许生成core文件 临时配置使用ulimit命令进行操作即可: # 查看当前用户core文件配置情况 # 0表示允许core文件大小为0,亦即不允许生成 ulimit -c # 限制core文件大小 # 禁止生成core文件 u

How to: Enable/Generate/Debug Core Dump In Linux?

http://www.itsprite.com/how-to-enablegeneratedebug-core-dump-in-linux/ What is Core Dump? If the running programs were terminated abnormal or crashed, the memory status ot the program will be recored by OS and saved in a file, this file is called “Co

linux下生成core dump文件方法及设置

core dump的概念: A core dump is the recorded state of the working memory of a computer program at a specific time, generally when the program has terminated abnormally (crashed). In practice, other key pieces of program state are usually dumped at the s