Problem with INVARIANTS and WITNESS

M. Warner Losh imp at bsdimp.com
Tue Jun 22 15:14:15 UTC 2010


In message: <27670c29041b59dc0a95514c6a0b86d7.squirrel at webmail.equix.ee>
            "Ain Tepp" <freebsd at luftivennad.com> writes:
: I have added my working kernel conf following options:
: 
: options         INVARIANTS
: options         INVARIANT_SUPPORT
: options         WITNESS
: options         WITNESS_SKIPSPIN

These options have found a bug...

: mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0
: mx25l0: mx25ll128, sector 65536 bytes, 256 sectors
...
: panic: wrong offset 16773120 for sectorsize 65536

The tasting code is scheduling an I/O that isn't at a even 64k offset,
and geom is getting cranky.

: KDB: enter: panic
: [ thread pid 4 tid 100008 ]
: Stopped at      kdb_enter+0x50: lui     at,0x8140
: db> bt
: Tracing pid 4 tid 100008 td 0xc0c57540
: db_trace_thread+30 (?,?,?,?) ra 80055c70 sp c0bd7910 sz 24
: 80055b54+11c (0,?,ffffffff,?) ra 80055258 sp c0bd7928 sz 32
: 80054ec4+394 (?,?,?,?) ra 800553e8 sp c0bd7948 sz 168
: db_command_loop+78 (?,?,?,?) ra 80057ac8 sp c0bd79f0 sz 24
: 800579c0+108 (?,?,?,?) ra 80183400 sp c0bd7a08 sz 424
: kdb_trap+108 (?,?,?,?) ra 80304d70 sp c0bd7bb0 sz 32
: trap+d50 (?,?,?,?) ra 802fc6f0 sp c0bd7bd0 sz 168
: MipsKernGenException+134 (0,a,81579fe4,109) ra 80183688 sp c0bd7c78 sz 200
: kdb_enter+50 (?,?,?,?) ra 8014d6d4 sp c0bd7d40 sz 24
: panic+f8 (?,0,0,fff000) ra 800f7a3c sp c0bd7d58 sz 40
: g_io_request+118 (?,?,?,?) ra 800fa0c0 sp c0bd7d80 sz 72
: 800f9dcc+2f4 (?,?,?,?) ra 800f8274 sp c0bd7dc8 sz 48
: g_io_schedule_down+30c (?,?,?,?) ra 800f8d38 sp c0bd7df8 sz 72
: 800f8cc0+78 (?,?,?,?) ra 80125198 sp c0bd7e40 sz 24
: fork_exit+b0 (?,?,?,?) ra 80309670 sp c0bd7e58 sz 40
: fork_trampoline+10 (?,?,?,?) ra 0 sp c0bd7e80 sz 0
: pid 4

But unfortunately, I don't know anything from this traceback.  I need
to know who is calling g_io_schedule_down.  can you find the symbol
for address 0x800f8cc0?  I usually do this by approximately:

% setenv MAKEOBJDIRPREFIX /mumble  # the real one
% setenv TARGET mips
% make buildenv
$ nm /path/to/kernel | grep -i 800f8cc0

(so that I'm running the right nm).  I'm guessing it will be one of
the routines in goem...

Warner


More information about the freebsd-mips mailing list