From owner-freebsd-stable Sat Mar 17 12:32:59 2001 Delivered-To: freebsd-stable@freebsd.org Received: from nova.fnal.gov (nova.fnal.gov [131.225.121.207]) by hub.freebsd.org (Postfix) with ESMTP id 8DF2237B718; Sat, 17 Mar 2001 12:32:36 -0800 (PST) (envelope-from zingelman@fnal.gov) Received: from localhost (tez@localhost) by nova.fnal.gov (8.9.3+Sun/8.9.3) with ESMTP id OAA17542; Sat, 17 Mar 2001 14:37:51 -0600 (CST) X-Authentication-Warning: nova.fnal.gov: tez owned process doing -bs Date: Sat, 17 Mar 2001 14:37:51 -0600 (CST) From: Tim Zingelman X-Sender: To: Cc: , Subject: 4.3-BETA + smbfs -> panic: malloc: wrong bucket Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm getting this repeatedly on several machines... after mounting a smbfs then sitting idle for a while, just an ls -l on the fs causes the panic. I built a kernel with debug & built smbfs.ko with debug. This is 4.3-BETA fresh from yesterday. Many identical (minus SMBFS) machines running great with this same kernel/world. I'm not sure where to go next... what follows is what I could get out of gdb... I do not know why there are ?? in the backtrace... maybe it is the linux.ko... I do have kern.fallback_elf_brand=3 set. # objdump --section-headers /modules/smbfs.ko|grep text 3 .rel.text 00003f20 00003bd4 00003bd4 00003bd4 2**2 9 .text 0000eb78 00008c7c 00008c7c 00008c7c 2**2 # kldstat Id Refs Address Size Name 1 6 0xc0100000 255918 kernel 2 1 0xc0356000 9cc0 agp.ko 3 1 0xc0360000 16e64 ipl.ko 4 1 0xc1015000 3000 daemon_saver.ko 5 1 0xc1018000 12000 linux.ko 6 1 0xc1055000 1c000 smbfs.ko I just built linux.ko with -g and tried to add-symbol-file it, but it made no difference... I'll install the new linux.ko in case that makes a difference, but it will probably be at least an hour before I get another crash... # gdb -k 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 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". (kgdb) symbol-file kernel.debug Reading symbols from kernel.debug...done. (kgdb) add-symbol-file /usr/ports/net/smbfs/work/smbfs-1.3.6/kernel/modules/smbfs2/smbfs.ko.debug 0xc105dc7c add symbol table from file "/usr/ports/net/smbfs/work/smbfs-1.3.6/kernel/modules/smbfs2/smbfs.ko.debug" at text_addr = 0xc105dc7c? (y or n) y Reading symbols from /usr/ports/net/smbfs/work/smbfs-1.3.6/kernel/modules/smbfs2/smbfs.ko.debug...done. (kgdb) exec-file /var/crash/kernel.0 (kgdb) core-file /var/crash/vmcore.0 IdlePTD 3764224 initial pcb at 2e2000 panicstr: malloc: wrong bucket panic messages: --- panic: malloc: wrong bucket syncing disks... 25 done Uptime: 10h43m30s dumping to dev #ad/0x20001, offset 530904 dump ata0: resetting devices .. done 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 --- #0 dumpsys () at /usr/src/sys/kern/kern_shutdown.c:469 469 if (dumping++) { (kgdb) where #0 dumpsys () at /usr/src/sys/kern/kern_shutdown.c:469 #1 0xc013e5db in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:309 #2 0xc013e958 in poweroff_wait (junk=0xc0290161, howto=-1054625020) at /usr/src/sys/kern/kern_shutdown.c:556 #3 0xc013a152 in malloc (size=13, type=0xc1054260, flags=0) at /usr/src/sys/kern/kern_malloc.c:262 #4 0xc1046569 in ?? () #5 0xc1049e61 in ?? () #6 0xc1049fbe in ?? () #7 0xc104a627 in ?? () #8 0xc104a784 in ?? () #9 0xc104bcfc in ?? () #10 0xc016f9a7 in getdirentries (p=0xd00db380, uap=0xd14f3f80) at vnode_if.h:769 #11 0xc027aa31 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 1278, tf_esi = 134864496, tf_ebp = -1077942852, tf_isp = -783335468, tf_ebx = 134844576, tf_edx = 134844576, tf_ecx = 0, tf_eax = 196, tf_trapno = 7, tf_err = 2, tf_eip = 134702880, tf_cs = 31, tf_eflags = 582, tf_esp = -1077942896, tf_ss = 47}) at /usr/src/sys/i386/i386/trap.c:1150 #12 0xc026d195 in Xint0x80_syscall () #13 0x8058f8e in ?? () #14 0x8058b88 in ?? () #15 0x8048a8c in ?? () #16 0x8048918 in ?? () #17 0x8048135 in ?? () (kgdb) up 11 #11 0xc027aa31 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 1278, tf_esi = 134864496, tf_ebp = -1077942852, tf_isp = -783335468, tf_ebx = 134844576, tf_edx = 134844576, tf_ecx = 0, tf_eax = 196, tf_trapno = 7, tf_err = 2, tf_eip = 134702880, tf_cs = 31, tf_eflags = 582, tf_esp = -1077942896, tf_ss = 47}) at /usr/src/sys/i386/i386/trap.c:1150 1150 error = (*callp->sy_call)(p, args); (kgdb) list 1145 p->p_retval[0] = 0; 1146 p->p_retval[1] = frame.tf_edx; 1147 1148 STOPEVENT(p, S_SCE, narg); /* MP aware */ 1149 1150 error = (*callp->sy_call)(p, args); 1151 1152 /* 1153 * MP SAFE (we may or may not have the MP lock at this point) 1154 */ (kgdb) print p $1 = (struct proc *) 0xd00db380 (kgdb) print *p $2 = {p_procq = {tqe_next = 0x0, tqe_prev = 0xc02f9540}, p_list = { le_next = 0xd150b100, le_prev = 0xc02f9498}, p_cred = 0xc10a9d00, p_fd = 0xc114b200, p_stats = 0xd14f2b78, p_limit = 0xc10f6300, p_upages_obj = 0xd14dfba0, p_procsig = 0xc1205740, p_flag = 16390, p_stat = 2 '\002', p_pad1 = "\000\000", p_pid = 3689, p_hash = { le_next = 0xd00dca40, le_prev = 0xc0eb99a4}, p_pglist = {le_next = 0x0, le_prev = 0xc0f62d08}, p_pptr = 0xd150b100, p_sibling = {le_next = 0x0, le_prev = 0xd150b150}, p_children = {lh_first = 0x0}, p_ithandle = { callout = 0x0}, p_oppid = 0, p_dupfd = 0, p_vmspace = 0xd00e0800, p_estcpu = 27, p_cpticks = 27, p_pctcpu = 0, p_wchan = 0x0, p_wmesg = 0xc1051358 "90wrq", p_swtime = 0, p_slptime = 0, p_realtimer = { it_interval = {tv_sec = 0, tv_usec = 0}, it_value = {tv_sec = 0, tv_usec = 0}}, p_runtime = 738, p_uu = 0, p_su = 0, p_iu = 0, p_uticks = 0, p_sticks = 27, p_iticks = 0, p_traceflag = 0, p_tracep = 0x0, p_siglist = {__bits = {0, 0, 0, 0}}, p_textvp = 0xd00d6380, p_lock = 0 '\000', p_oncpu = 0 '\000', p_lastcpu = 0 '\000', p_rqindex = 12 '\f', p_locks = -25, p_simple_locks = 0, p_stops = 0, p_stype = 0, p_step = 0 '\000', p_pfsflags = 0 '\000', p_pad3 = "\000", p_retval = {0, 134844576}, p_sigiolst = {slh_first = 0x0}, p_sigparent = 20, p_oldsigmask = {__bits = {0, 0, 0, 0}}, p_sig = 0, p_code = 0, p_klist = { slh_first = 0x0}, p_sigmask = {__bits = {0, 0, 0, 0}}, p_sigstk = { ss_sp = 0x0, ss_size = 0, ss_flags = 4}, p_priority = 53 '5', p_usrpri = 53 '5', p_nice = 0 '\000', p_comm = "ls\000h\000er\000\000\000\000\000\000\000\000\000", p_pgrp = 0xc0f62d00, p_sysent = 0xc02c1760, p_rtprio = {type = 1, prio = 0}, p_prison = 0x0, p_args = 0xc0ed5a10, p_addr = 0xd14f2000, p_md = { md_regs = 0xd14f3fa8}, p_xstat = 0, p_acflag = 0, p_ru = 0x0, p_nthreads = 0, p_aioinfo = 0x0, p_wakeup = 0, p_peers = 0x0, p_leader = 0xd00db380, p_asleep = {as_priority = 0, as_timo = 0}, p_emuldata = 0x0} (kgdb) print args $3 = {5, 134860800, 4096, 134844596, 0, 0, 0, 0} (kgdb) print *callp $5 = {sy_narg = 4, sy_call = 0xc016f8b0 } (kgdb) down 1 #10 0xc016f9a7 in getdirentries (p=0xd00db380, uap=0xd14f3f80) at vnode_if.h:769 769 rc = VCALL(vp, VOFFSET(vop_readdir), &a); (kgdb) l 764 a.a_uio = uio; 765 a.a_cred = cred; 766 a.a_eofflag = eofflag; 767 a.a_ncookies = ncookies; 768 a.a_cookies = cookies; 769 rc = VCALL(vp, VOFFSET(vop_readdir), &a); 770 return (rc); 771 } 772 struct vop_readlink_args { 773 struct vnodeop_desc *a_desc; (kgdb) print a $6 = {a_desc = 0xc02bffc0, a_vp = 0xd14a9500, a_uio = 0xd14f3f0c, a_cred = 0xc12a5a80, a_eofflag = 0xd14f3ee0, a_ncookies = 0x0, a_cookies = 0x0} (kgdb) print vp $7 = (struct vnode *) 0xd14a9500 (kgdb) print *vp $8 = {v_flag = 1, v_usecount = 6, v_writecount = 0, v_holdcnt = 1, v_id = 7201, v_mount = 0xc0fc0800, v_op = 0xc1038b00, v_freelist = { tqe_next = 0x0, tqe_prev = 0x0}, v_mntvnodes = {le_next = 0x0, le_prev = 0xd14a9464}, v_cleanblkhd = {tqh_first = 0x0, tqh_last = 0xd14a952c}, v_dirtyblkhd = {tqh_first = 0x0, tqh_last = 0xd14a9534}, v_synclist = {le_next = 0x0, le_prev = 0x0}, v_numoutput = 0, v_type = VDIR, v_un = {vu_mountedhere = 0x0, vu_socket = 0x0, vu_spec = {vu_specinfo = 0x0, vu_specnext = { sle_next = 0x0}}, vu_fifoinfo = 0x0}, v_lease = 0x0, v_lastw = 0, v_cstart = 0, v_lasta = 0, v_clen = 0, v_object = 0x0, v_interlock = { lock_data = 0}, v_vnlock = 0x0, v_tag = 24, v_data = 0xc1038100, v_cache_src = {lh_first = 0xc10c3500}, v_cache_dst = {tqh_first = 0x0, tqh_last = 0xd14a9580}, v_dd = 0xd14a9500, v_ddid = 0, v_pollinfo = { vpi_lock = {lock_data = 0}, vpi_selinfo = {si_pid = 0, si_note = { slh_first = 0x0}, si_flags = 0}, vpi_events = 0, vpi_revents = 0}, v_vxproc = 0x0} (kgdb) down 7 #3 0xc013a152 in malloc (size=13, type=0xc1054260, flags=0) at /usr/src/sys/kern/kern_malloc.c:262 262 panic("malloc: wrong bucket"); (kgdb) list 257 } 258 freep->spare0 = 0; 259 #endif /* INVARIANTS */ 260 kup = btokup(va); 261 if (kup->ku_indx != indx) 262 panic("malloc: wrong bucket"); 263 if (kup->ku_freecnt == 0) 264 panic("malloc: lost data"); 265 kup->ku_freecnt--; 266 kbp->kb_totalfree--; (kgdb) print kup $9 = (struct kmemusage *) 0x0 (kgdb) print va $10 = 0xc0ed0000 "" (kgdb) print *va $11 = 0 '\000' (kgdb) print indx $12 = 4 (kgdb) print *kup Cannot access memory at address 0x0. (kgdb) print kbp $13 = (struct kmembuckets *) 0x100 (kgdb) print *kbp Cannot access memory at address 0x100. (kgdb) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message