-
Notifications
You must be signed in to change notification settings - Fork 164
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
Assertion "IS_IN_SYSENTER(tracee)" #13
Comments
I'm working on fix, for now you should be able to work around this with It's because in Linux 4.8 order of PTRACE_SYSCALL event and seccomp event was swapped (Linux commit, mailing list post, upstream PRoot issue) |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
Function not implement suggests ENOSYS, violation of seccomp policy (system
one, not one provided by PRoot). I'll build aarch64 Oreo AOSP to check if I
could reproduce it there, anyway I haven't solution yet.
|
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
Exactly as message says, first program failed to execute and proot noticed termux-exec in LD_PRELOAD, that command was not either not run from your script, there's some bug in your script and it kept In this issue there's probably something between libc, proot and kernel, so I cannot point anything in script snippets. I'm trying to set up reproduction AOSP environment, but running AArch64 AOSP Oreo with modified kernel somehow became surprisingly difficult. |
This comment was marked as spam.
This comment was marked as spam.
I've finally got reproduction environment so I can finally start really working on it (but keep in mind that from reproducing problem to having solution is still some work to do and I have job/family/life to spent time on too, so please be patient)
You need to realize that it's not just about Android version, but also about Linux (kernel) version, which isn't tightly coupled to Android versions, OEMs can choose to use different kernel versions with particular Android version (AFAIK their choice of kernel version depends on for what version they have drivers ready for). For example, on my phone I've got Android 8.0 with Linux 4.4 and TermuxArch runs fine there. The changes that broke proot are:
That's what should have avoided termux-exec problem, yet somehow we've got it (but that is separate issue probably unrelated to main one in this thread). Bug in script is only one of possibilities and I'd expect that error was actually caused by manually running command (as I don't really know how could
Some users like to autostart |
I was original poster for the issue in termux-arch. It could be possible that it is a kernel issue. Linux localhost 4.9.65-13087505 #1 SMP PREEMPT Sun Feb 25 18:48:40 KST 2018 aarch64 Android That's the kernel version I am using. It's a snapdragon 845 so it's the latest version. Maybe it's a issue specifically to it? |
AFAIK issue is related to change in mainline kernel. Could you check what result does this program print if run under proot #include <stdio.h>
#include <errno.h>
#include <fcntl.h>
int main() {
int a = open("nonexistent-test-file-a", O_RDONLY);
int ae = errno;
int b = open("nonexistent-test-dir/nonexistent-test-file-b", O_RDONLY);
int be = errno;
int c = open("nonexistent-test-file-c", O_RDONLY);
int ce = errno;
printf("[%d %d %d %d %d %d]\n", a, ae, b, be, c, ce);
} clang testapp.c -o testapp
PROOT_NO_SECCOMP=1 proot ./testapp |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
Here you go.
|
* Detect seccomp event order and handle both old and new one * If new seccomp order is in use, syscalls with FILTER_SYSEXIT are handled immediately as we cannot reach syscall entry event as it already happened (but wasn't delivered as it wasn't requested) * When we set PR_void syscall in non-seccomp handler, ignore next SIGSYS, beacuse Android seccomp policy disallows -1 syscall #13
I have initial fix for this issue (now on master branch here and on termux/termux-packages#2374). Please remove Running debuggers inside proot on Linux >= 4.8 is not yet supported |
Sounds good, once @SDRausty commits this, I will try it. Thst is unfortunate that debugger doesn't work on 4.9. Worst comes to worse, I have a older rooted tablet where I can just chroot to play around with. Would love to use the latest and greatest though. |
This comment was marked as spam.
This comment was marked as spam.
I've pushed new proot version which fixes debugging and hang after which Ctrl-C exits proot and makes bash print
thing described by @SwiftLawnGnome in SDRausty/TermuxArch#74 (comment)). Version from my yesterday commit is now in apt repo, for status on todays version see termux/termux-packages#2383 |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
I ran the installer again on 8.0 on the newest kernal on s9+ using sd 845. Can you explain these warnings and errors:
Otherwise it installed and I can run arch kinda: I just wanna make sure those errors dont cause fatal errors later on. |
This comment was marked as spam.
This comment was marked as spam.
@SDRausty yeah it seems they are mostly warnings and proot seems to suppress them and continue working. So I guess it's all good. I'll let you guys know of any other issues in the termux-arch github thanks for the help. |
This comment was marked as spam.
This comment was marked as spam.
@SDRausty @Root-voidX |
Would you suggest keeping them anyway. Seems like the errors were suppressed. Pacman indicates a successful install? |
This comment was marked as spam.
This comment was marked as spam.
Interesting tidbit, arch loaded in that latest firmware and kernal for my device in an update. Install went fine with no errors, a bunch of read warnings but that's about it. |
This comment was marked as spam.
This comment was marked as spam.
Hi Setting up man-db (2.8.4-2+b1) ... |
In ubuntu, sudo works as long as you don't use *on an non-rooted device |
@bakaika It is completely different issue. Not #13. |
Oh sorry. What issue is it? |
Open new. |
* Detect seccomp event order and handle both old and new one * If new seccomp order is in use, syscalls with FILTER_SYSEXIT are handled immediately as we cannot reach syscall entry event as it already happened (but wasn't delivered as it wasn't requested) * When we set PR_void syscall in non-seccomp handler, ignore next SIGSYS, beacuse Android seccomp policy disallows -1 syscall #13
@Root-voidX asked, "A few questions about Arch Linux in Termux PRoot #59" including:
After working on this issue; Here is what we have:
Assertion "IS_IN_SYSENTER(tracee)" failed:
Proot warning: signal 6 recieved when
proot --link2symlink -0 $PREFIX/bin/applets/tar xf $file
is called. Busyboxtar
never finishes unpacking the downloaded system image file. Insight is welcome.The text was updated successfully, but these errors were encountered: