You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reproduction program is boiled down from the /Accounts/Login page generated by dotnet new mvc --auth Individual. On Linux the NullReferenceExceptions are caught just fine. On LX, the program segfaults while processing the second exception.
The root cause of the crash is a difference in how LX and Linux select the stack to run a signal handler on for a signal that has been configured using sigaltstack(2). If the signal handler changes its stack pointer to different location outside of the alternate stack, unmasks the signal, and triggers the signal again before returning from the signal handler, Linux starts executing the nested signal handler at the start of the alternate stack. LX notices that the signal handler never returned and does not use the alternate stack.
In the c directory of the same repo, there is a C program that can detect this difference in stack handling. In the root of the repo there is a README with more details on how this difference in signal behavior causes the crash.
I have a fork of illumos-joyent with a potential fix for the problem. I'm not sure if this is the right way to fix this problem, but it does make .NET Core's exception handling work for me.
The text was updated successfully, but these errors were encountered:
AustinWise
added a commit
to AustinWise/illumos-joyent
that referenced
this issue
Mar 12, 2018
Steps to reproduce in LX:
git clone https://github.com/AustinWise/CrashRepro.git
cd CrashRepro/csharp
dotnet run
The reproduction program is boiled down from the /Accounts/Login page generated by
dotnet new mvc --auth Individual
. On Linux the NullReferenceExceptions are caught just fine. On LX, the program segfaults while processing the second exception.The root cause of the crash is a difference in how LX and Linux select the stack to run a signal handler on for a signal that has been configured using
sigaltstack(2)
. If the signal handler changes its stack pointer to different location outside of the alternate stack, unmasks the signal, and triggers the signal again before returning from the signal handler, Linux starts executing the nested signal handler at the start of the alternate stack. LX notices that the signal handler never returned and does not use the alternate stack.In the c directory of the same repo, there is a C program that can detect this difference in stack handling. In the root of the repo there is a README with more details on how this difference in signal behavior causes the crash.
I have a fork of illumos-joyent with a potential fix for the problem. I'm not sure if this is the right way to fix this problem, but it does make .NET Core's exception handling work for me.
The text was updated successfully, but these errors were encountered: