Skip to content

Conversation

@mikem8361
Copy link
Contributor

Backport of #80474 to release/6.0

Customer Impact

This issue affects both 1st and 3rd party customers.

The issue (#78956) is that in certain Linux Kubernetes container configurations, 2 core dumps are created: one from the unhandled managed exception and one incorrectly from a SIGSEGV during abort() during process shutdown.

This also fixes hang during unhandled exception processing on ARM64 docker containers (issue #66707).

The soluation is that all the signals that the runtime hooks need to be unregistered before calling the Linux abort() API in the unhandled exception/crash dump generation path.

Testing

Local testing under docker and AKS.

Risk

Low. Affects only crash dump generation on Linux/MacOS.

@mikem8361 mikem8361 requested review from hoyosjs and janvorli January 24, 2023 01:15
@mikem8361 mikem8361 self-assigned this Jan 24, 2023
@ghost ghost added the area-PAL-coreclr label Jan 24, 2023
@mikem8361 mikem8361 changed the title Fix multiple dumps from being generated [release/6.0] Fix multiple dumps from being generated Jan 24, 2023
Issue: dotnet#78956

After a core dump is generated because of a unhandled managed exception
abort() is called but a SIGSEGV is generated in libpthread.so which is
caught by the runtime and a second core dump is generated. The fix is
to uninstall/uninitialize all the signal handlers, not just SIGABORT.
@carlossanlop
Copy link
Contributor

If this is ready to be reviewed, please add the servicing-consider label and send email to Tactics requesting approval.

Can you also please take a look at the CI and determine if any of the failures are related to this change?

@carlossanlop carlossanlop added this to the 6.0.x milestone Feb 8, 2023
@mikem8361
Copy link
Contributor Author

Yes, I will add that label when I get some testing feedback.

None of the CI failures are related to this change.

@mikem8361 mikem8361 added the Servicing-consider Issue for next servicing release review label Feb 10, 2023
@carlossanlop carlossanlop modified the milestones: 6.0.x, 6.0.15 Feb 13, 2023
@carlossanlop
Copy link
Contributor

This was approved by Tactics via email for 6.0.15.
The CI re-run is green.
No OOB changes needed (native code).
Signed-off by area owners.
Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit bd34800 into dotnet:release/6.0 Feb 13, 2023
@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Feb 13, 2023
@mikem8361 mikem8361 deleted the doubledump6 branch March 1, 2023 01:40
@ghost ghost locked as resolved and limited conversation to collaborators Mar 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-PAL-coreclr Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants