Unix Programming - core dump name of pthreaded program

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > February 2006 > core dump name of pthreaded program





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author core dump name of pthreaded program
Tadek Dragowski

2006-02-13, 2:52 am

Hello,
When pthreaded program crashes it produces a core dump (providing core
dumps are enabled via ulimit -c) with pid extension no matter what is
the setting of /proc/sys/kernel/core_uses_pid. Non-pthreaded program
core dump extension correctly omits/appends pid based on core_uses_pid
value.

If crashing pthreaded program is automatically respawned it could chew
up disk space very quickly, since pthreaded core dumps are huge (in my
case 250Mb each). So I would like to keep only one core dump per
program.

I am using Linux pthread library (kernel 2.6.9)

My question is there another way to suppress appending pid to core dump
file name in pthreaded program.

Regards

Nils O. SelÄsdal

2006-02-14, 5:54 pm

Tadek Dragowski wrote:
> Hello,
> When pthreaded program crashes it produces a core dump (providing core
> dumps are enabled via ulimit -c) with pid extension no matter what is
> the setting of /proc/sys/kernel/core_uses_pid. Non-pthreaded program
> core dump extension correctly omits/appends pid based on core_uses_pid
> value.

Sounds like you should report this as a bug.

> If crashing pthreaded program is automatically respawned it could chew
> up disk space very quickly, since pthreaded core dumps are huge (in my
> case 250Mb each). So I would like to keep only one core dump per
> program.


As a workaround, have your respawning remove the core file.


tad.dragowski@gmail.com

2006-02-14, 9:06 pm

As a work around I added a script run by crontab, which keeps only one
copy of the core dump, which allows be to debug original problem.
Actually your idea of cleaning up after respawning is even better - I
will keep the latest core-dump for the program and delete older one.
Thank you for your input.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com