--VrqPEDrXMn8OVzN4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jul 01, 2005 at 04:40:21PM +0200, Marc Olzheim wrote:
> On Fri, Jul 01, 2005 at 01:21:04PM +0000, Peter Edwards wrote:
> > The following patch is making my debugging a much more productive
> > experience.

>=20
> login: panic: ktrace: no trace vnode
> cpuid =3D 1
> KDB: stack backtrace:
> kdb_backtrace(100,c6c0b000,c65e08d4,c5d4ae80,c6c0b 000) at 0xc053efa9 =3D =

kdb_backtrace+0x29
> panic(c06bec25,8,2,c717e180,ec519cd8) at 0xc0529174 =3D panic+0x114
> ktr_getrequest(1,0,c6c0b000,c65e08d4,ec519d30) at 0xc051aa7b =3D ktr_getr=

equest+0xf3
> ktrsyscall(bd,2,ec519d04) at 0xc051ad7f =3D ktrsyscall+0x3b
> syscall(2f,2f,2f,280ee000,0) at 0xc0680329 =3D syscall+0x155
> Xint0x80_syscall() at 0xc066fcff =3D Xint0x80_syscall+0x1f
> --- syscall (189, FreeBSD ELF32, fstat), eip =3D 0x280cea23, esp =3D 0xbf=

bfe9f0, ebp =3D 0xbfbfea8c ---
> boot() called on cpu#0
> Uptime: 17m39s
> Dumping 3967 MB
> 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 256 272 288 304 32=

0 336 352 368 384 400 416 432 448 464 480 496 512 528 544 560 576 592 608 6=
24 640 656 672 688 704 720 736 752 768 784 800 816 832 848 864 880 896 912 =
928 944 960 976 992 1008 1024 1040 1056 1072 1088 1104 1120 1136 1152 1168 =
1184 1200 1216 ...

This was with the sysctl set to 1 of course.

