Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable way to print out command line arguments for threads/processes #247

Open
prakashsurya opened this issue Oct 12, 2020 · 2 comments
Open

Comments

@prakashsurya
Copy link
Contributor

I ran into a case where I was able to find the thread/process in question via threads, but wasn't able to determine the command line arguments used with that process.. For example:

sdb> threads ! grep zpool
0xffff991055628000 UNINTERRUPTIBLE 25216 120  zpool

Given that thread, I'd like to know what arguments were passed into zpool, but there doesn't appear to be an easy way to do this yet.

@sdimitro
Copy link
Contributor

This should not be hard to do as drgn provides such a helper: https://drgn.readthedocs.io/en/latest/helpers.html#drgn.helpers.linux.mm.cmdline

@prakashsurya
Copy link
Contributor Author

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sdb/commands/threads.py", line 31, in getcmdline
    return cmdline(obj)
  File "/usr/lib/python3/dist-packages/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/lib/python3/dist-packages/drgn/helpers/linux/mm.py", line 233, in access_remote_vm
    return _linux_helper_read_vm(mm.prog_, mm.pgd, address, size)
_drgn.FaultError: could not read memory from kdump: Excluded page: 0x1809dee8b

I tried to use that helper, but I'm getting an exception when I use it and pass in the task object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants