From owner-freebsd-hackers Fri May 5 9:33:40 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from account.abs.net (account.abs.net [207.114.5.70]) by hub.freebsd.org (Postfix) with ESMTP id 8479F37B9D2; Fri, 5 May 2000 09:33:27 -0700 (PDT) (envelope-from howardl@account.abs.net) Received: (from howardl@localhost) by account.abs.net (8.9.3/8.9.3+RBL+DUL+RSS+ORBS) id MAA13634; Fri, 5 May 2000 12:33:02 -0400 (EDT) (envelope-from howardl) From: Howard Leadmon Message-Id: <200005051633.MAA13634@account.abs.net> Subject: Re: Debugging Kernel/System Crashes, can anyone help?? In-Reply-To: <200005040319.UAA66688@apollo.backplane.com> from Matthew Dillon at "May 3, 2000 08:19:19 pm" To: Matthew Dillon Date: Fri, 5 May 2000 12:33:02 -0400 (EDT) Cc: Greg Lehey , freebsd-stable@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL72 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG =20 > Ahhhh hah! Yes, I think I see what is happening. >=20 > The kernel ioctl() system call is using a stack based > char buffer to hold the temporary data, and this buffer is not=20 > aligned. >=20 > Please try the following patch. >=20 > -Matt > Matthew Dillon=20 > Hello Matt, Well I almost thought we had something here, as the machine actually stayed online for over a day this past time. Anyway I did add your patch, and when the machine died I now have a crashdump of the data with your patch include= d, when I will provide below. FYI, I have kept the past crashinfo as well as the current one, so if you need any other info just let me know. Hopefully something in this latest crash will stick out to you.. # gdb -k kernel.1 vmcore.1 GNU gdb 4.18 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"... SMP 2 cpus IdlePTD 3112960 initial pcb at 2815e0 panicstr: page fault panic messages: --- panic: unknown/reserved trap mp_lock =3D 01000002; cpuid =3D 1; lapic.id =3D 01000000 boot() called on cpu#1 syncing disks...=20 Fatal trap 12: page fault while in kernel mode mp_lock =3D 01000003; cpuid =3D 1; lapic.id =3D 01000000 fault virtual address =3D 0x30 fault code =3D supervisor read, page not present instruction pointer =3D 0x8:0xc01cdca5 stack pointer =3D 0x10:0xff80ddd0 frame pointer =3D 0x10:0xff80ddd4 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, def32 1, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D Idle interrupt mask =3D net bio cam <- SMP: XXX trap number =3D 12 panic: page fault mp_lock =3D 01000003; cpuid =3D 1; lapic.id =3D 01000000 boot() called on cpu#1 Uptime: 1h52m40s dumping to dev #ad/0x20001, offset 128 dump ata0: resetting devices .. done 383 382 381 380 379 378 377 376 375 374 373 372 371 370 369 368 367 366 365= 364 363 362 361 360 359 358 357 356 355 354 353 352 351 350 349 348 347 34= 6 345 344 343 342 341 340 339 338 337 336 335 334 333 332 331 330 329 328 3= 27 326 325 324 323 322 321 32= 0 319 318 317 316 315 314 313 312 311 310 309 308 307 306 305 304 303 302 3= 01 300 299 298 297 296 295 294 293 292 291 290 289 288 287 286 285 284 283 = 282 281 280 279 278 277 276 275 274 273 272 271 270 269 268 267 266 265 264= 263 262 261 260 259 258 257=20= 256 255 254 253 252 251 250 249 248 247 246 245 244 243 242 241 240 239 238= 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220 21= 9 218 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 202 201 2= 00 199 198 197 196 195 194 19= 3 192 191 190 189 188 187 186 185 184 183 182 181 180 179 178 177 176 175 1= 74 173 172 171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 = 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140 139 138 137= 136 135 134 133 132 131 130=20= 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111= 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 = 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 = 64 63 62 61 60 59 58 57 56 55= 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30= 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 = 2 1 0=20 --- #0 boot (howto=3D260) at ../../kern/kern_shutdown.c:304 304 dumppcb.pcb_cr3 =3D rcr3(); (kgdb) back #0 boot (howto=3D260) at ../../kern/kern_shutdown.c:304 #1 0xc013af94 in poweroff_wait (junk=3D0xc025922f, howto=3D0) at ../../kern/kern_shutdown.c:554 #2 0xc02283cc in trap_fatal (frame=3D0xff80dd90, eva=3D48) at ../../i386/i386/trap.c:924 #3 0xc022805d in trap_pfault (frame=3D0xff80dd90, usermode=3D0, eva=3D48) at ../../i386/i386/trap.c:817 #4 0xc0227c57 in trap (frame=3D{tf_fs =3D -8388584, tf_es =3D -1072496624,= =20 tf_ds =3D -976158704, tf_edi =3D 0, tf_esi =3D 0, tf_ebp =3D -8331820= ,=20 tf_isp =3D -8331844, tf_ebx =3D -1071185252, tf_edx =3D -1071010272,= =20 tf_ecx =3D 16777217, tf_eax =3D 0, tf_trapno =3D 12, tf_err =3D 0,=20 tf_eip =3D -1071850331, tf_cs =3D 8, tf_eflags =3D 66178, tf_esp =3D = -847926736,=20 tf_ss =3D -8331796}) at ../../i386/i386/trap.c:423 #5 0xc01cdca5 in acquire_lock (lk=3D0xc027029c) at machine/globals.h:113 #6 0xc01d2f7c in softdep_count_dependencies (bp=3D0xcd75aa30, wantcount=3D= 0) at ../../ufs/ffs/ffs_softdep.c:4535 #7 0xc01d624c in ffs_fsync (ap=3D0xff80de50) at ../../ufs/ffs/ffs_vnops.c:= 168 #8 0xc01d4d66 in ffs_sync (mp=3D0xc58fb000, waitfor=3D2, cred=3D0xc0dee900= ,=20 p=3D0xc0297060) at vnode_if.h:537 #9 0xc01673ef in sync (p=3D0xc0297060, uap=3D0x0) at ../../kern/vfs_syscal= ls.c:549 #10 0xc013a9b3 in boot (howto=3D256) at ../../kern/kern_shutdown.c:226 #11 0xc013af94 in poweroff_wait (junk=3D0xc0259739, howto=3D0) at ../../kern/kern_shutdown.c:554 #12 0xc02283d6 in trap_fatal (frame=3D0xff80df44, eva=3D0) at ../../i386/i386/trap.c:926 #13 0xc0227d92 in trap (frame=3D{tf_fs =3D -1072365544, tf_es =3D 117492942= 4,=20 tf_ds =3D -1059192816, tf_edi =3D -194641856, tf_esi =3D -1059168256,= =20 tf_ebp =3D -8331372, tf_isp =3D -8331408, tf_ebx =3D -1059161408,=20 tf_edx =3D 54312, tf_ecx =3D 0, tf_eax =3D -194641856, tf_trapno =3D = 29,=20 tf_err =3D 0, tf_eip =3D -1071900421, tf_cs =3D 8, tf_eflags =3D 582,= =20 tf_esp =3D -1059161408, tf_ss =3D 1074266112}) at ../../i386/i386/tra= p.c:586 #14 0xc01c18fb in dc_intr (arg=3D0xc0de6000) at machine/cpufunc.h:331 #15 0xc0230953 in intr_mux (arg=3D0xc0de7b20) at ../../i386/isa/intr_machdep.c:569 (kgdb) q #=20 --- Howard Leadmon - howardl@abs.net - http://www.abs.net ABSnet Internet Services - Phone: 410-361-8160 - FAX: 410-361-8162 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message