page fault in putchar/ttyoutput

From: Pawel Worach <pawel.worach_at_gmail.com>
Date: Sat, 21 May 2005 13:14:34 +0200
During a port build my /export filesystem got full and this
panic occurred. Struct tty seems to be bogus in the putchar call.

FreeBSD 6.0-CURRENT #0: Fri May 20 03:53:58 CEST 2005
SMP (dual celeron), 4BSD, PREEMPTION, ADAPTIVE_GIANT
kernel.debug and vmcore put aside.

kernel message buffer:
<3>pid 23212 (bsdtar), uid 0 inumber 942712 on /export: filesystem full
<118>May 21 11:04:01 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 942712 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 942745 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 942750 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 942764 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 942770 on /export: filesystem full
<118>May 21 11:04:02 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 942745 on /export: filesystem full
<118>May 21 11:04:02 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 942750 on /export: filesystem full
<118>May 21 11:04:02 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 942764 on /export: filesystem full
<118>May 21 11:04:02 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 942770 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 942771 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 942773 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 942775 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 942791 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 942793 on /export: filesystem full
<118>May 21 11:04:02 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumb---Type <return> to continue, or q <return> to quit---
er 942771 on /export: filesystem full
<118>May 21 11:04:02 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 942773 on /export: filesystem full
<118>May 21 11:04:02 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 942775 on /export: filesystem full
<118>May 21 11:04:02 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 942791 on /export: filesystem full
<118>May 21 11:04:02 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 942793 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 942818 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 942818 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 942861 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944767 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944779 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944782 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 880745 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 880746 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 880747 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 942861 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944767 on /export: filesystem full
---Type <return> to continue, or q <return> to quit---
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944779 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944782 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 880745 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 880746 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 880747 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944795 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944797 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944795 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944797 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944806 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944806 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944813 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944813 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944827 on /export: filesystem full
---Type <return> to continue, or q <return> to quit---
<3>pid 23212 (bsdtar), uid 0 inumber 944828 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944829 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944827 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944828 on /export: filesystem full
<118>May 21 11:04:03 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944829 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944830 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944831 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944830 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944831 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944835 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944836 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944837 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944838 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944839 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944840 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944841 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944845 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944846 on /export: filesystem full
---Type <return> to continue, or q <return> to quit---
<3>pid 23212 (bsdtar), uid 0 inumber 944847 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944848 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944849 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944850 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944851 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944852 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944853 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944854 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944855 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944835 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944836 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944837 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944838 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944839 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944840 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944841 on /export: filesystem full
---Type <return> to continue, or q <return> to quit---
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944845 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944846 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944847 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944848 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944849 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944850 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944851 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944852 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 94
48<53 o3n>p
i<d 118> /export: f
i<3l>e2
3<212 (118>bs
y<s3t>ems
---Type <return> to continue, or q <return> to quit---
d<tar),1 1ui8d>
f<u3l>l0
<inumber1 18>
<3>944856 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944854 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944855 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: 944856 on /export:
filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944857 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944857 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944857 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944857 on /export: filesystem full
<118>May 21 11:04:04 <kern.err> darkstar kernel: pid 23212 (bsdtar),
uid 0 inumber 944857 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944857 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944857 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944857 on /export: filesystem full
<3>pid 23212 (bsdtar), uid 0 inumber 944857 on /export: filesystem full


