Home > OS >  Linux core file size does not accord with taking up space, do you have to know why the great god
Linux core file size does not accord with taking up space, do you have to know why the great god

Time:10-05

1. The program run on board a Segmentation fault Segmentation fault (core dumped)

2. Want to try the GDB on core File but error: the core ": not in the executable format: the File format is not recognized

3. Check the size of the core file and take up space, find core222M ls, but take up the space is 448 k, this is not consistent,

` ` `
 ls -l: 
Rw -- -- -- -- -- -- -- 1 root root 222552064 Jul 17 2019 core
Du - ah:
448.0 K core

` ` `
4. The ulimit - a view are normal
` ` `
 # ulimit -a 
- f: file size (blocks) unlimited
- t: CPU time (seconds) unlimited
- d: data seg size (KB) unlimited
-s: stack size (KB) unlimited
- c: the core file size (blocks) unlimited
- m: resident set size (KB) unlimited
- l: locked memory (KB) unlimited
P: 2839
the processes1024 - n: file descriptors
- v: address space (KB) unlimited
- w: locks unlimited
E: the scheduling priority 0
- r: real - time priority 0

` ` `
5. Do you have to know why the great god

CodePudding user response:

Period of mistakes, hang dead program, to generate the core files at this time, because the core file more than 200 m, the Linux kernel core is generated over a period of time, the program after death to wait for a short period of time to check the core file, otherwise the core did not generate complete, the information is not complete,

CodePudding user response:

End this post, the problem has been solved,

CodePudding user response:

reference 1st floor zhgure response:
after a period of mistakes, hang dead program, to generate the core files at this time, because the core file more than 200 m, the Linux kernel core is generated over a period of time, the program after death to wait for a short period of time to check the core file, otherwise the core does not generate complete, information is not complete,

Thank you very much for your answer, I also think so at the beginning, but wait for a period of time the core or size and take up the space or not
, and then I test a small bug program, found that the size of the core and take up the space is different also, but the GDB can normal open core
  • Related