Closed crides closed 2 years ago
@crides
Can you show me the content of /tmp/nhi.log
file (this file is created if error occurs, if it doesn't exist that's okay. You need root access to access that file).
and can you run this command and send me the output:
getent group tty
And check if source /etc/nhi/nhi.bash
is added to the end of .bashrc
or source /etc/nhi/nhi.zsh
to the end of .zshrc
, accordingly to your shell of choice
Contents of /tmp/nhi.log
:
2021-11-13 22:28:52 | process_vm_readv failed at get_shell_environ
2021-11-13 22:28:52 | no such table: 0
2021-11-13 22:28:53 | process_vm_readv failed at get_shell_environ
2021-11-13 22:28:53 | no such table: 0
2021-11-13 22:28:57 | process_vm_readv failed at get_shell_environ
2021-11-13 22:28:57 | no such table: 0
2021-11-13 22:29:02 | process_vm_readv failed at get_shell_environ
2021-11-13 22:29:02 | no such table: 0
2021-11-13 22:29:05 | process_vm_readv failed at get_shell_environ
2021-11-13 22:29:05 | no such table: 0
2021-11-13 22:29:08 | process_vm_readv failed at get_shell_environ
2021-11-13 22:29:08 | no such table: 0
2021-11-13 22:29:12 | process_vm_readv failed at get_shell_environ
2021-11-13 22:29:12 | no such table: 0
2021-11-13 22:29:16 | process_vm_readv failed at get_shell_environ
2021-11-13 22:29:16 | no such table: 0
2021-11-13 22:54:52 | process_vm_readv failed at get_shell_environ
2021-11-13 22:54:52 | no such table: 0
2021-11-13 22:55:00 | process_vm_readv failed at get_shell_environ
2021-11-13 22:55:00 | no such table: 0
2021-11-13 22:55:02 | process_vm_readv failed at get_shell_environ
2021-11-13 22:55:02 | no such table: 0
2021-11-13 22:56:31 | process_vm_readv failed at get_shell_environ
2021-11-13 22:56:31 | no such table: 0
2021-11-13 22:58:12 | process_vm_readv failed at get_shell_environ
2021-11-13 22:58:12 | no such table: 0
2021-11-13 22:58:13 | process_vm_readv failed at get_shell_environ
2021-11-13 22:58:13 | no such table: 0
2021-11-13 22:59:56 | process_vm_readv failed at get_shell_environ
2021-11-13 22:59:56 | no such table: 0
2021-11-13 23:00:38 | process_vm_readv failed at get_shell_environ
2021-11-13 23:00:38 | no such table: 0
$getent group tty
tty:x:5:brltty
And yes, I do have source /etc/nhi/nhi.zsh
in .zshrc
Can you execute one last command: objdump -T $(which zsh) | awk -v sym=environ ' $NF == sym && $4 == ".bss" { print $1; exit }'
and also post here the output
Output is: 00000000000d4da0
I think that I need to replicate this bug myself, what distro are you using?
Arch. And just in case terminal matters for some reason, it's Alacritty
Thanks for the fast responses by the way.
I will install Alacritty on my arch device and will let you know how it went.
Also, can you temporarly comment out everything besides source /etc/nhi/nhi.zsh
from you .zshrc
and restart your terminal and see if nhi works?
Hmm it does, but only outside of tmux
.
And I might bisect the .zshrc
later, but it's here if you want to see it. I do have some local changes not yet commited but those are just aliases and functions.
So without tmux everything works fine? Keep in mind that some shell builtins are not being traced yet, however everything else is traced.
Without tmux
and without my .zshrc
that is. And I'm testing using the finish time in nhi log
But does without tmux and with your zshrc everything works?
No
@crides
Okay I found why nhi wasn't working with your .zshrc
and how to fix that. For now I found only "dirty fix", but it works. I will try to fix and patch repository in a few days. (You will need to replace current nhid
binary (and maybe nhi.bpf.o
file) with new/future one)
(I did not test it on tmux though)
Thanks! I'll checkout the commit later (after it happens)
@crides I will let you know when it will be done, in this issue, and create a new release with the patch
@crides
Should be fixed :+1: in your case download nhid
only (from v0.2.2 release) and replace it in the place of old nhid
in /usr/bin
and give 755
permission to the new nhid
and restart your computer.
Yep that works with tmux
+ my .zshrc
for saving command outputs, but doesn't seem to catch the finish of the sessions (that won't matter to me much, but may be something for you to look into).
Thanks for the help!
tmux
may break some stuff, but if it works that's good. For now I make sure that nhi
supports bash
and zsh
(without multiplexers and stuff like that).
Installed from release
0.2.1
,nhi fetch
shows only the creation of sessions, no commands have been logged, nor the finish of sessions. Same result from within and withouttmux