Fatal trap 12: page fault while in kernel mode
---Type <return> to continue, or q <return> to quit---
cpuid = 1; apic id = 01
fault virtual address   = 0x0
fault code              = supervisor write, page not present
instruction pointer     = 0x20:0xc056f44f
stack pointer           = 0x28:0xcd6306e0
frame pointer           = 0x28:0xcd6306f0
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         = 23212 (bsdtar)
trap number             = 12
panic: page fault
cpuid = 0
KDB: stack backtrace:
kdb_backtrace(c075a5f9,0,c0738626,cd6305e4,a) at kdb_backtrace+0x2e
panic(c0738626,c075b1cb,c2c7a988,1,1) at panic+0x139
trap_fatal(cd6306a0,0,2,8,c1714d80) at trap_fatal+0x346
trap_pfault(cd6306a0,0,0,c1985480,0) at trap_pfault+0x252
trap(cd630008,c0550028,c07a0028,66,c2049838) at trap+0x340
calltrap() at calltrap+0x5
--- trap 0xc, eip = 0xc056f44f, esp = 0xcd6306e0, ebp = 0xcd6306f0 ---
putc(66,c2049838,cd63070c,c2049800,66) at putc+0x16f
ttyoutput(66,c2049800,2,cd630830,cd630740) at ttyoutput+0x181
---Type <return> to continue, or q <return> to quit---
tputchar(66,c2049800,ffffffff,c16648db,c0752436) at tputchar+0x4c
putchar(66,cd630830,0,0,0) at putchar+0x7c
kvprintf(c0752414,c054df40,cd630830,a,cd630854) at kvprintf+0x8d
uprintf(c0752414,c16648d4,c0752404,0,800) at uprintf+0x20b
ffs_alloc(c23b3b58,0,0,396d48,0) at ffs_alloc+0x328
ffs_balloc_ufs2(c1e02dd0,0,0,200,c1a58e00) at ffs_balloc_ufs2+0x1229
ufs_mkdir(cd630bac,cd630cb8,c05a5ca1,c07843a0,cd630bac) at ufs_mkdir+0x6d6
VOP_MKDIR_APV(c07843a0,cd630bac,cd630c14,cd630c3c,1f4) at VOP_MKDIR_APV+0x3e
kern_mkdir(c1985480,805b180,0,1c0,cd630d30) at kern_mkdir+0x3e1
mkdir(c1985480,cd630d04,8,cd630d2c,c0555356) at mkdir+0x29
syscall(3b,3b,bfbf003b,805b180,1c0) at syscall+0x370
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (136, FreeBSD ELF32, mkdir), eip = 0x28104cef, esp =
0xbfbfe0cc, ebp = 0xbfbfe168 ---
Uptime: 1d6h50m10s
Dumping 255 MB


Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address   = 0x21310006
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc0442211
---Type <return> to continue, or q <return> to quit---
stack pointer           = 0x28:0xcc011c98
frame pointer           = 0x28:0xcc011cc4
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         = 41 (swi2: cambio)
trap number             = 12
 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240

stacktrace:
(kgdb) bt
#0  doadump () at pcpu.h:165
#1  0xc052bec2 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:397
#2  0xc052c2e3 in panic (fmt=0xc0738626 "%s")
    at /usr/src/sys/kern/kern_shutdown.c:553
#3  0xc0713ca6 in trap_fatal (frame=0xcd6306a0, eva=0)
    at /usr/src/sys/i386/i386/trap.c:814
#4  0xc0713932 in trap_pfault (frame=0xcd6306a0, usermode=0, eva=0)
    at /usr/src/sys/i386/i386/trap.c:732
#5  0xc0713490 in trap (frame=
      {tf_fs = -849149944, tf_es = -1068171224, tf_ds = -1065746392,
tf_edi = 102, tf_esi = -1039886280, tf_ebp = -849148176, tf_isp =
-849148212, tf_ebx = -1043657216, tf_edx = 102, tf_ecx = 0, tf_eax =
0, tf_trapno = 12, tf_err = 2, tf_eip = -1068043185, tf_cs = 32,
tf_eflags = 66118, tf_esp = 89, tf_ss = 102})
    at /usr/src/sys/i386/i386/trap.c:422
#6  0xc06fd73a in calltrap () at /usr/src/sys/i386/i386/exception.s:139
#7  0xcd630008 in ?? ()
#8  0xc0550028 in rman_fini (rm=0xc1cb0e00) at atomic.h:158
#9  0xc0566e11 in ttyoutput (c=-1039886336, tp=0x66)
    at /usr/src/sys/kern/tty.c:760
#10 0xc056abac in tputchar (c=102, tp=0xc2049800)
    at /usr/src/sys/kern/tty.c:2753
#11 0xc054dfbc in putchar (c=102, arg=0xcd630830)
    at /usr/src/sys/kern/subr_prf.c:341
---Type <return> to continue, or q <return> to quit---
#12 0xc054e2dd in kvprintf (fmt=0xc0752436 "ull\n", func=0xc054df40 <putchar>,
    arg=0xcd630830, radix=10, ap=0xcd630854 "\004$u\uffff")
    at /usr/src/sys/kern/subr_prf.c:523
#13 0xc054da0b in uprintf (fmt=0x0) at /usr/src/sys/kern/subr_prf.c:149
#14 0xc067f448 in ffs_alloc (ip=0xc23b3b58, lbn=0, bpref=3763528, size=2048,
    cred=0xc1a58e00, bnp=0xcd63093c) at /usr/src/sys/ufs/ffs/ffs_alloc.c:204
#15 0xc06877e9 in ffs_balloc_ufs2 (vp=0xc1e02dd0,
startoffset=Unhandled dwarf expression opcode 0x93
)
    at /usr/src/sys/ufs/ffs/ffs_balloc.c:671
