Sustainsys / Saml2

Saml2 Authentication services for ASP.NET
Other
940 stars 606 forks source link

V2.9.2 SPOptions instantiation crashes DbgDiag.exe update 3. #1415

Closed scotlarsen closed 7 months ago

scotlarsen commented 8 months ago

So we have been attempting to diagnosis an issue with our website that is causing the IIS application pool to crash. To help us collect more information, we have deployed the Windows Debug Diagnostic tool. The only problem is now the DbgDiag.exe process crashes whenever we attempt to instantiate an SSO set of Options/SPOptions for an IDP redirect. We have pinpointed the crash at the point the SPOptions class is instantiated. SPOptions causes the crash on all versions of the Debug Diagnostics Tool Update 3. Update 2 does not crash (released in 2015).

We have tried about 1/2 dozen methods of instantiation (including a bare bones unconfigured version) and all crash the DbgDiag.exe tool. We have also made sure all our packages are up to date.

We are running on ASP DotNet Core V6 and IIS V10.0.14393 and Windows Server 2016.

Any help is appreciated!

AndersAbel commented 8 months ago

I have no idea why DbgDiag is crashing but if it is, it's a support question for them, not for this library.

scotlarsen commented 8 months ago

Microsoft will never take up this issue. They will point us back to the library. We certainly understand that it might be an issue with DbgDiag.exe, but hoped you might confirm it's not an issue with the SustainSys library.

AndersAbel commented 7 months ago

If the web site is crashing, it might be any code that runs in the process, including code from the Sustainsys.Saml2 library.

Do you get any log output that helps?

scotlarsen commented 7 months ago

It's not the website that is crashing, but DbgDiag.exe. I pinpointed the crash at when we instantiate the Sustainsys.SPOptions class. I have process monitor logs and a DbgDiag.exe crash dump, but there is not a lot of info since we don't have the pdb files for DbgDiag. This is easy to replicate... create a web service using Sustainsys and construct the SSO redirect classes including the SPOtions class. If you set up DbgDiag.exe to monitor your webservice through IIS, you should see the same crash when you instantiate SPOptions. Hope this helps. -Scot On Thursday, November 16, 2023 at 01:24:17 AM PST, Anders Abel @.***> wrote:

If the web site is crashing, it might be any code that runs in the process, including code from the Sustainsys.Saml2 library.

Do you get any log output that helps?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

AndersAbel commented 7 months ago

I was referring to the original issue - that the IIS app pool crashes. Do you get any log output from your application with/without DbgDiag?

scotlarsen commented 7 months ago

Unfortunately no... nothing that would give us a good indication of what's causing the app pool to crash. We have added memory consumption monitoring directly in-code as well as a thread stack-trace capture (every 5 secs) to compensate for not getting the DbgDiag.exe tool to work. The good news is we have not had any recent production crashes. We use Jenkins to implement an IAC solution within our AWS instance architecture. One of the theories is we were scaling the instances too often and it was causing stability issues within IIS. We made some modifications to our Jenkins code and how it handles instance scaling. It may have solved the underlying issue. Nonetheless we need something in our production environments that can capture stack traces for situations like these. On Friday, November 17, 2023 at 01:21:36 AM PST, Anders Abel @.***> wrote:

I was referring to the original issue - that the IIS app pool crashes. Do you get any log output from your application with/without DbgDiag?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>