Uh oh!
There was an error while loading. Please reload this page.
[Android] Workaround for invalid return value from clock_nanosleep - #64679
Conversation
ghost
commented
Feb 2, 2022
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsThere used to be a bug in Android libc implementation of Fixes dotnet/android#6600
|
simonrozsival
commented
Feb 2, 2022
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
lambdageek
left a comment
There was a problem hiding this comment.
It's ok, but maybe we can have less copy/pasted code if we added a utility function to eglib
Uh oh!
There was an error while loading. Please reload this page.
…sival/fix-old-android-clock-nanosleep-inconsistency
lambdageek
left a comment
There was a problem hiding this comment.
Good start. Needs couple of changes
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Thanks for the suggestions, @lambdageek!
lambdageek
left a comment
There was a problem hiding this comment.
Windows builds are unhappy. But we don't need clock_nanosleep there, anyway.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
simonrozsival
commented
Feb 8, 2022
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
simonrozsival
commented
Feb 9, 2022
There's a failing WASM test but it seems completely unrelated to this PR to me. I believe this PR could be merged. |
lambdageek
commented
Feb 9, 2022
Yea the browser wasm windows System.Threading.Channels.Tests failures are #65012 |
lambdageek
commented
Feb 9, 2022
@steveisok should we backport to net6? |
Yes. |
akoeplinger
commented
Feb 15, 2022
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1846939447 |
@akoeplinger backporting to release/6.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Account forincorrect implementation of clock_nanosleepin older Android libc
Applying: Shorten comments
Applying: Add g_clock_nanosleep function
error: sha1 information is lacking or useless (src/mono/mono/mini/mini-posix.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 Add g_clock_nanosleep function
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
akoeplinger
commented
Feb 15, 2022
@simonrozsival can you please look into doing a manual PR for 6.0? thanks |
simonrozsival
commented
Feb 15, 2022
@akoeplinger Sure! I'll create one. |
…otnet#64679) There used to be a bug in Android libc implementation of `clock_nanosleep`. The return value should be `errno` on errors but instead in it returns `-1` and sets `errno`. The libc (Bionic) bug [has been fixed](https://android-review.googlesource.com/c/platform/bionic/+/110652/) since Android 6 and newer but it causes problems to [customers who are unable to update Android on their devices](dotnet/android#6600 (comment)). Fixesdotnet/android#6600 * Account for incorrect implementation of clock_nanosleep in older Android libc * Shorten comments * Add g_clock_nanosleep function * Add remap definition * Fix build * Make sure the extra check runs only on Android * Make Windows builds happy * Try making wasm builds happy
This is a follow-up of #64679 I realized that one invocation of `clock_nanosleep` wasn't replaced with `g_clock_nanosleep`.
…ono#21433) Fixesdotnet/android#6600 Backported from dotnet/runtime#64679 and dotnet/runtime#65373 (cherry picked from commit 36daf03)
…osleep (#21435) * [Android] Workaround for invalid return value from clock_nanosleep (#21433) Fixesdotnet/android#6600 Backported from dotnet/runtime#64679 and dotnet/runtime#65373 (cherry picked from commit 36daf03) * Fix Windows build Co-authored-by: Simon Rozsival <simon@rozsival.com>
…k_nanosleep (#65372) * [Android] Workaround for invalid return value from clock_nanosleep (#64679) There used to be a bug in Android libc implementation of `clock_nanosleep`. The return value should be `errno` on errors but instead in it returns `-1` and sets `errno`. The libc (Bionic) bug [has been fixed](https://android-review.googlesource.com/c/platform/bionic/+/110652/) since Android 6 and newer but it causes problems to [customers who are unable to update Android on their devices](dotnet/android#6600 (comment)). Fixesdotnet/android#6600 * Account for incorrect implementation of clock_nanosleep in older Android libc * Shorten comments * Add g_clock_nanosleep function * Add remap definition * Fix build * Make sure the extra check runs only on Android * Make Windows builds happy * Try making wasm builds happy * Fix leftover direct call to clock_nanosleep
There used to be a bug in Android libc implementation of
clock_nanosleep. The return value should beerrnoon errors but instead in it returns-1and setserrno. The libc (Bionic) bug has been fixed since Android 6 and newer but it causes problems to customers who are unable to update Android on their devices.Fixesdotnet/android#6600