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

proot: termux-chroot does not work on Nexus 9 #258

Closed
vainikkaj opened this issue May 10, 2016 · 12 comments
Closed

proot: termux-chroot does not work on Nexus 9 #258

vainikkaj opened this issue May 10, 2016 · 12 comments

Comments

@vainikkaj
Copy link

Installing latest version of proot and running termux-chrootgives following error:

proot warning: can't set the syscall number: Invalid argument
proot warning: can't set the syscall number: Invalid argument
proot warning: can't set the syscall number: Invalid argument
proot warning: can't set the syscall number: Invalid argument
proot warning: can't set the syscall number: Invalid argument
proot warning: can't set the syscall number: Invalid argument
proot info: vpid 1: terminated with signal 11

Full strace available at https://gist.github.com/vainikkaj/122b795b286ad3849e1e9be74e450522

@fornwall
Copy link
Member

Can you attach the output of running

uname -a

Perhaps it's something with the kernel version or configuration on the Nexus 9.

@vainikkaj
Copy link
Author

$ uname -a
Linux localhost 3.10.40-gcc76e44 #1 SMP PREEMPT Fri Mar 25 15:18:18 UTC 2016 aarch64 Android

@fornwall
Copy link
Member

Can you test if setting

export PROOT_NO_SECCOMP=1

before running termux-chroot makes a difference?

@vainikkaj
Copy link
Author

Unfortunately, still broken even with exported variable. Output is exactly the same as before.

@michalbednarski
Copy link
Contributor

This strace is for termux-chroot wrapper script which prepares arguments and launches proot, could You check if just simple proot ls works and provide strace for it if it's enough to cause error (otherwise we'll have to try adding other arguments that were provided by termux-chroot script)

@vainikkaj
Copy link
Author

Running proot lsalso fails.

$ proot ls
proot warning: can't set the syscall number: Invalid argument
proot warning: can't set the syscall number: Invalid argument
proot info: vpid 1: terminated with signal 11

strace output

@michalbednarski
Copy link
Contributor

I've noticed that ARM64 build of proot shouldn't have code path with this message, which suggests that ARM64 build of PRoot in Termux was compiled without ARCH_ARM64 defined.

https://github.com/proot-me/PRoot/blob/f393b4daf9bfd6d034cf2c8dd56d44f135b08e93/src/tracee/reg.c#L300-L321

@fornwall
Copy link
Member

@michalbednarski We're building from the next branch, so there is can't set the syscall number path also for ARM64:

https://github.com/proot-me/PRoot/blob/next/src/tracee/reg.c#L302

@michalbednarski
Copy link
Contributor

Ah, that way, I was a bit lost about different ptrace() in source and strace.

ptrace(PTRACE_SETREGSET, 19457, 0x404 /* NT_??? */, [{0x7fedb85df8, 8}]) = -1 EINVAL (Invalid argument)

It looks like kernel did't recognize NT_ARM_SYSTEM_CALL so not much we can do here

For reference
PRoot commit
Linux kernel commit (which apparently wasn't applied on this device)

@fornwall
Copy link
Member

fornwall commented Jun 6, 2016

Closing this since there is not much to do if the kernel lacks support (the Nexus 9 kernel seems to rather odd in how it's configured compared to other devices).

@9990242854
Copy link

When i use that export PROOT_NO_SECCOMP=1 , it will work but when i update then its show BUS ERROR
Please fix that.

@ghost
Copy link

ghost commented Feb 4, 2019

then its show BUS ERROR
Please fix that.

@9990242854 I suggest you to open issue at https://github.com/termux/proot/issues - more probability that it will be fixed.

@termux termux locked and limited conversation to collaborators Oct 9, 2021
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

4 participants