sdb icon indicating copy to clipboard operation
sdb copied to clipboard

importing kernel commands makes sdb fail for core dumps during startup

Open sdimitro opened this issue 6 years ago • 0 comments

Chuck Tuffli had to delete the following files while examining a ztest core dump:

/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/commands/linux/dmesg.py
/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/commands/linux/slabs.py
/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/commands/spl/spl_kmem_caches.py

The above files were giving him exceptions like this:

Traceback (most recent call last):
  File "/usr/local/bin/sdb", line 11, in <module>
    load_entry_point('sdb==0.1.0', 'console_scripts', 'sdb')()
  File "/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/internal/cli.py", line 216, in main
    repl.start_session()
  File "/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/internal/repl.py", line 114, in start_session
    _ = self.eval_cmd(line)
  File "/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/internal/repl.py", line 87, in eval_cmd
    for obj in objs:
  File "/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/__init__.py", line 182, in invoke
    execute_pipeline_term(prog, first_input, pipeline)
  File "/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/__init__.py", line 103, in execute_pipeline_term
    pipeline[-1].call(this_input)
  File "/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/commands/pretty_print.py", line 32, in call
    for type_, class_ in sdb.PrettyPrinter.all_printers.items()]
  File "/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/commands/pretty_print.py", line 32, in <listcomp>
    for type_, class_ in sdb.PrettyPrinter.all_printers.items()]
LookupError: could not find 'struct printk_log'

After that he was able to run things like spa ztest | vdev | pp though

sdimitro avatar Nov 06 '19 16:11 sdimitro