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

x/sys/unix: Android x86_64 emulator crashes when using the pipe syscall #40828

Open
cmcewen opened this issue Aug 16, 2020 · 3 comments · May be fixed by golang/sys#75
Open

x/sys/unix: Android x86_64 emulator crashes when using the pipe syscall #40828

cmcewen opened this issue Aug 16, 2020 · 3 comments · May be fixed by golang/sys#75

Comments

@cmcewen
Copy link

@cmcewen cmcewen commented Aug 16, 2020

What version of Go are you using (go version)?

$ go version
go version go1.13.15 darwin/amd64

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:

08-10 17:54:49.398  5047  5047 F DEBUG   : Revision: '0'
08-10 17:54:49.398  5047  5047 F DEBUG   : ABI: 'x86_64'
08-10 17:54:49.398  5047  5047 F DEBUG   : pid: 4938, tid: 4958, name: XXXXX
08-10 17:54:49.398  5047  5047 F DEBUG   : signal 31 (SIGSYS), code 1 (SYS_SECCOMP), fault addr --------
08-10 17:54:49.398  5047  5047 F DEBUG   : Cause: seccomp prevented call to disallowed x86_64 system call 22

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

@tklauser tklauser changed the title Android x86_64 emulator crashes when using the pipe syscall - golang.org/x/sys x/sys/unix: Android x86_64 emulator crashes when using the pipe syscall Aug 17, 2020
@gopherbot gopherbot added this to the Unreleased milestone Aug 17, 2020
@dmitshur
Copy link
Contributor

@dmitshur dmitshur commented Aug 18, 2020

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Aug 18, 2020

Do you see the same problem if you call syscall.Pipe? Seems to me that you would, but it would be nice to check. Thanks.

@cmcewen
Copy link
Author

@cmcewen cmcewen commented Nov 18, 2020

This PR was able to fix the crash for me: golang/sys#75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants