Page MenuHomeFreeBSD

Fix mps deadlock when handling panic
ClosedPublic

Authored by smh on Oct 24 2017, 2:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 10, 1:59 AM
Unknown Object (File)
Mar 14 2024, 8:55 PM
Unknown Object (File)
Mar 7 2024, 5:04 AM
Unknown Object (File)
Mar 7 2024, 5:04 AM
Unknown Object (File)
Mar 7 2024, 5:04 AM
Unknown Object (File)
Mar 7 2024, 4:44 AM
Unknown Object (File)
Mar 7 2024, 2:18 AM
Unknown Object (File)
Feb 16 2024, 8:36 AM
Subscribers

Details

Summary

During shutdown mps waits for its SSU requests to complete however when performing a reboot after handling a panic the scheduler is stopped so getmicrotime which is used here can non-functional.

Switch to using the same method as shutdown_panic to ensure we actually complete.

In addition reduce the timeout when RB_NOSYNC is set in howto as we expect this to fail.

Test Plan

Confirm a machine with an mps controller with used devices completes the reboot process when a panic is triggered with:
debug.kdb.panic=1

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Tested By: manu

Thanks,

This revision is now accepted and ready to land.Oct 24 2017, 2:49 PM

ping timeout from scottl ?
Should we commit that and if scottl doesn't like something rework it later ?

slm requested changes to this revision.Nov 13 2017, 4:56 PM
slm added inline comments.
sys/dev/mps/mps_sas_lsi.c
128 ↗(On Diff #34289)

Can you add the name of the parameter too ('howto'), just to be consistent with the other prototypes.

1253 ↗(On Diff #34289)

I'm not seeing how this gets the 'howto' parameter sent into the function. I guess I'm just missing it. Can you explain?

sys/dev/mps/mpsvar.h
749 ↗(On Diff #34289)

Name of variable here too, for consistency with other prototypes.

This revision now requires changes to proceed.Nov 13 2017, 4:56 PM

Also, if this works for mps it should go into mpr as well.

Added howto param name to prototypes.

smh marked 3 inline comments as done.Mar 14 2018, 9:04 PM
smh added inline comments.
sys/dev/mps/mps_sas_lsi.c
1253 ↗(On Diff #34289)

kern_reboot triggers this with by calling all registered handlers with a howto parameter

EVENTHANDLER_INVOKE(shutdown_final, howto);

smh marked an inline comment as done.Mar 14 2018, 9:06 PM

Sorry guys this dropped off my radar, only just spotted your updates when reviewing other changes.

I've updated based on feedback and answered the last outstanding question, so hopefully we can get this in soon.

This revision is now accepted and ready to land.Mar 14 2018, 9:08 PM
This revision was automatically updated to reflect the committed changes.