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

I few problems regarding valgrind proot-distro and htop #5860

Closed
shadmansaleh opened this issue Sep 28, 2020 · 4 comments
Closed

I few problems regarding valgrind proot-distro and htop #5860

shadmansaleh opened this issue Sep 28, 2020 · 4 comments

Comments

@shadmansaleh
Copy link
Contributor

Problem description

So i'm having a few problems.

  1. Valgrind crashes with bad system call. Valgrind doesn't even start when I execute it I just get Bad system callIt was fine back in april/may when I last used it . I installed it yesterday again and now it just doesn't work. Maybe it's because of a new version or some patch here.
    Output:
valgrind
Bad system call
  1. I tried to use ubuntu-20.04 in proot-distro but the main Problem is the apt-get update doesn't work. It just fails with an connection error. I think the request to repository is getting redirected to some invalid ip. I think so because when the command runs it first shows on ip the imidiately changes to a different ip . Though it's posible that it's just trying a different repo.
    Output:
root@localhost:~# apt-get update
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
  Could not connect to ports.ubuntu.com:80 (91.189.88.142), connection timed out

(I'm not really sure if this issue should be here.)(I thought triying some alternative repo might work. But I donn't really know how to do that)

  1. So it's probably not an issue but a feature .
    htop asks for root access when ran . I get it /proc/stat is not available . I donn't know how but before this was added htop used to work fine . It use to display only processes that were owned/started by user termux. Though limited htop it was just enough for me . Actualy showing only termux processes made finding processes alot easier. top and pstree still works . But I really like the looks of htop. Is it possible to make root access optional again for htop.
    Output:
+$ htop
Cannot open '/proc/stat'.
On Android 8 and higher access to this file is restricted by SELinux.
Root your device in order to get 'htop' working properly.
: Permission denied

(consider this as a feature request)

Steps to reproduce

  1. Install valgrind
    execute valgrind
  2. install proot-distro
    install ubuntu proot-distro install ubuntu
    run apt-get update in ubuntu
  3. Install and run htop.

Expected behavior

  1. valgrind should at lest run
  2. update packages inside ubuntu
  3. It's probably expected behavior

Additional information

Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://main.termux-mirror.ml/ stable main
# science-repo (sources.list.d/science.list)
deb https://science.termux-mirror.ml science stable
# game-repo (sources.list.d/game.list)
deb https://games.termux-mirror.ml games stable
# unstable-repo (sources.list.d/unstable.list)
deb https://unstable.termux-mirror.ml unstable main
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/24 termux extras
# x11-repo (sources.list.d/x11.list)
deb https://x11.termux-mirror.ml x11 main
Updatable packages:
All packages up to date
Android version:
10
Kernel build information:
Linux localhost 4.4.177-19407255 #1 SMP PREEMPT Mon Aug 17 20:47:53 KST 2020 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-M205F

@ghost
Copy link

ghost commented Sep 28, 2020

Valgrind crashes with bad system call.

Will check that.

I tried to use ubuntu-20.04 in proot-distro but the main Problem is the apt-get update doesn't work. It just fails with an connection error.

I have no issues with it. Try to change name servers in /etc/resolv.conf.

htop asks for root access when ran . I get it /proc/stat is not available . I donn't know how but before this was added htop used to work fine .

Use htop-legacy which displays process list and memory usage but nothing regarding CPU stats.

Htop since v3.0.0 can't work if /proc/stat is not readable. That's a won'tfix and it was moved to root-repo but was not deleted from termux-packages (I'll do that now).

@shadmansaleh
Copy link
Contributor Author

Will check that.

Thanks.

I have no issues with it. Try to change name servers in /etc/resolv.conf.

Changing cloudflare dns to google dns has resolved the issue

Use htop-legacy which displays process list and
memory usage but nothing regarding CPU stats.

Works for me.

Htop since v3.0.0 can't work if /proc/stat is not readable

Whats weird is it actualy works under proots fakeroot. (From enverionments installed through proot-distro). That's why I thought it was a restriction imposed by termux.

@ghost
Copy link

ghost commented Sep 29, 2020

From enverionments installed through proot-distro

proot-distro fakes /proc/stat ;)
https://github.com/termux/proot-distro/blob/master/proot-distro.sh#L274
https://github.com/termux/proot-distro/blob/master/proot-distro.sh#L670

Standalone proot by itself doesn't give you read access to /proc/stat.

@shadmansaleh
Copy link
Contributor Author

proot-distro fakes /proc/stat

Oh . Now it all makes sence 👍

ghost pushed a commit that referenced this issue Oct 1, 2020
@ghost ghost closed this as completed in 010d165 Oct 1, 2020
@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant