[RFC][PATCH 0/3] Utrace based non-disruptive application core dumps - V1

Ananth N Mavinakayanahalli ananth at in.ibm.com
Thu Jul 30 09:55:14 UTC 2009


This series is an RFC for utrace-based non-disruptive application core
dumper. Per Roland McGrath, this is possibly one of the common use-cases
for utrace.

This is the first foray of mine into the hairy core dump land.
Admittedly, I may have missed some (not so) subtle issues that need
careful consideration.

The current implementation uses a /proc trigger. Every process gains a new
/proc/<pid>/gen_core 'write-only' file. Echoing a value of '1' will
cause the core-dump to be generated. As with fatal core-dumps, the core
file will be saved in the same directory as the location from where the
application was started. The core dump has a format core.<pid>.<timestamp>,
where the timestamp is the value of ktime_get() at the time of calling
the binfmt->core_dump().

The current implementation uses a completion(). However, this precludes
the possibility of a process syncrhonously asking for its own dump
(trying this usecase causes the application to hang indefinitely). I am
told this is a much needed feature that Linux lacks.

Awaiting comments...

Regards,
Ananth




More information about the utrace-devel mailing list