kern/145434: Kernel messages about processes don't include Jail
David E. Cross
dcross at okcupid.com
Tue Apr 6 14:50:05 UTC 2010
>Synopsis: Kernel messages about processes don't include Jail Identifier
>Arrival-Date: Tue Apr 06 14:50:04 UTC 2010
>Originator: David E. Cross
Humor Rainbow Inc.
FreeBSD foo.bar.baz 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Mon Apr 5 14:42:00 EDT 2010 root at foo.bar.baz:/usr/obj/usr/src/sys/GENERIC amd64
Processes which exit abnormally display a kernel message to this effect that includes some basic information about the process. Its PID, its UID, its name.
On a machine with a lot of jails, this information can be essentially useless.
Consider a webhost with 50 jails serving PHP via fastcgi and one is crashing, its near impossible to track it down with just the information as currently provided.
Try to trace down a coredump on a machine with lots of jails
Apply the included patch.
Patch attached with submission follows:
--- sys/kern/kern_sig.c.orig 2009-10-24 21:10:29.000000000 -0400
+++ sys/kern/kern_sig.c 2010-04-06 10:44:42.000000000 -0400
@@ -57,6 +57,8 @@
@@ -2733,8 +2735,9 @@
sig |= WCOREFLAG;
- "pid %d (%s), uid %d: exited on signal %d%s\n",
+ "pid %d (%s), jid %d, uid %d: exited on signal %d%s\n",
+ (td->td_ucred && td->td_ucred->cr_prison) ? td->td_ucred->cr_prison->pr_id : 0,
td->td_ucred ? td->td_ucred->cr_uid : -1,
sig &~ WCOREFLAG,
sig & WCOREFLAG ? " (core dumped)" : "");
More information about the freebsd-bugs