kern/103207: kdb_backtrace core dump and a settlement
Zhouyi Zhou
zhouyi04 at ios.cn
Tue Sep 12 20:30:19 PDT 2006
>Number: 103207
>Category: kern
>Synopsis: kdb_backtrace core dump and a settlement
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Sep 13 03:30:18 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Zhouyi Zhou
>Release: FreeBSD 6.0
>Organization:
Institute of Software, Chinese Academy of Sciences
>Environment:
FreeBSD 6.0-RELEASE FreeBSD 6.0-RELEASE #41: Wed Sep 13 11:08:04 UTC 2006
>Description:
The FreeBSD's DDB backtrace mechanism has a small bug on it.
sys/ddb/db_sym.c
249 void
250 db_symbol_values(sym, namep, valuep)
251 c_db_sym_t sym;
252 const char **namep;
253 db_expr_t *valuep;
254 {
255 db_expr_t value;
256
257 if (sym == DB_SYM_NULL) {
258 *namep = 0;
259 return;
260 }
261
262 X_db_symbol_values(db_last_symtab, sym, namep, &value);
263
264 if (db_symbol_is_ambiguous(sym))
265 *namep = db_qualify(sym, db_last_symtab->name);
266 if (valuep)
267 *valuep = value;
268 }
sometimes the db_last_symtab will be 0 because of symbol lookup failure in previous stages, this will cause kernel to dump.
>How-To-Repeat:
add configuration option that will trigger kdb_backtrace such as
options WITNESS_KDB
to kernel configuration file
>Fix:
My modification is:
257 if (sym == DB_SYM_NULL||db_last_symtab==0) {
This seems to settle the problem
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list