GENERIC HEAD from Dec 22 11:17 UTC, vmcore.190

GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2007 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.0-CURRENT #0: Sun Dec 23 17:52:28 CET 2007
    pho@crashbox.osted.lan:/usr/src/sys/i386/compile/PHO
WARNING: WITNESS option enabled, expect reduced performance.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) XEON(TM) CPU 1.80GHz (1799.80-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf24  Stepping = 4
  Features=0x3febfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM>
  Logical CPUs per core: 2
real memory  = 1073676288 (1023 MB)
avail memory = 1036521472 (988 MB)
:
Trying to mount root from ufs:/dev/ad0s1a
WARNING: / was not properly dismounted
fxp0: link state changed to UP


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x668c02d6
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc0a741eb
stack pointer           = 0x28:0xe6aabab8
frame pointer           = 0x28:0xe6aabb24
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 9789 (syscall)
[thread pid 9789 tid 100131 ]
Stopped at      copystr+0x13:   lodsb   (%esi)
db> bt
Tracing pid 9789 tid 100131 td 0xc4a5ccc0
copystr(e6aabba4,0,f0,c0c75380,c0b03bef,...) at copystr+0x13
kern_stat(c4a5ccc0,668c02d6,1,e6aabc14,0,...) at kern_stat+0x3d
linux_stat(c4a5ccc0,e6aabcfc,e6aabcf8,e6aabd1c,c4aa4570,...) at linux_stat+0x32
syscall(e6aabd38) at syscall+0x2b3
Xint0x80_syscall() at Xint0x80_syscall+0x20
--- syscall (18, Linux ELF, linux_stat), eip = 0x28126b32, esp = 0xbfbfeb4c, ebp = 0xbfbfebb8 ---
db> set $lines 0
db> show allpcpu
Current CPU: 3

cpuid        = 0
curthread    = 0xc3f0f440: pid 11 "idle: cpu0"
curpcb       = 0xe2a1cd90
fpcurthread  = none
idlethread   = 0xc3f0f440: pid 11 "idle: cpu0"
APIC ID      = 0
currentldt   = 0x50
spin locks held:

cpuid        = 1
curthread    = 0xc3f0f660: pid 11 "idle: cpu1"
curpcb       = 0xe2a19d90
fpcurthread  = none
idlethread   = 0xc3f0f660: pid 11 "idle: cpu1"
APIC ID      = 1
currentldt   = 0x50
spin locks held:

cpuid        = 2
curthread    = 0xc3f0f880: pid 11 "idle: cpu2"
curpcb       = 0xe2a16d90
fpcurthread  = none
idlethread   = 0xc3f0f880: pid 11 "idle: cpu2"
APIC ID      = 6
currentldt   = 0x50
spin locks held:

cpuid        = 3
curthread    = 0xc4a5ccc0: pid 9789 "syscall"
curpcb       = 0xe6aabd90
fpcurthread  = none
idlethread   = 0xc3f0faa0: pid 11 "idle: cpu3"
APIC ID      = 7
currentldt   = 0x50
spin locks held:

db> show alllocks
Process 1073 (sshd) thread 0xc44f5440 (100123)
exclusive sx so_rcv_sx r = 0 (0xc44aeca8) locked @ kern/uipc_sockbuf.c:145
db> ps
  pid  ppid  pgrp   uid   state   wmesg     wchan    cmd
 9789  9788  9646  1001  R+      CPU 3               syscall
 9788  9646  9646  1001  S+      wait     0xc4474558 syscall
 9646  1076  9646  1001  S+      wait     0xc4a582ac sh
 1076  1075  1076  1001  Ss+     wait     0xc4342558 bash
 1075  1073  1073  1001  S       select   0xc42e16a8 sshd
 1073   776  1073     0  Ss      sbwait   0xc44aecd8 sshd
  899     1   899     0  Ss+     ttyin    0xc40db410 getty
  898     1   898     0  Ss+     ttyin    0xc40df010 getty
  897     1   897     0  Ss+     ttyin    0xc40dec10 getty
  896     1   896     0  Ss+     ttyin    0xc40dfc10 getty
  895     1   895     0  Ss+     ttyin    0xc40df810 getty
  894     1   894     0  Ss+     ttyin    0xc40ddc10 getty
  893     1   893     0  Ss+     ttyin    0xc40dd810 getty
  892     1   892     0  Ss+     ttyin    0xc40de810 getty
  877     1   877     0  Ss      select   0xc42e0ba8 inetd
  850     1   850     0  Ss      select   0xc42e0aa8 moused
  836     1   836     0  Ss      nanslp   0xc0c23ec4 watchdogd
  794     1   794     0  Ss      nanslp   0xc0c23ec4 cron
  787     1   787    25  Ss      pause    0xc447430c sendmail
  781     1   781     0  Ss      select   0xc443a168 sendmail
  776     1   776     0  Ss      select   0xc4326da8 sshd
  757     1   757     0  Ss      select   0xc42c68e8 ntpd
  702   686   686     0  S       -        0xc43f9800 nfsd
  701   686   686     0  S       -        0xc42d8200 nfsd
  700   686   686     0  S       -        0xc42d8400 nfsd
  699   686   686     0  S       -        0xc43f9600 nfsd
  698   686   686     0  S       -        0xc43f9400 nfsd
  696   686   686     0  S       -        0xc449da00 nfsd
  695   686   686     0  S       -        0xc42d8800 nfsd
  694   686   686     0  S       -        0xc43f9200 nfsd
  693   686   686     0  S       -        0xc42d8a00 nfsd
  692   686   686     0  S       -        0xc449dc00 nfsd
  691   686   686     0  S       -        0xc42d8c00 nfsd
  690   686   686     0  S       -        0xc42d8600 nfsd
  689   686   686     0  S       -        0xc449de00 nfsd
  688   686   686     0  S       -        0xc42d8e00 nfsd
  687   686   686     0  S       -        0xc42d9000 nfsd
  686     1   686     0  Ss      select   0xc42c6aa8 nfsd
  684     1   684     0  Ss      select   0xc443ad68 mountd
  631     1   631     0  Ss      select   0xc443bb68 rpcbind
  614     1   614     0  Ss      select   0xc443be28 syslogd
  555     1   555     0  Ss      select   0xc443b868 devd
   27     0     0     0  SL      sdflush  0xc0c81244 [softdepflush]
   26     0     0     0  SL      syncer   0xc0c23cec [syncer]
   25     0     0     0  SL      vlruwt   0xc429c2ac [vnlru]
   24     0     0     0  SL      psleep   0xc0c75904 [bufdaemon]
   23     0     0     0  SL      pgzero   0xc0c81e00 [pagezero]
   22     0     0     0  SL      psleep   0xc0c81a18 [vmdaemon]
   21     0     0     0  SL      psleep   0xc0c819e0 [pagedaemon]
   20     0     0     0  SL      waiting_ 0xc0c7768c [sctp_iterator]
   19     0     0     0  SL      -        0xc4014a3c [fdc0]
   18     0     0     0  SL      usbtsk   0xc0c215d4 [usbtask-dr]
   17     0     0     0  SL      usbtsk   0xc0c215c0 [usbtask-hc]
   16     0     0     0  SL      usbevt   0xc404c210 [usb0]
   15     0     0     0  SL      -        0xc4034280 [em0 taskq]
   14     0     0     0  SL      -        0xc3fc6900 [kqueue taskq]
    9     0     0     0  SL      -        0xc3fc6c00 [acpi_task_2]
    8     0     0     0  SL      -        0xc3fc6c00 [acpi_task_1]
    7     0     0     0  SL      -        0xc3fc6c00 [acpi_task_0]
    6     0     0     0  SL      -        0xc3fc6c80 [thread taskq]
    5     0     0     0  SL      ccb_scan 0xc0bf2794 [xpt_thrd]
   13     0     0     0  SL      -        0xc0c23cf4 [yarrow]
    4     0     0     0  SL      -        0xc0c21d2c [g_down]
    3     0     0     0  SL      -        0xc0c21d28 [g_up]
    2     0     0     0  SL      -        0xc0c21d20 [g_event]
   12     0     0     0  WL      (threaded)          intr
100037                   I                           [irq7: ppc0]
100035                   I                           [swi0: sio]
100034                   I                           [irq12: psm0]
100033                   I                           [irq1: atkbd0]
100032                   I                           [irq15: ata1]
100031                   I                           [irq14: ata0]
100030                   I                           [irq17: fxp0]
100026                   I                           [irq16: uhci0]
100024                   I                           [irq9: acpi0]
100022                   I                           [swi6: task queue]
100021                   I                           [swi6: Giant taskq]
100016                   I                           [swi5: +]
100015                   I                           [swi2: cambio]
100009                   I                           [swi3: vm]
100008                   I                           [swi4: clock sio]
100007                   I                           [swi1: net]
   11     0     0     0  RL      (threaded)          idle
100006                   Run     CPU 0               [idle: cpu0]
100005                   Run     CPU 1               [idle: cpu1]
100004                   Run     CPU 2               [idle: cpu2]
100003                   CanRun                      [idle: cpu3]
    1     0     1     0  SLs     wait     0xc3f0dab0 [init]
   10     0     0     0  SL      audit_wo 0xc0c80cb0 [audit]
    0     0     0     0  WLs                         [swapper]
db> call doadump
Physical memory: 1011 MB
Dumping 70 MB: 55 39 23 7
Dump complete
= 0xf
db> c


Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 07
fault virtual address   = 0x668c02d6
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc0a741eb
stack pointer           = 0x28:0xe6aabab8
frame pointer           = 0x28:0xe6aabb24
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 9789 (syscall)
[thread pid 9789 tid 100131 ]
Stopped at      copystr+0x13:   lodsb   (%esi)
db> c


Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 07
fault virtual address   = 0x668c02d6
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc0a741eb
stack pointer           = 0x28:0xe6aabab8
frame pointer           = 0x28:0xe6aabb24
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 9789 (syscall)
[thread pid 9789 tid 100131 ]
Stopped at      copystr+0x13:   lodsb   (%esi)
db>


Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 07
fault virtual address   = 0x668c02d6
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc0a741eb
stack pointer           = 0x28:0xe6aabab8
frame pointer           = 0x28:0xe6aabb24
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 9789 (syscall)
[thread pid 9789 tid 100131 ]
Stopped at      copystr+0x13:   lodsb   (%esi)
db>


Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 07
fault virtual address   = 0x668c02d6
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc0a741eb
stack pointer           = 0x28:0xe6aabab8
frame pointer           = 0x28:0xe6aabb24
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 9789 (syscall)
[thread pid 9789 tid 100131 ]
Stopped at      copystr+0x13:   lodsb   (%esi)
db>


Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 07
fault virtual address   = 0x668c02d6
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc0a741eb
stack pointer           = 0x28:0xe6aabab8
frame pointer           = 0x28:0xe6aabb24
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 9789 (syscall)
[thread pid 9789 tid 100131 ]
Stopped at      copystr+0x13:   lodsb   (%esi)
db> reset
cpu_reset: Restarting BSP
cpu_reset_proxy: Stopped CPU 3
GDB: no debug ports present

(kgdb) l *0xc0a741eb
0xc0a741eb is at ../../../i386/i386/support.s:1404.
1399            incl    %edx
1400            cld
1401    1:
1402            decl    %edx
1403            jz      4f
1404            lodsb
1405            stosb
1406            orb     %al,%al
1407            jnz     1b
1408
(kgdb) l *kern_stat+0x3d
0xc07e575d is in kern_stat (../../../kern/vfs_syscalls.c:2109).
2104            int error, vfslocked;
2105
2106            NDINIT(&nd, LOOKUP,
2107                FOLLOW | LOCKSHARED | LOCKLEAF | MPSAFE | AUDITVNODE1,
2108                pathseg, path, td);
2109            if ((error = namei(&nd)) != 0)
2110                    return (error);
2111            vfslocked = NDHASGIANT(&nd);
2112            error = vn_stat(nd.ni_vp, &sb, td->td_ucred, NOCRED, td);
2113            NDFREE(&nd, NDF_ONLY_PNBUF);
--

Test scenario: Linux syscall with randum arguments