(kgdb) fra 3
#3 0xc051aa7b in ktr_getrequest (type=3D1)
at /usr/src/sys/kern/kern_ktrace.c:249
249 KASSERT(p->p_tracevp !=3D NULL, ("ktrace: no trace =
vnode"));
(kgdb) l
244 req->ktr_header.ktr_type =3D type;
245 if (p->p_traceflag & KTRFAC_DROP) {
246 req->ktr_header.ktr_type |=3D KTR_DROP;
247 p->p_traceflag &=3D ~KTRFAC_DROP;
248 }
249 KASSERT(p->p_tracevp !=3D NULL, ("ktrace: no trace =
vnode"));
250 KASSERT(p->p_tracecred !=3D NULL, ("ktrace: no trac=
e cred"));
251 req->ktr_vp =3D p->p_tracevp;
252 VREF(p->p_tracevp);
253 req->ktr_cred =3D crhold(p->p_tracecred);
(kgdb) info locals
req =3D (struct ktr_request *) 0xc5d4ae80
td =3D (struct thread *) 0xc6c0b000
p =3D (struct proc *) 0xc65e08d4
pm =3D -966915884
(kgdb) info registers=20
eax 0x0 0
ecx 0x0 0
edx 0x0 0
ebx 0xc65e08d4 -966915884
esp 0xec519cb0 0xec519cb0
ebp 0xec519cc0 0xec519cc0
esi 0xc5d4ae80 -975917440
edi 0xc6c0b000 -960450560
eip 0xc051aa7b 0xc051aa7b
eflags 0x0 0
cs 0x0 0
ss 0x0 0
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(kgdb) p *p
$1 =3D {p_list =3D {le_next =3D 0xc728f710, le_prev =3D 0xc6bcc1c4}, p_kseg=
rps =3D {
tqh_first =3D 0xc5fc3e00, tqh_last =3D 0xc5fc3e04}, p_threads =3D {
tqh_first =3D 0xc6c0b000, tqh_last =3D 0xc6c0b008}, p_suspended =3D {
tqh_first =3D 0x0, tqh_last =3D 0xc65e08ec}, p_ucred =3D 0xc6354e80,=20
p_fd =3D 0xc6ebbb00, p_fdtol =3D 0x0, p_stats =3D 0xc65d9000,=20
p_limit =3D 0xc5d0d000, p_unused1 =3D 0x0, p_sigacts =3D 0xc6bfb000,=20
p_flag =3D 16386, p_sflag =3D 1, p_state =3D PRS_NORMAL, p_pid =3D 5780, =
p_hash =3D {
le_next =3D 0x0, le_prev =3D 0xc563aa50}, p_pglist =3D {le_next =3D 0xc=
7240388,=20
le_prev =3D 0xc65fa3dc}, p_pptr =3D 0xc65fa388, p_sibling =3D {le_next =
=3D 0x0,=20
le_prev =3D 0xc65fa3f0}, p_children =3D {lh_first =3D 0x0}, p_mtx =3D {
mtx_object =3D {lo_class =3D 0xc06fca7c, lo_name =3D 0xc06c0315 "proces=
s lock",=20
lo_type =3D 0xc06c0315 "process lock", lo_flags =3D 4390912, lo_list =
=3D {
tqe_next =3D 0x0, tqe_prev =3D 0x0}, lo_witness =3D 0x0}, mtx_lock =
=3D 4,=20
mtx_recurse =3D 0}, p_oppid =3D 0, p_vmspace =3D 0xc6a46a8c, p_swtime =
=3D 20,=20
p_realtimer =3D {it_interval =3D {tv_sec =3D 0, tv_usec =3D 0}, it_value =
=3D {
tv_sec =3D 0, tv_usec =3D 0}}, p_runtime =3D {sec =3D 0,=20
frac =3D 12428108932415044484}, p_uu =3D 0, p_su =3D 0, p_iu =3D 0, p_u=
ticks =3D 0,=20
p_sticks =3D 40187, p_iticks =3D 0, p_profthreads =3D 0, p_maxthrwaits =
=3D 0,=20
p_traceflag =3D 0, p_tracevp =3D 0x0, p_tracecred =3D 0x0, p_textvp =3D 0=
xc69e6b58,=20
p_siglist =3D {__bits =3D {0, 0, 0, 0}}, p_lock =3D 0 '\0', p_sigiolst =
=3D {
slh_first =3D 0x0}, p_sigparent =3D 20, p_sig =3D 0, p_code =3D 0, p_st=
ops =3D 0,=20
p_stype =3D 0, p_step =3D 0 '\0', p_pfsflags =3D 0 '\0', p_nlminfo =3D 0x=
0,=20
p_aioinfo =3D 0x0, p_singlethread =3D 0x0, p_suspcount =3D 0, p_xthread =
=3D 0x0,=20
p_boundary_count =3D 0, p_magic =3D 3203398350,=20
p_comm =3D "patgen", '\0' , p_pgrp =3D 0xc7658200,=20
p_sysent =3D 0xc07153c0, p_args =3D 0xc711eb80,=20
p_cpulimit =3D 9223372036854775807, p_nice =3D 0 '\0', p_xstat =3D 0, p_k=
list =3D {
kl_lock =3D 0xc65e0940, kl_list =3D {slh_first =3D 0x0}}, p_numthreads =
=3D 1,=20
p_numksegrps =3D 1, p_md =3D {md_ldt =3D 0x0}, p_itcallout =3D {c_links =
=3D {sle =3D {
sle_next =3D 0x0}, tqe =3D {tqe_next =3D 0x0, tqe_prev =3D 0x0}}, c=
_time =3D 0,=20
c_arg =3D 0x0, c_func =3D 0, c_flags =3D 8}, p_unused2 =3D 0x0, p_acfla=
g =3D 0,=20
p_ru =3D 0x0, p_peers =3D 0x0, p_leader =3D 0xc65e08d4, p_emuldata =3D 0x=
0,=20
p_label =3D 0x0, p_sched =3D 0xc65e0a98}
(kgdb)=20

If you need any more info, just ask.

Marc

--VrqPEDrXMn8OVzN4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQFCxVjwezjnobFOgrERAol1AKDFdUTeuc2Kt+WxWjSpJU VwMryI3gCgx7RG
/2lN7REMMd8PgfSpJYsmBkk=
=IFUg
-----END PGP SIGNATURE-----

--VrqPEDrXMn8OVzN4--