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
x/sys/unix: Android x86_64 emulator crashes when using the pipe syscall #40828
Comments
Do you see the same problem if you call |
This PR was able to fix the crash for me: golang/sys#75 |
Change https://golang.org/cl/350530 mentions this issue: |
Change https://golang.org/cl/350549 mentions this issue: |
Most architectures currently already implement Pipe using the pipe2 syscall. Only 386, amd64 and mips{,le} still use the pipe syscall. However, some systems (e.g. Android seccomp policies) block that syscall, see #40828 for an example. The pipe2 syscall was added in Linux kernel version 2.6.27. The minimum required Linux kernel version for Go 1.18 will be changed to 2.6.32 per #45964 so it is possible to unify the implementation of Pipe using the pipe2 syscall. For #45964 Change-Id: I8ed6a391300c95f3107b4ec6b27d320e42fb535b Reviewed-on: https://go-review.googlesource.com/c/go/+/350530 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
What version of Go are you using (
go version
)?I am using gomobile to compile a library to run on Android
Does this issue reproduce with the latest release?
Yes - it is an issue in golang.org/x/sys
What operating system and processor architecture are you using (
go env
)?I am running a library compiled with gomobile running on the AOSP API 29 x86_64 emulator
What did you do?
Ran the app and called the library
What did you expect to see?
The app run fine
What did you see instead?
The app crashed:
Using strace I was able to track it down to pipe:
9930 rt_tgsigqueueinfo(9900, 9930, SIGSYS, {si_signo=SIGSYS, si_code=SYS_SECCOMP, si_call_addr=0x7d49d5a145a6, si_syscall=__NR_pipe, si_arch=AUDIT_ARCH_X86_64}) = 0
The text was updated successfully, but these errors were encountered: