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

System.Runtime.CompilerServices.Unsafe.Tests crashes on NativeAOT #88339

Closed
EgorBo opened this issue Jul 3, 2023 · 5 comments · Fixed by #88342
Closed

System.Runtime.CompilerServices.Unsafe.Tests crashes on NativeAOT #88339

EgorBo opened this issue Jul 3, 2023 · 5 comments · Fixed by #88342

Comments

@EgorBo
Copy link
Member

EgorBo commented Jul 3, 2023

This test suite crashes on NativeAOT (Linux-x64) in runtime-extra-platforms pipeline in various runs, e.g.

https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-heads-main-d867fba8f5e2452eb8/System.Runtime.CompilerServices.Unsafe.Tests/1/console.af12d8db.log?helixlogtype=result

or

https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-heads-main-93a3d2dd051c4ab897/System.Runtime.CompilerServices.Unsafe.Tests/1/console.f5135cd7.log?helixlogtype=result

/root/helix/work/workitem/e /root/helix/work/workitem/e
Running assembly:System.Runtime.CompilerServices.Unsafe.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
./RunTests.sh: line 168:    22 Segmentation fault      (core dumped) ./System.Runtime.CompilerServices.Unsafe.Tests -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing -xml testResults.xml $RSP_FILE
/root/helix/work/workitem/e
----- end Mon Jul 3 10:21:53 UTC 2023 ----- exit code 139 ----------------------------------------------------------
exit code 139 means SIGSEGV Illegal memory access. Deref invalid pointer, overrunning buffer, stack overflow etc. Core dumped.
ulimit -c value: unlimited

cc @dotnet/ilc-contrib

seems to be net8.0-linux-Release-x64-NativeAOT_Release-(Alpine.315.Amd64.Open)Ubuntu.1804.Amd64 only

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 3, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 3, 2023
@ghost
Copy link

ghost commented Jul 3, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

This test suite seems to crash in runtime-extra-platforms pipeline in various runs, e.g.

https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-heads-main-d867fba8f5e2452eb8/System.Runtime.CompilerServices.Unsafe.Tests/1/console.af12d8db.log?helixlogtype=result

/root/helix/work/workitem/e /root/helix/work/workitem/e
Running assembly:System.Runtime.CompilerServices.Unsafe.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
./RunTests.sh: line 168:    22 Segmentation fault      (core dumped) ./System.Runtime.CompilerServices.Unsafe.Tests -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing -xml testResults.xml $RSP_FILE
/root/helix/work/workitem/e
----- end Mon Jul 3 10:21:53 UTC 2023 ----- exit code 139 ----------------------------------------------------------
exit code 139 means SIGSEGV Illegal memory access. Deref invalid pointer, overrunning buffer, stack overflow etc. Core dumped.
ulimit -c value: unlimited

cc @dotnet/ilc-contrib

seems to be net8.0-linux-Release-x64-NativeAOT_Release-(Alpine.315.Amd64.Open)Ubuntu.1804.Amd64 only

Author: EgorBo
Assignees: -
Labels:

area-CodeGen-coreclr, untriaged

Milestone: -

@jkotas jkotas added area-NativeAOT-coreclr and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Jul 3, 2023
@ghost
Copy link

ghost commented Jul 3, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

This test suite crashes on NativeAOT (Linux-x64) in runtime-extra-platforms pipeline in various runs, e.g.

https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-heads-main-d867fba8f5e2452eb8/System.Runtime.CompilerServices.Unsafe.Tests/1/console.af12d8db.log?helixlogtype=result

or

https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-heads-main-93a3d2dd051c4ab897/System.Runtime.CompilerServices.Unsafe.Tests/1/console.f5135cd7.log?helixlogtype=result

/root/helix/work/workitem/e /root/helix/work/workitem/e
Running assembly:System.Runtime.CompilerServices.Unsafe.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
./RunTests.sh: line 168:    22 Segmentation fault      (core dumped) ./System.Runtime.CompilerServices.Unsafe.Tests -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing -xml testResults.xml $RSP_FILE
/root/helix/work/workitem/e
----- end Mon Jul 3 10:21:53 UTC 2023 ----- exit code 139 ----------------------------------------------------------
exit code 139 means SIGSEGV Illegal memory access. Deref invalid pointer, overrunning buffer, stack overflow etc. Core dumped.
ulimit -c value: unlimited

cc @dotnet/ilc-contrib

seems to be net8.0-linux-Release-x64-NativeAOT_Release-(Alpine.315.Amd64.Open)Ubuntu.1804.Amd64 only

Author: EgorBo
Assignees: -
Labels:

area-CodeGen-coreclr, untriaged, area-NativeAOT-coreclr

Milestone: -

@jkotas
Copy link
Member

jkotas commented Jul 3, 2023

The crash is stackoverflow. Improving reporting of stackoverflows is tracked by #72920 .

The actual problem is that the default stack on Alpine is too small. Looks like the following is not getting defined:

if (CLR_CMAKE_HOST_ALPINE_LINUX)
.

@EgorBo
Copy link
Member Author

EgorBo commented Jul 3, 2023

Can't repro this on my WSL with Ubuntu 20.04.06 LTS though, tried both Release and Checked

@EgorBo
Copy link
Member Author

EgorBo commented Jul 3, 2023

The actual problem is that the default stack on Alpine is too small. Looks like the following is not getting defined:

Ah, it explains why I can't repro it, my ulimit is:

egorbo@DESKTOP-98PIOAL:~/prj/runtime/src/libraries/System.Runtime.CompilerServices.Unsafe/tests$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 126605
max locked memory       (kbytes, -l) 65536
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 126605
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

(8Mb stack size)

jkotas added a commit to jkotas/runtime that referenced this issue Jul 3, 2023
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 3, 2023
@ghost ghost removed in-pr There is an active PR which will close this issue when it is merged untriaged New issue has not been triaged by the area owner labels Jul 3, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants