RELENG_7 core dump (sgread)

Oleg Lomaka oleg.lomaka at gmail.com
Tue Nov 13 00:21:09 PST 2007


Hello,

I do not had casual kernel crashes for last week. Thanks a lot Scott.
Anyway I got crashes when plug in USB HDD on working kernel. I believe 
this is issue you know about, but just in case here is trace of this 
trap. If it is not known issue, i can e-mail you more info. Thanks again.

Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x18
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc04d6472
stack pointer           = 0x28:0xe74c4abc
frame pointer           = 0x28:0xe74c4ad4
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = resume, IOPL = 0
current process         = 1320 (hald-probe-storage)
trap number             = 12
panic: page fault

(kgdb) bt
#0  doadump () at pcpu.h:195
#1  0xc04aab63 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409
#2  0xc04aad2c in panic (fmt=Variable "fmt" is not available.
) at /usr/src/sys/kern/kern_shutdown.c:563
#3  0xc0688ef3 in trap_fatal (frame=0xe74c4a7c, eva=24) at 
/usr/src/sys/i386/i386/trap.c:872
#4  0xc068972a in trap (frame=0xe74c4a7c) at 
/usr/src/sys/i386/i386/trap.c:277
#5  0xc0673cbb in calltrap () at /usr/src/sys/i386/i386/exception.s:139
#6  0xc04d6472 in turnstile_broadcast (ts=0x0, queue=0) at 
/usr/src/sys/kern/subr_turnstile.c:834
#7  0xc04a0ac2 in _mtx_unlock_sleep (m=0xc0723e30, opts=0, 
file=0xc06b0353 "/usr/src/sys/kern/kern_mutex.c",
    line=158) at /usr/src/sys/kern/kern_mutex.c:593
#8  0xc04a0b41 in _mtx_unlock_flags (m=0xc0723e30, opts=0, 
file=0xc06b0353 "/usr/src/sys/kern/kern_mutex.c",
    line=158) at /usr/src/sys/kern/kern_mutex.c:210
#9  0xc04a0b79 in unlock_mtx (lock=0xc0723e30) at 
/usr/src/sys/kern/kern_mutex.c:158
#10 0xc04b1f1b in _sleep (ident=0xc44cc40c, lock=0xc0723e30, 
priority=256, wmesg=0xc08c57ca "sgread", timo=0)
    at /usr/src/sys/kern/kern_synch.c:187
#11 0xc08bb06b in sgread (dev=0xc4db6100, uio=0xe74c4c60, ioflag=0)
    at /usr/src/sys/modules/cam/../../cam/scsi/scsi_sg.c:798
#12 0xc047ef38 in giant_read (dev=0xc4db6100, uio=0xe74c4c60, ioflag=0) 
at /usr/src/sys/kern/kern_conf.c:361
#13 0xc0464621 in devfs_read_f (fp=0xc5432d38, uio=0xe74c4c60, 
cred=0xc437c800, flags=0, td=0xc50cc000)
    at /usr/src/sys/fs/devfs/devfs_vnops.c:880
#14 0xc04d9b26 in dofileread (td=0xc50cc000, fd=4, fp=0xc5432d38, 
auio=0xe74c4c60, offset=-1, flags=0) at file.h:242
#15 0xc04d9e98 in kern_readv (td=0xc50cc000, fd=4, auio=0xe74c4c60) at 
/usr/src/sys/kern/sys_generic.c:192
#16 0xc04d9f7f in read (td=0xc50cc000, uap=0xe74c4cfc) at 
/usr/src/sys/kern/sys_generic.c:108
#17 0xc06893a3 in syscall (frame=0xe74c4d38) at 
/usr/src/sys/i386/i386/trap.c:1008
#18 0xc0673d20 in Xint0x80_syscall () at 
/usr/src/sys/i386/i386/exception.s:196
#19 0x00000033 in ?? ()
Previous frame inner to this frame (corrupt stack?)

Uptime: 27m30s

(kgdb) frame 11
#11 0xc08bb06b in sgread (dev=0xc4db6100, uio=0xe74c4c60, ioflag=0)
    at /usr/src/sys/modules/cam/../../cam/scsi/scsi_sg.c:798
798                     if (msleep(&sc->rdwr_done, periph->sim->mtx, 
PCATCH, "sgread",
(kgdb) info locals
sc = (struct sg_softc *) 0xc44cc400
rdwr = (struct sg_rdwr *) 0x0
hstat = Variable "hstat" is not available.


Scott Long wrote:
> Oleg Lomaka wrote:
>> I'm sorry for a long delay.
>> Kernel failed to compile after patch.
>> I've got more info about crash. It looks like it happening when I 
>> plug in USB HDD. In some cases I can plug it in and make mount, in 
>> some cases I just plug it in, and core dumps.
>>
>
> Sorry about the typo, take the same patch and change the "sc" on line 
> 366 to "softc".
>
> Panic due to USB drive insertion and removal are unfortunately expected
> right now.  I'm looking into it.  However, please do test the sg patch;
> the panic that you originally reported is not related to the known 
> problems with USB.
>
> Scott



More information about the freebsd-scsi mailing list