GithubHelp home page GithubHelp logo

Comments (14)

strang1ato avatar strang1ato commented on May 25, 2024

What happens if you comment out content of your .bashrc and left only source /etc/nhi/nhi.bash uncommented (and obviously restart your terminal/bash)?

does nhi works in that situation?

from nhi.

hutou avatar hutou commented on May 25, 2024

Same result : no output from nhi fetch {-1}
I tried something else:
Clone your repository

  • Compile nhi with make
  • delete /var/nhi/db
  • and rerun sudo -E bash ./install

Now I get

$ echo nhi test
nhi test
$ nhi fetch {-1}
no such shell session: 0
$ 

from nhi.

strang1ato avatar strang1ato commented on May 25, 2024

Before running install file again, you need to manually reverse changes made by install.

What you basically need to do is:

Now rerun sudo -E bash ./install (after following #16 (comment)) and restart you machine

from nhi.

hutou avatar hutou commented on May 25, 2024

Same error message : no such shell session: 0
(started from scratch, with ~/.bashrc only containing the source /etc/nhi/nhi.bash line)

from nhi.

strang1ato avatar strang1ato commented on May 25, 2024

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

from nhi.

hutou avatar hutou commented on May 25, 2024

Hi, here is the output :

$ getent group tty
tty:x:5:brltty
$ echo nhi test
nhi test
$ nhi fetch {-1}
no such shell session: 0
$ getent group tty
tty:x:5:brltty
$ sudo ls -l /tmp/nhi.log
-rw----r-T 1 root root 424 19 déc.  22:15 /tmp/nhi.log
sudo cat /tmp/nhi.log
2021-12-19 22:14:55 | process_vm_readv failed at get_shell_environ
2021-12-19 22:14:55 | no such table: 0
2021-12-19 22:15:13 | process_vm_readv failed at get_shell_environ
2021-12-19 22:15:13 | no such table: 0
2021-12-19 22:15:24 | process_vm_readv failed at get_shell_environ
2021-12-19 22:15:24 | no such table: 0
2021-12-19 22:15:27 | process_vm_readv failed at get_shell_environ
2021-12-19 22:15:27 | no such table: 0
2021-12-19 22:15:57 | process_vm_readv failed at get_shell_environ
2021-12-19 22:15:57 | no such table: 0
$ 

I ran these command inside the Kitty terminal I currently use, but got same output when run inside a gnome-terminal.
Also I ran these commands with a ~/.bashrc containing only the nhi.bash line, and after removing/reinstalling nhi and rebooting.

from nhi.

strang1ato avatar strang1ato commented on May 25, 2024

Can you run this command and send here the output:

objdump -T $(which bash) | awk -v sym=environ ' $NF == sym && $4 == ".bss"  { print $1; exit }'

from nhi.

hutou avatar hutou commented on May 25, 2024

Sure, here it is :

$ objdump -T $(which bash) | awk -v sym=environ ' $NF == sym && $4 == ".bss"  { print $1; exit }'
00000000000e92e0
$ 

from nhi.

strang1ato avatar strang1ato commented on May 25, 2024

What's your kernel version? and are you sure that all deps are installed?

from nhi.

hutou avatar hutou commented on May 25, 2024

Hmm, some additional infos from my system, which I maintain uptodate very frequently (every week or so)

$ cat /proc/version
Linux version 5.15.10-arch1-1 (linux@archlinux) (gcc (GCC) 11.1.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP PREEMPT Fri, 17 Dec 2021 11:17:37 +0000
$ 

Is there any dependency I could check which is not listed below ?
(Arch packages may be different than those of Debian family).

$ LANG=C sudo pacman -Q binutils gawk sqlite3 libsqlite3-dev libbpf libbpf-dev
binutils 2.36.1-3
gawk 5.1.1-1
sqlite 3.37.0-1
error: package 'libsqlite3-dev' was not found
libbpf 0.6.0-1
error: package 'libbpf-dev' was not found
$ 
  • binutils contains objdump
  • According to ROS, sqlite package contains dev version

As for libbpf-dev, I don't know, could it be the culprit ?

from nhi.

strang1ato avatar strang1ato commented on May 25, 2024

@hutou
On my arch device nhi works fine without any issues, I think that I might need to install nhi on fresh and mininimal arch install.
I will let you know whether I can replicate your issue.

from nhi.

strang1ato avatar strang1ato commented on May 25, 2024

@hutou
Can you follow these steps: #13 (comment), and check whether nhi works after reboot

from nhi.

hutou avatar hutou commented on May 25, 2024

Finally, nhi works on my computer, but ... I could not identify the precise reason why it did not work after the first installation, because I made many manipulations, installations and reinstallations without results before suddenly noticing that it worked!
Maybe the result of a system update?

In any case, I found that the installation of the lib32-sqlite package is not necessary for an Archlinux install.

Moreover, to answer my need for command history management (see post 1), in the /etc/nhi/nhi.bash file, I modified the line
declare PROMPT_COMMAND="prompter"
by
declare PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND}; prompter"
(and also to keep other programs using PROMPT_COMMAND working, like autojump .

Another suggestion : add "current" after the session Id when appropriate for nhi log command

Thanks for this very usefull utility.

from nhi.

strang1ato avatar strang1ato commented on May 25, 2024

Moreover, to answer my need for command history management (see post 1), in the /etc/nhi/nhi.bash file, I modified the line
declare PROMPT_COMMAND="prompter"
by
declare PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND}; prompter"
(and also to keep other programs using PROMPT_COMMAND working, like autojump .

I will try to add it in the next release

Another suggestion : add "current" after the session Id when appropriate for nhi log command

Thanks for suggestion, I will try to address that as well (although probably in some other time)

from nhi.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.