#16 0xc06aeb46 in ufs_mkdir (ap=0xcd630bac)
    at /usr/src/sys/ufs/ufs/ufs_vnops.c:1541
#17 0xc072045e in VOP_MKDIR_APV (vop=0x0, a=0x0) at vnode_if.c:1248
#18 0xc05a5ca1 in kern_mkdir (td=0xc1985480,
    path=0x805b180 <Address 0x805b180 out of bounds>, segflg=UIO_USERSPACE,
    mode=448) at vnode_if.h:653
#19 0xc05a58b9 in mkdir (td=0x0, uap=0x0)
    at /usr/src/sys/kern/vfs_syscalls.c:3307
#20 0xc07140c0 in syscall (frame=
      {tf_fs = 59, tf_es = 59, tf_ds = -1078001605, tf_edi =
134590848, tf_esi = 448, tf_ebp = -1077943960, tf_isp = -849146524,
tf_ebx = 671725124, tf_edx = 0, tf_ecx = 672728111, tf_eax = 136,
tf_trapno = 0, tf_err = 2, tf_eip = 672156911, tf_cs = 51, tf_eflags =
582, tf_esp = -1077944116, tf_ss = 59})
    at /usr/src/sys/i386/i386/trap.c:959
#21 0xc06fd78f in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:200
---Type <return> to continue, or q <return> to quit---
#22 0x0000003b in ?? ()
#23 0x0000003b in ?? ()
#24 0xbfbf003b in ?? ()
#25 0x0805b180 in ?? ()
#26 0x000001c0 in ?? ()
#27 0xbfbfe168 in ?? ()
#28 0xcd630d64 in ?? ()
#29 0x2809b644 in ?? ()
#30 0x00000000 in ?? ()
#31 0x2819042f in ?? ()
#32 0x00000088 in ?? ()
#33 0x00000000 in ?? ()
#34 0x00000002 in ?? ()
#35 0x28104cef in ?? ()
#36 0x00000033 in ?? ()
#37 0x00000246 in ?? ()
#38 0xbfbfe0cc in ?? ()
#39 0x0000003b in ?? ()
#40 0x00000000 in ?? ()
#41 0x00000000 in ?? ()
#42 0x00000000 in ?? ()
#43 0x00000000 in ?? ()
#44 0x0efbd000 in ?? ()
---Type <return> to continue, or q <return> to quit---
#45 0xc2c7a800 in ?? ()
#46 0xc1985480 in ?? ()
#47 0xcd630314 in ?? ()
#48 0xcd6302f8 in ?? ()
#49 0xc151e480 in ?? ()
#50 0xc0541f00 in sched_switch (td=0x1c0, newtd=0x2809b644,
flags=Cannot access memory at address 0xbfbfe178
)
    at /usr/src/sys/kern/sched_4bsd.c:971
Previous frame inner to this frame (corrupt stack?)
(kgdb) frame 14
#14 0xc067f448 in ffs_alloc (ip=0xc23b3b58, lbn=0, bpref=3763528, size=2048,
    cred=0xc1a58e00, bnp=0xcd63093c) at /usr/src/sys/ufs/ffs/ffs_alloc.c:204
204             uprintf("\n%s: write failed, filesystem is full\n",
fs->fs_fsmnt);
(kgdb) list
199                     softdep_request_cleanup(fs, ITOV(ip));
200                     goto retry;
201             }
202             UFS_UNLOCK(ump);
203             ffs_fserr(fs, ip->i_number, "filesystem full");
204             uprintf("\n%s: write failed, filesystem is full\n",
fs->fs_fsmnt);
205             return (ENOSPC);
206     }
207
208     /*
(kgdb) frame 9
#9  0xc0566e11 in ttyoutput (c=-1039886336, tp=0x66)
    at /usr/src/sys/kern/tty.c:760
760             if (!ISSET(tp->t_lflag, FLUSHO) && putc(c, &tp->t_outq))
(kgdb) list
755             else if (c == '\r' && ISSET(tp->t_oflag, ONOCR) &&
tp->t_column == 0)
756                     return (-1);
757
758             tk_nout++;
759             tp->t_outcc++;
760             if (!ISSET(tp->t_lflag, FLUSHO) && putc(c, &tp->t_outq))
761                     return (c);
762
763             col = tp->t_column;
764             switch (CCLASS(c)) {
(kgdb) print *tp
Cannot access memory at address 0x66
(kgdb) print tp
$3 = (struct tty *) 0x66

-- 
Pawel
Received on Sat May 21 2005 - 09:14:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:35 UTC