Repository: libuv/libuv

Issue #2923: syscall crash on Android 9.0 x86
Created: 2020-07-25T07:22:12Z
Version: v1.38.1
Platform: Android 9.0 x86

Crash message like below:
A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
A/DEBUG: Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:9/PSR1.180720.117/5875966:user/release-keys'
A/DEBUG: Revision: '0'
A/DEBUG: ABI: 'x86'
A/DEBUG: pid: 6960, tid: 6995, name: Jni.startVpn  >>> com.test.debug <<<
A/DEBUG: signal 31 (SIGSYS), code 1 (SYS_SECCOMP), fault addr --------
A/DEBUG: Cause: seccomp prevented call to disallowed x86 system call 345
A/DEBUG:     eax 00000159  ebx 00000047  ecx 00000000  edx 00000000
A/DEBUG:     edi 00080802  esi 00000000
A/DEBUG:     ebp 00000000  esp cf2b8ff8  eip efa82b39
A/DEBUG: backtrace:
A/DEBUG:     #00 pc 00000b39  [vdso:efa82000] (__kernel_vsyscall+9)
A/DEBUG:     #01 pc 0001fdf8  /system/lib/libc.so (syscall+40)
A/DEBUG:     #02 pc 0003fbb3  /data/app/com.test.debug-W2QfgNIlmc9_cNdXiIi3yw==/lib/x86/libtest.so (uv__sendmmsg+115)
A/DEBUG:     #03 pc 0002347f  /data/app/com.test.debug-W2QfgNIlmc9_cNdXiIi3yw==/lib/x86/libtest.so
A/DEBUG:     #04 pc 00090c12  /system/lib/libc.so (pthread_once+98)
A/DEBUG:     #05 pc 0003f4ed  /data/app/com.test.debug-W2QfgNIlmc9_cNdXiIi3yw==/lib/x86/libtest.so (uv_once+61)
A/DEBUG:     #06 pc 00021aba  /data/app/com.test.debug-W2QfgNIlmc9_cNdXiIi3yw==/lib/x86/libtest.so
A/DEBUG:     #07 pc 000219cd  /data/app/com.test.debug-W2QfgNIlmc9_cNdXiIi3yw==/lib/x86/libtest.so (uv__udp_send+1101)
A/DEBUG:     #08 pc 0001ba23  /data/app/com.test.debug-W2QfgNIlmc9_cNdXiIi3yw==/lib/x86/libtest.so (uv_udp_send+211)

Maybe we should consider make a direct call on Android platform?

Duplicate issue #2942: seccomp may prevent call to disallowed x86 system call 345 on Android
Created: 2020-08-04T14:01:45Z
Hello,
When I call uv_udp_send will get an error. but it working on macOS and iOS.
Android version: 10
Libuv version: 1.38.1
uv_udp_send(req->send_udp, req->socket, req->buf, 1, NULL, send_cb);

 *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
 Build fingerprint: 'google/sdk_gphone_x86/generic_x86:10/dev-keys'
 Revision: '0'
 ABI: 'x86'
 Timestamp: 2020-08-04 21:49:02+0800
 pid: 3789, tid: 3907, name: Thread-19  >>> com.example <<<
 uid: 10174
 signal 31 (SIGSYS), code 1 (SYS_SECCOMP), fault addr --------
 Cause: seccomp prevented call to disallowed x86 system call 345
     eax 00000159  ebx 0000006c  ecx 00000000  edx 00000000
     edi f3c29c34  esi 00000000
     ebp 2c689d2d  esp c3adc7f8  eip f66f8b79
 backtrace:
       #00 pc 00000b79  [vdso] (__kernel_vsyscall+9)
       #01 pc 00092328  /apex/com.android.runtime/lib/bionic/libc.so (syscall+40) (BuildId: 471745f0fbbcedb3db1553d5bd6fcd8b)
       #02 pc 0001f3fe  hide-kaEPJawgZH70dU5LAQ0T4A==/lib/x86/libuv.so (BuildId: cda0c7b1ca29b912b7a85c2642d8c1408e2d5eb5)
       #03 pc 0001bc3a  hide-kaEPJawgZH70dU5LAQ0T4A==/lib/x86/libuv.so (BuildId: cda0c7b1ca29b912b7a85c2642d8c1408e2d5eb5)
       #04 pc 0011c4b0  /apex/com.android.runtime/lib/bionic/libc.so (pthread_once+96) (BuildId: 471745f0fbbcedb3db1553d5bd6fcd8b)
       #05 pc 00019683  hide-kaEPJawgZH70dU5LAQ0T4A==/lib/x86/libuv.so (uv_once+35) (BuildId: cda0c7b1ca29b912b7a85c2642d8c1408e2d5eb5)
       #06 pc 0001a87f  hide-kaEPJawgZH70dU5LAQ0T4A==/lib/x86/libuv.so (BuildId: cda0c7b1ca29b912b7a85c2642d8c1408e2d5eb5)
       #07 pc 0001a6f1  hide-kaEPJawgZH70dU5LAQ0T4A==/lib/x86/libuv.so (BuildId: cda0c7b1ca29b912b7a85c2642d8c1408e2d5eb5)
       #08 pc 0000baa1  hide-kaEPJawgZH70dU5LAQ0T4A==/lib/x86/libuv.so (uv_udp_send+145) (BuildId: cda0c7b1ca29b912b7a85c2642d8c1408e2d5eb5)

Closing comment (2020-08-04T19:14:38Z): Duplicate of #2923