Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Aug 2011 00:08:17 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        maestro something <maestro82@gmail.com>
Cc:        Kostik Belousov <kostikbel@gmail.com>, freebsd-stable@FreeBSD.org
Subject:   Re: dtrace ustack kernel panic
Message-ID:  <4E386741.5030801@FreeBSD.org>
In-Reply-To: <4E386636.2000507@FreeBSD.org>
References:  <CAJ_JOqvEmXBTBABhUcJ66=bh9%2B8S%2BC9v30hXxVZiCXuEpGPJ1A@mail.gmail.com> <4E2E9F60.1060808@FreeBSD.org> <CAJ_JOqszViwLi6TeQxAxeX2Mte5eBPsGJpjQPVOQs2BOwAq9JQ@mail.gmail.com> <4E33B7CF.90200@FreeBSD.org> <CAJ_JOqt4VdgJm3NnB1KUf1RFuk75nu6-Rh=Bqb53h5TAEzB0%2BA@mail.gmail.com> <4E344D15.1040508@FreeBSD.org> <CAJ_JOqvCDE1Zcv4jz14rtZu5_NmqfY04tz91uy76WnaW2trO7Q@mail.gmail.com> <CAJ_JOqu2SR2n1Cm__3x3rfcJpYY=ihnoE9oyuKeNmKGuUGgnGA@mail.gmail.com> <20110730192646.GC17489@deviant.kiev.zoral.com.ua> <CAJ_JOqtofEjt-jiZBiLKW--fY0sdiHvF36baS3Qxc8ubmQMazg@mail.gmail.com> <CAJ_JOqtsrOr7Uq0Jo-Mb8kKnucjUarJxKrgzNEbMxTcGP7OCAw@mail.gmail.com> <CAJ_JOqsWNDeh_2SW5cz1PDewALJoANhuW81d4TjxWSK1w=nAjw@mail.gmail.com> <4E386636.2000507@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 03/08/2011 00:03 Andriy Gapon said the following:
> I tried to run dtruss (as you did) and I got this pre-amble before the assertion:
> [some dtrace script body]
> : probe description proc:::exit does not match any probes
> 
> I guess that in my case I got it because my userland was not compiled with CTF
> support.  Not sure about yours...
> 
> Of course, it's still rather bad that dtrace crashes when it prematurely exits.
> But maybe it doesn't crash in the correct environment...  I don't know.

OK, here's a patch that should fix the abort via assertion - with this you
shouldn't get the crash that you've reported.

I hope that you will be able to tackle other conditions that dtrace considers to
be errors.

diff --git a/lib/libproc/proc_create.c b/lib/libproc/proc_create.c
index c372a47..9bd24a2 100644
--- a/lib/libproc/proc_create.c
+++ b/lib/libproc/proc_create.c
@@ -79,12 +79,11 @@ proc_attach(pid_t pid, int flags, struct proc_handle **pphdl)
 	else
 		phdl->status = PS_STOP;

+out:
 	if (error)
 		proc_free(phdl);
 	else
 		*pphdl = phdl;
-out:
-	proc_free(phdl);
 	return (error);
 }



-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E386741.5030801>