Uh oh!
There was an error while loading. Please reload this page.
[NO MERGE] SHM_NAME_MAX - #64752
Conversation
…y of figuring out the magic number
ghost
commented
Feb 3, 2022
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsI don't have an ARM64 macOS machine (yet), so I need to use a very dirty way of figuring out the magic number Related to #63240
|
adamsitnik
commented
Feb 3, 2022
/azp run runtime-staging |
|
Azure Pipelines successfully started running 1 pipeline(s). |
am11
commented
Feb 3, 2022
It is a bit strange to truncate the name in retry attempt on managed side, when we know the (documented) limit in native implementation. Perhaps we need to just replace the asserts with NULL, something like (with or without condition): --- src/native/libs/System.Native/pal_io.c+++ src/native/libs/System.Native/pal_io.c
#if defined(SHM_NAME_MAX) // macOS - assert(strlen(name) <= SHM_NAME_MAX);+ if (strlen(name) > SHM_NAME_MAX) name[SHM_NAME_MAX] = '\0';
#elif defined(PATH_MAX) // other Unixes - assert(strlen(name) <= PATH_MAX); + if (strlen(name) > PATH_MAX) name[PATH_MAX] = '\0';
#endif |
adamsitnik
commented
Feb 3, 2022
@dotnet/area-infrastructure-libraries how can I force our CI to run the tests on arm64 macOS machines? |
adamsitnik
commented
Feb 4, 2022
@ericstj@safern ping (I need to fix this bug as the backport is incomplete but I can't repro it using the CI or @jozkee M1) BTW is it expected for the staging CI leg to be green despite having test failures? |
ericstj
commented
Feb 4, 2022
Yes, you can see that here https://github.com/dotnet/runtime/blob/4e48641996cfc890163a49ef13bb2121de58d31d/docs/pr-builds.md#runtime-staging
I think outerloop and runtime-extra-platforms contain |
ericstj
commented
Feb 4, 2022
/azp list |
ericstj
commented
Feb 4, 2022
/azp run runtime-libraries-coreclr outerloop-osx |
|
Azure Pipelines successfully started running 1 pipeline(s). |
@adamsitnik -- this should do it. https://dev.azure.com/dnceng/public/_build/results?buildId=1592720&view=results |
adamsitnik
commented
Feb 7, 2022
adamsitnik
commented
Feb 7, 2022
/azp run runtime-libraries-coreclr outerloop-osx |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ericstj
commented
Feb 7, 2022
vcsjones
commented
Feb 8, 2022
@adamsitnik I ran this PR on my M1 and nothing in |
| } | ||
| else if (errorInfo.Error == Interop.Error.ENAMETOOLONG) | ||
| { | ||
| --maxNameLength; |
There was a problem hiding this comment.
should we try to protect against maxNameLength being 0 or negative?
adamsitnik
commented
Apr 26, 2022
Thank you all for your help, I've opened #68541 with hopefully the proper fix. |


I don't have an ARM64 macOS machine (yet), so I need to use a very dirty way of figuring out the magic number
Related to #63240