Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jun 2009 07:49:16 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        Menshikov Konstantin <kostjn@peterhost.ru>
Subject:   Re: Inline function (difficult  debug)
Message-ID:  <200906040749.17206.jhb@freebsd.org>
In-Reply-To: <4A2792B7.5010006@peterhost.ru>
References:  <4A2792B7.5010006@peterhost.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 04 June 2009 5:24:07 am Menshikov Konstantin wrote:
> Hi.
> My system FreeBSD 7.1 RELEASE periodically freeze.
>=20
> I`m compiling kernel with WITNESS and get backtrace.
>=20
> #0 doadump () at pcpu.h:195
> #1 0xffffffff801a899c in db_fncall (dummy1=3DVariable "dummy1" is not=20
> available.
> ) at /usr/src/sys/ddb/db_command.c:516
> #2 0xffffffff801a8ecf in db_command (last_cmdp=3D0xffffffff80825688,=20
> cmd_table=3D0x0, dopager=3D1)
> at /usr/src/sys/ddb/db_command.c:413
> #3 0xffffffff801a90e0 in db_command_loop () at=20
> /usr/src/sys/ddb/db_command.c:466
> #4 0xffffffff801aaa19 in db_trap (type=3DVariable "type" is not available.
> ) at /usr/src/sys/ddb/db_main.c:228
> #5 0xffffffff803d5e55 in kdb_trap (type=3D3, code=3D0,=20
> tf=3D0xffffffffabf284c0) at /usr/src/sys/kern/subr_kdb.c:524
> #6 0xffffffff8059a0e5 in trap (frame=3D0xffffffffabf284c0) at=20
> /usr/src/sys/amd64/amd64/trap.c:538
> #7 0xffffffff8057f60e in calltrap () at=20
> /usr/src/sys/amd64/amd64/exception.S:209
> #8 0xffffffff803d602d in kdb_enter_why (why=3D0xffffffff80628137=20
> "witness", msg=3D0xa <Address 0xa out of bounds>)
> at cpufunc.h:63
> #9 0xffffffff803e70c3 in witness_checkorder (lock=3DVariable "lock" is no=
t=20
> available.
> ) at /usr/src/sys/kern/subr_witness.c:1126
> #10 0xffffffff8039e341 in _mtx_lock_spin_flags (m=3D0xffffffff8084fad0,=20
> opts=3D0, file=3Ddwarf2_read_address: Corrupted DWARF expression.
> ) at /usr/src/sys/kern/kern_mutex.c:227
> #11 0xffffffff80319838 in sc_puts (scp=3D0xffffffff8084f980,=20
> buf=3D0xffffffffabf286a7 "a@\az\200=D0=AA=D0=AA=D0=AA=D0=AA", len=3D1)
> at /usr/src/sys/dev/syscons/syscons.c:2519
> #12 0xffffffff8031b3da in sc_cnputc (cd=3DVariable "cd" is not available.
> ) at /usr/src/sys/dev/syscons/syscons.c:1561
> #13 0xffffffff803f9d89 in cnputc (c=3D97) at /usr/src/sys/kern/tty_cons.c=
:632
> #14 0xffffffff803d993b in putchar (c=3D97, arg=3DVariable "arg" is not=20
> available.
> ) at /usr/src/sys/kern/subr_prf.c:421
> #15 0xffffffff803d7f22 in kvprintf (fmt=3D0xffffffff80628b89 "cquiring=20
> duplicate lock of same type: \"%s\"\n",
> func=3D0xffffffff803d98d0 <putchar>, arg=3D0xffffffffabf28890, radix=3D10=
,=20
> ap=3DVariable "ap" is not available.
> ) at /usr/src/sys/kern/subr_prf.c:674
> #16 0xffffffff803d9384 in printf (fmt=3DVariable "fmt" is not available.
> ) at /usr/src/sys/kern/subr_prf.c:314
> #17 0xffffffff803e705d in witness_checkorder (lock=3D0xffffffff808668f8,=
=20
> flags=3D0,
> file=3D0xffffffff80626cf8 "/usr/src/sys/kern/subr_sleepqueue.c", line=3D2=
32)=20
> at /usr/src/sys/kern/subr_witness.c:948
> #18 0xffffffff8039e341 in _mtx_lock_spin_flags (m=3D0xffffffff808668f8,=20
> opts=3D0, file=3Ddwarf2_read_address: Corrupted DWARF expression.
> ) at /usr/src/sys/kern/kern_mutex.c:227
> #19 0xffffffff803b2271 in wakeup (ident=3D0xffffffff80850ac0) at=20
> /usr/src/sys/kern/kern_synch.c:341
> #20 0xffffffff803aed95 in tdsignal (p=3D0xffffff00017978f0,=20
> td=3D0xffffff000146a6e0, sig=3D14, ksi=3DVariable "ksi" is not available.
> )
> at /usr/src/sys/kern/kern_sig.c:2292
> #21 0xffffffff803ba2de in realitexpire (arg=3DVariable "arg" is not avail=
able.
> ) at /usr/src/sys/kern/kern_time.c:669
> #22 0xffffffff803bbe1a in softclock (dummy=3DVariable "dummy" is not=20
> available.
> ) at /usr/src/sys/kern/kern_timeout.c:274
> #23 0xffffffff8038c120 in ithread_loop (arg=3D0xffffff00010ebc00) at=20
> /usr/src/sys/kern/kern_intr.c:1088
> #24 0xffffffff8038978a in fork_exit (callout=3D0xffffffff8038c040=20
> <ithread_loop>, arg=3D0xffffff00010ebc00,
> frame=3D0xffffffffabf28c80) at /usr/src/sys/kern/kern_fork.c:804
> #25 0xffffffff8057f9de in fork_trampoline () at=20
> /usr/src/sys/amd64/amd64/exception.S:455
>=20
> But file /usr/src/sys/kern/kern_sig.c:2292
> hasn`t run function wake up on string 2292
> I`m think, what compiler use inline function, therefore code and trace=20
> differ.
> Tell me please, how compile kernel without any inline function.

makeoptions DEBUG=3D"-g -fno-inline"

However. I think you already have enough information to debug this.  Can yo=
u=20
go to frame 17 and do an 'l'?  I think the two things you want to print out=
=20
are "i", "*lock", "*lock1", and "*lock2".

=2D-=20
John Baldwin



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