-
Notifications
You must be signed in to change notification settings - Fork 555
[native] update p/invoke tables for libSystem.Native.so
#10330
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes: #10329 Context: dotnet/runtime#116639 Some `SystemNative_` methods were removed/changed in .NET 10 Preview 6. We should update our tables.
filipnavara
approved these changes
Jul 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally and it fixed the error on our app.
jonathanpeppers
added a commit
that referenced
this pull request
Jul 24, 2025
Context: #10330 The problem fixed in #10330 makes me think we are missing a test. And indeed, this crashed on CoreCLR! 07-23 22:46:43.058 7510 7535 I NUnit : DirectoryTest 07-23 22:46:43.058 7510 7535 I NUnit : GetFiles 07-23 22:46:43.061 7510 7535 D monodroid-assembly: [precompiled] clr_pinvoke_override ("libSystem.Native", "SystemNative_Stat") 07-23 22:46:43.062 7510 7535 D monodroid: [precompiled] p/invoke found 07-23 22:46:43.070 7510 7534 I droid.NET_Test: Explicit concurrent copying GC freed 45(32KB) AllocSpace objects, 0(0B) LOS objects, 57% free, 1148KB/2684KB, paused 1.838ms total 7.423ms 07-23 22:46:43.072 7510 7535 D monodroid-assembly: [precompiled] clr_pinvoke_override ("libSystem.Native", "SystemNative_OpenDir") 07-23 22:46:43.072 7510 7535 D monodroid: [precompiled] p/invoke found 07-23 22:46:43.072 7510 7535 D monodroid-assembly: [precompiled] clr_pinvoke_override ("libSystem.Native", "SystemNative_ReadDir") 07-23 22:46:43.072 7510 7535 D monodroid-assembly: Symbol 'SystemNative_ReadDir' in library 'libSystem.Native' not found in the generated tables, falling back to slow path 07-23 22:46:43.072 7510 7535 F monodroid-assembly: Missing pinvoke SystemNative_ReadDir@libSystem.Native 07-23 22:46:43.072 7510 7535 F monodroid-assembly: Abort at precompiled.cc:88:3 ('static void *xamarin::android::PinvokeOverride::monodroid_pinvoke_override(const char *, const char *)') --------- beginning of crash 07-23 22:46:43.073 7510 7535 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 7535 (Instrumentation), pid 7510 (droid.NET_Tests) 07-23 22:46:43.094 7550 7550 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone 07-23 22:46:43.095 1870 1870 I /system/bin/tombstoned: received crash request for pid 7535 07-23 22:46:43.096 7550 7550 I crash_dump64: performing dump of process 7510 (target tid = 7535) 07-23 22:46:43.099 7550 7550 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 07-23 22:46:43.099 7550 7550 F DEBUG : Build fingerprint: 'Android/sdk_phone_x86_64/generic_x86_64:10/QSR1.210820.001/7663313:userdebug/test-keys' 07-23 22:46:43.099 7550 7550 F DEBUG : Revision: '0' 07-23 22:46:43.099 7550 7550 F DEBUG : ABI: 'x86_64' 07-23 22:46:43.100 7550 7550 F DEBUG : Timestamp: 2025-07-23 22:46:43+0000 07-23 22:46:43.100 7550 7550 F DEBUG : pid: 7510, tid: 7535, name: Instrumentation >>> Mono.Android.NET_Tests <<< 07-23 22:46:43.100 7550 7550 F DEBUG : uid: 10119 07-23 22:46:43.100 7550 7550 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- 07-23 22:46:43.100 7550 7550 F DEBUG : Abort message: 'Missing pinvoke SystemNative_ReadDir@libSystem.Native' 07-23 22:46:43.100 7550 7550 F DEBUG : rax 0000000000000000 rbx 0000000000001d56 rcx 000078b597d263f8 rdx 0000000000000006 07-23 22:46:43.100 7550 7550 F DEBUG : r8 000078b50724aa40 r9 0000000000000000 r10 000078b4b9e158d0 r11 0000000000000246 07-23 22:46:43.100 7550 7550 F DEBUG : r12 000078b507358b00 r13 000078b4b9e159c0 r14 000078b4b9e15958 r15 0000000000001d6f 07-23 22:46:43.100 7550 7550 F DEBUG : rdi 0000000000001d56 rsi 0000000000001d6f 07-23 22:46:43.100 7550 7550 F DEBUG : rbp 000078b4b9e15a70 rsp 000078b4b9e158c8 rip 000078b597d263f8 07-23 22:46:43.263 7550 7550 F DEBUG : 07-23 22:46:43.263 7550 7550 F DEBUG : backtrace: 07-23 22:46:43.263 7550 7550 F DEBUG : #00 pc 00000000000943f8 /apex/com.android.runtime/lib64/bionic/libc.so (syscall+24) (BuildId: b5c6019a3b4ea61b5e9a2f56319b584e) 07-23 22:46:43.263 7550 7550 F DEBUG : #1 pc 0000000000097146 /apex/com.android.runtime/lib64/bionic/libc.so (abort+182) (BuildId: b5c6019a3b4ea61b5e9a2f56319b584e) 07-23 22:46:43.263 7550 7550 F DEBUG : #2 pc 00000000000c41c9 /data/app/Mono.Android.NET_Tests-3-1TDlT55wuyU7WHXRhzQQ==/split_config.x86_64.apk!libnet-android.release.so (offset 0x1850000) (xamarin::android::Helpers::abort_application(_LogCategories, char const*, bool, std::__ndk1::source_location)+425) (BuildId: f25730a1c837257e71f58c776b710328f9824f26) 07-23 22:46:43.263 7550 7550 F DEBUG : #3 pc 00000000000cee85 /data/app/Mono.Android.NET_Tests-3-1TDlT55wuyU7WHXRhzQQ==/split_config.x86_64.apk!libnet-android.release.so (offset 0x1850000) (xamarin::android::PinvokeOverride::monodroid_pinvoke_override(char const*, char const*)+8725) (BuildId: f25730a1c837257e71f58c776b710328f9824f26) 07-23 22:46:43.264 7550 7550 F DEBUG : #4 pc 00000000000cf191 /data/app/Mono.Android.NET_Tests-3-1TDlT55wuyU7WHXRhzQQ==/split_config.x86_64.apk!libnet-android.release.so (offset 0x1850000) (xamarin::android::Host::clr_pinvoke_override(char const*, char const*)+225) (BuildId: f25730a1c837257e71f58c776b710328f9824f26) 07-23 22:46:43.264 7550 7550 F DEBUG : #5 pc 00000000003f21f6 /data/app/Mono.Android.NET_Tests-3-1TDlT55wuyU7WHXRhzQQ==/split_config.x86_64.apk With the fix in place in #10330, it passes.
jonathanpeppers
added a commit
that referenced
this pull request
Jul 24, 2025
Fixes: #10329 Context: dotnet/runtime#116639 Some `SystemNative_` methods were removed/changed in .NET 10 Preview 6. We should update our tables.
jonathanpeppers
added a commit
that referenced
this pull request
Jul 24, 2025
Context: #10330 The problem fixed in #10330 makes me think we are missing a test. And indeed, this crashed on CoreCLR! 07-23 22:46:43.058 7510 7535 I NUnit : DirectoryTest 07-23 22:46:43.058 7510 7535 I NUnit : GetFiles 07-23 22:46:43.061 7510 7535 D monodroid-assembly: [precompiled] clr_pinvoke_override ("libSystem.Native", "SystemNative_Stat") 07-23 22:46:43.062 7510 7535 D monodroid: [precompiled] p/invoke found 07-23 22:46:43.070 7510 7534 I droid.NET_Test: Explicit concurrent copying GC freed 45(32KB) AllocSpace objects, 0(0B) LOS objects, 57% free, 1148KB/2684KB, paused 1.838ms total 7.423ms 07-23 22:46:43.072 7510 7535 D monodroid-assembly: [precompiled] clr_pinvoke_override ("libSystem.Native", "SystemNative_OpenDir") 07-23 22:46:43.072 7510 7535 D monodroid: [precompiled] p/invoke found 07-23 22:46:43.072 7510 7535 D monodroid-assembly: [precompiled] clr_pinvoke_override ("libSystem.Native", "SystemNative_ReadDir") 07-23 22:46:43.072 7510 7535 D monodroid-assembly: Symbol 'SystemNative_ReadDir' in library 'libSystem.Native' not found in the generated tables, falling back to slow path 07-23 22:46:43.072 7510 7535 F monodroid-assembly: Missing pinvoke SystemNative_ReadDir@libSystem.Native 07-23 22:46:43.072 7510 7535 F monodroid-assembly: Abort at precompiled.cc:88:3 ('static void *xamarin::android::PinvokeOverride::monodroid_pinvoke_override(const char *, const char *)') --------- beginning of crash 07-23 22:46:43.073 7510 7535 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 7535 (Instrumentation), pid 7510 (droid.NET_Tests) 07-23 22:46:43.094 7550 7550 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone 07-23 22:46:43.095 1870 1870 I /system/bin/tombstoned: received crash request for pid 7535 07-23 22:46:43.096 7550 7550 I crash_dump64: performing dump of process 7510 (target tid = 7535) 07-23 22:46:43.099 7550 7550 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 07-23 22:46:43.099 7550 7550 F DEBUG : Build fingerprint: 'Android/sdk_phone_x86_64/generic_x86_64:10/QSR1.210820.001/7663313:userdebug/test-keys' 07-23 22:46:43.099 7550 7550 F DEBUG : Revision: '0' 07-23 22:46:43.099 7550 7550 F DEBUG : ABI: 'x86_64' 07-23 22:46:43.100 7550 7550 F DEBUG : Timestamp: 2025-07-23 22:46:43+0000 07-23 22:46:43.100 7550 7550 F DEBUG : pid: 7510, tid: 7535, name: Instrumentation >>> Mono.Android.NET_Tests <<< 07-23 22:46:43.100 7550 7550 F DEBUG : uid: 10119 07-23 22:46:43.100 7550 7550 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- 07-23 22:46:43.100 7550 7550 F DEBUG : Abort message: 'Missing pinvoke SystemNative_ReadDir@libSystem.Native' 07-23 22:46:43.100 7550 7550 F DEBUG : rax 0000000000000000 rbx 0000000000001d56 rcx 000078b597d263f8 rdx 0000000000000006 07-23 22:46:43.100 7550 7550 F DEBUG : r8 000078b50724aa40 r9 0000000000000000 r10 000078b4b9e158d0 r11 0000000000000246 07-23 22:46:43.100 7550 7550 F DEBUG : r12 000078b507358b00 r13 000078b4b9e159c0 r14 000078b4b9e15958 r15 0000000000001d6f 07-23 22:46:43.100 7550 7550 F DEBUG : rdi 0000000000001d56 rsi 0000000000001d6f 07-23 22:46:43.100 7550 7550 F DEBUG : rbp 000078b4b9e15a70 rsp 000078b4b9e158c8 rip 000078b597d263f8 07-23 22:46:43.263 7550 7550 F DEBUG : 07-23 22:46:43.263 7550 7550 F DEBUG : backtrace: 07-23 22:46:43.263 7550 7550 F DEBUG : #00 pc 00000000000943f8 /apex/com.android.runtime/lib64/bionic/libc.so (syscall+24) (BuildId: b5c6019a3b4ea61b5e9a2f56319b584e) 07-23 22:46:43.263 7550 7550 F DEBUG : #1 pc 0000000000097146 /apex/com.android.runtime/lib64/bionic/libc.so (abort+182) (BuildId: b5c6019a3b4ea61b5e9a2f56319b584e) 07-23 22:46:43.263 7550 7550 F DEBUG : #2 pc 00000000000c41c9 /data/app/Mono.Android.NET_Tests-3-1TDlT55wuyU7WHXRhzQQ==/split_config.x86_64.apk!libnet-android.release.so (offset 0x1850000) (xamarin::android::Helpers::abort_application(_LogCategories, char const*, bool, std::__ndk1::source_location)+425) (BuildId: f25730a1c837257e71f58c776b710328f9824f26) 07-23 22:46:43.263 7550 7550 F DEBUG : #3 pc 00000000000cee85 /data/app/Mono.Android.NET_Tests-3-1TDlT55wuyU7WHXRhzQQ==/split_config.x86_64.apk!libnet-android.release.so (offset 0x1850000) (xamarin::android::PinvokeOverride::monodroid_pinvoke_override(char const*, char const*)+8725) (BuildId: f25730a1c837257e71f58c776b710328f9824f26) 07-23 22:46:43.264 7550 7550 F DEBUG : #4 pc 00000000000cf191 /data/app/Mono.Android.NET_Tests-3-1TDlT55wuyU7WHXRhzQQ==/split_config.x86_64.apk!libnet-android.release.so (offset 0x1850000) (xamarin::android::Host::clr_pinvoke_override(char const*, char const*)+225) (BuildId: f25730a1c837257e71f58c776b710328f9824f26) 07-23 22:46:43.264 7550 7550 F DEBUG : #5 pc 00000000003f21f6 /data/app/Mono.Android.NET_Tests-3-1TDlT55wuyU7WHXRhzQQ==/split_config.x86_64.apk With the fix in place in #10330, it passes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #10329
Context: dotnet/runtime#116639
Some
SystemNative_
methods were removed/changedin .NET 10 Preview 6. We should update our tables.