Project

General

Profile

Bug #3465

::walk ... | ::<dcmd> misinterprets input as symbol names

Added by Christopher Siden over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Category:
cmd - userland programs
Start date:
2013-01-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

From Matt Ahrens's original bug report at Delphix:

When doing "::walk thread | ::tsd ... " in userland, you get strange error
messages like:
mdb: thread ID -17397136 not found: unknown symbol name
and some threads tsd is not printed.

The problem is that walker output includes hex numbers like "e2" and "fd".  In
userland, there are also symbols with these names, so mdb looks up the address
of the symbol and passes it to the dcmd, just as if I had typed "fd::tsd".

The solution is to make walker output unambiguously a number, e.g "0xfd" rather
than "fd".  This is accomplished by making walk_step() use the "%#lr" format.

History

#1

Updated by Christopher Siden over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Pending RTI to Resolved
commit 28e4da2
Author: Matthew Ahrens <mahrens@delphix.com>
Date:   Wed Jan 30 15:02:58 2013

    3465 ::walk ... | ::<dcmd> misinterprets input as symbol names
    3466 ::tsd should handle missing/NULL values better
    3467 mdb_ctf_vread() could be more useful
    3468 mdb enhancements for zfs development
    3470 ::whatis does not print callers from KMF_LITE
    3473 mdb_get_module() returns wrong module
    Reviewed by: Adam Leventhal <ahl@delphix.com>
    Reviewed by: Eric Schrock <eric.schrock@delphix.com>
    Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@nexenta.com>

Also available in: Atom PDF