Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Sep 2003 09:49:40 +0900
From:      Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>, ken@freebsd.org
Cc:        freebsd-stable@freebsd.org
Subject:   Re: 4.9-PRE crash with firewire :(
Message-ID:  <ybsfziopbvf.wl@ett.sat.t.u-tokyo.ac.jp>
In-Reply-To: <200309222346.47700.doconnor@gsoft.com.au>
References:  <200309222346.47700.doconnor@gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
It looks that CAM calls mallloc(M_WAITOK) in an interrupt context.
I remeber that Ken implemented taskqueue running on a thread to deal
with this kind of problem. 

/\ Hidetoshi Shimokawa
\/  simokawa@sat.t.u-tokyo.ac.jp
PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html


At Mon, 22 Sep 2003 23:46:47 +0930,
Daniel O'Connor wrote:
> 
> Hello,
> I just upgraded to 4.9-PRE and now my firewire enclosure causes crashes on 
> connect :(
> 
> Any ideas? :)
> 
> chowder 23:17] /var/crash >sudo gdb -k /usr/src/sys/compile/CHOWDER/kernel.debug vmcore.11
> GNU gdb 4.18 (FreeBSD)
> 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 conditions.
> 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"...Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627 in elfstab_build_psymtabs
> Deprecated bfd_read called at /usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 933 in fill_symbuf
> 
> IdlePTD at phsyical address 0x003dd000
> initial pcb at physical address 0x002a9280
> panicstr: malloc(M_WAITOK) in interrupt context
> panic messages:
> ---
> panic: malloc(M_WAITOK) in interrupt context
> 
> syncing disks...
> done
> Uptime: 23s
> 
> dumping to dev #ad/0x40001, offset 172032
> dump ata0: resetting devices .. done
> 300 [CTRL-C to abort] 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 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 219 218 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 202 201 200 199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 184 183 182 181 180 179 178 177 176 175 174 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 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  dumpsys () at ../../kern/kern_shutdown.c:487
> 487             if (dumping++) {
> (kgdb) bt
> #0  dumpsys () at ../../kern/kern_shutdown.c:487
> #1  0xc016397b in boot (howto=256) at ../../kern/kern_shutdown.c:316
> #2  0xc0163db9 in panic (fmt=0xc0250ee0 "malloc(M_WAITOK) in interrupt context") at ../../kern/kern_shutdown.c:595
> #3  0xc015ece7 in malloc (size=44, type=0xc028ee00, flags=0) at ../../kern/kern_malloc.c:157
> #4  0xc0167c3e in sysctl_add_oid (clist=0xc156fc70, parent=0xc02be148, number=-1, name=0xc028351c "0", kind=-2147483647, arg1=0x0,
>     arg2=0, handler=0, fmt=0xc0242793 "N", descr=0xc028356c "CAM DA unit 0") at ../../kern/kern_sysctl.c:346
> #5  0xc0128fce in daregister (periph=0xc1551b00, arg=0xc1540000) at ../../cam/scsi/scsi_da.c:1217
> #6  0xc0125952 in cam_periph_alloc (periph_ctor=0xc0128e44 <daregister>, periph_oninvalidate=0xc0128b34 <daoninvalidate>,
>     periph_dtor=0xc0128c7c <dacleanup>, periph_start=0xc01291e0 <dastart>, name=0xc02427be "da", type=CAM_PERIPH_BIO, path=0xc1444180,
>     ac_callback=0xc0128d04 <daasync>, code=AC_FOUND_DEVICE, arg=0xc1540000) at ../../cam/cam_periph.c:164
> #7  0xc0128d7b in daasync (callback_arg=0x0, code=128, path=0xc0bb2030, arg=0xc1540000) at ../../cam/scsi/scsi_da.c:1088
> #8  0xc01230bf in xpt_async_bcast (async_head=0xc1440a70, async_code=128, path=0xc0bb2030, async_arg=0xc1540000)
>     at ../../cam/cam_xpt.c:4310
> #9  0xc0123039 in xpt_async (async_code=128, path=0xc0bb2030, async_arg=0xc1540000) at ../../cam/cam_xpt.c:4278
> #10 0xc01246af in probedone (periph=0xc1551c00, done_ccb=0xc1540000) at ../../cam/cam_xpt.c:5740
> #11 0xc01250ff in camisr (queue=0xc02a56f0) at ../../cam/cam_xpt.c:6385
> #12 0xc0124f11 in swi_cambio () at ../../cam/cam_xpt.c:6288
> #13 0xc021ce60 in splz_swi ()
> #14 0xc03a598e in ?? ()
> #15 0xc03aa531 in ?? ()
> #16 0xc03a8eb8 in ?? ()
> #17 0xc03a939c in ?? ()
> #18 0xc0230945 in intr_mux (arg=0xc0bad220) at ../../i386/isa/intr_machdep.c:601
> #19 0xc0221912 in cpu_idle () at ../../i386/i386/machdep.c:1000
> 
> -- 
> Daniel O'Connor software and network engineer
> for Genesis Software - http://www.gsoft.com.au
> "The nice thing about standards is that there
> are so many of them to choose from."
>   -- Andrew Tanenbaum
> GPG Fingerprint - 9A8C 569F 685A D928 5140  AE4B 319B 41F4 5D17 FDD5
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ybsfziopbvf.wl>