Project

General

Profile

Actions

Bug #3465

closed

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

Added by Christopher Siden over 10 years ago. Updated over 10 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
Gerrit CR:
External Bug:

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.
Actions #1

Updated by Christopher Siden over 10 years ago

  • Status changed from Pending RTI to Resolved
  • % Done changed from 0 to 100
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>
Actions

Also available in: Atom PDF