-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Expected Behavior
I don't know , I'm just trying sdb, but probably not reporting internal errors from drgn being sad about not-x86_64?
I found osandov/drgn#11 , so I installed debug symbols, and then got another error that was more explicit about "drgn doesn't know what a sparc64 is"
Actual Behavior
I just started it, and tried threads, and...
Steps To Reproduce the Problem
sdb> !uname -a
Linux myhost 5.10.0-8-sparc64 #1 Debian 5.10.46-4 (2021-08-03) sparc64 GNU/Linux
sdb> threads
sdb encountered an internal error due to a bug. Here's the
information you need to file the bug:
----------------------------------------------------------
Target Info:
ProgramFlags.IS_LIVE|IS_LINUX_KERNEL
Platform(<Architecture.UNKNOWN: 0>, <PlatformFlags.IS_64_BIT: 1>)
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/internal/repl.py", line 107, in eval_cmd
for obj in invoke(self.target, [], input_):
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/pipeline.py", line 153, in invoke
yield from execute_pipeline(first_input, pipeline)
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/pipeline.py", line 84, in execute_pipeline
yield from massage_input_and_call(pipeline[-1], this_input)
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/pipeline.py", line 67, in massage_input_and_call
yield from cmd.call(objs)
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/command.py", line 328, in call
yield from self.__invalid_memory_objects_check(
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/command.py", line 290, in __invalid_memory_objects_check
for obj in objs:
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/command.py", line 775, in _call
self.pretty_print(self.caller(objs))
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/commands/threads.py", line 91, in pretty_print
for obj in objs:
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/command.py", line 736, in caller
yield from self.no_input()
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/commands/threads.py", line 97, in no_input
yield from for_each_task(sdb.get_prog())
File "/usr/local/lib/python3.9/dist-packages/drgn-0.0.14+7.gc9cb28b-py3.9-linux-sparc64.egg/drgn/helpers/linux/pid.py", line 72, in for_each_task
for pid in for_each_pid(prog_or_ns):
File "/usr/local/lib/python3.9/dist-packages/v0.0.14-7-gc9cb28b-py3.9-linux-sparc64.egg/drgn/helpers/linux/pid.py", line 42, in for_each_pid
ns = prog_or_ns["init_pid_ns"].address_of_()
KeyError: 'init_pid_ns'
----------------------------------------------------------
Link: https://github.com/delphix/sdb/issues/new
sdb>
and with linux-image-...-dbg:
sdb> threads
sdb encountered an internal error due to a bug. Here's the
information you need to file the bug:
----------------------------------------------------------
Target Info:
ProgramFlags.IS_LIVE|IS_LINUX_KERNEL
Platform(<Architecture.UNKNOWN: 0>, <PlatformFlags.IS_64_BIT: 1>)
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/internal/repl.py", line 107, in eval_cmd
for obj in invoke(self.target, [], input_):
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/pipeline.py", line 153, in invoke
yield from execute_pipeline(first_input, pipeline)
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/pipeline.py", line 84, in execute_pipeline
yield from massage_input_and_call(pipeline[-1], this_input)
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/pipeline.py", line 67, in massage_input_and_call
yield from cmd.call(objs)
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/command.py", line 328, in call
yield from self.__invalid_memory_objects_check(
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/command.py", line 290, in __invalid_memory_objects_check
for obj in objs:
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/command.py", line 775, in _call
self.pretty_print(self.caller(objs))
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/commands/threads.py", line 92, in pretty_print
row_dict = {field: Threads.FIELDS[field](obj) for field in fields}
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/commands/threads.py", line 92, in <dictcomp>
row_dict = {field: Threads.FIELDS[field](obj) for field in fields}
File "/usr/local/lib/python3.9/dist-packages/sdb-0.1.0-py3.9.egg/sdb/commands/threads.py", line 33, in _cmdline
s = " ".join(map(lambda s: s.decode("utf-8"), cmdline(obj)))
File "/usr/local/lib/python3.9/dist-packages/drgn-0.0.14+7.gc9cb28b-py3.9-linux-sparc64.egg/drgn/helpers/linux/mm.py", line 253, in cmdline
return access_remote_vm(mm, arg_start, arg_end - arg_start).split(b"\0")[:-1]
File "/usr/local/lib/python3.9/dist-packages/drgn-0.0.14+7.gc9cb28b-py3.9-linux-sparc64.egg/drgn/helpers/linux/mm.py", line 233, in access_remote_vm
return _linux_helper_read_vm(mm.prog_, mm.pgd, address, size)
ValueError: virtual address translation is not implemented for unknown architecture
----------------------------------------------------------
Link: https://github.com/delphix/sdb/issues/new
Screenshots
See above.
Version
sdb: 3e6c69a
drgn: v0.0.14-7-gc9cb28b
Python: 3.9.2 (Debian sparc64 sid python3 3.9.2-3)
Host: Debian sparc64 sid not quite up to date as of 20210819, kernel 5.10.46-4
Additional Context
Whoops. I'm remarking on this here just because it asked me to, I'm debating if I want to try implementing the missing bits in drgn or just use another tool...