Page MenuHomeFreeBSD

Test dumping instead of SCHEDULER_STOPPED() since the latter isn'ttrue when doadump is called from ddb.
ClosedPublic

Authored by imp on Dec 18 2017, 3:16 PM.

Details

Summary

When doing a dump, the scheduler is normally not running, so this
changed worked to capture dumps for me. However, the test for
SCHEDULER_STOPPED() isn't right. We can also call the dump routine
from ddb, in which case the scheduler is still running. This leads to
an assertion panic that we're sleeping when we shouldn't. Instead, use
the proper test for dumping or not. This brings us in line with other
places that do special things while we're doing polled I/O like this.

Noticed by: pho@
Sponsored by: Netflix

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

imp created this revision.Dec 18 2017, 3:16 PM
imp retitled this revision from Test dumping instead of SCHEDULER_STOPPED() since the latter isn't true when doadump is called from ddb. to Test dumping instead of SCHEDULER_STOPPED() since the latter isn'ttrue when doadump is called from ddb..Dec 18 2017, 3:17 PM
imp edited the summary of this revision. (Show Details)
imp added reviewers: markj, scottl.
imp added inline comments.Dec 18 2017, 3:19 PM
sys/cam/cam_periph.c
1214 ↗(On Diff #36711)

yea, I know it's a little churn here, but it's the only place we have negative logic so I thought it was clearer to switch.

markj added a subscriber: pho.Dec 18 2017, 3:28 PM

Peter, would you be able to try this patch with the scenario you were testing before?

markj accepted this revision.Dec 18 2017, 3:29 PM

Looks ok to me.

This revision is now accepted and ready to land.Dec 18 2017, 3:29 PM
pho added a comment.EditedDec 18 2017, 3:38 PM

Peter, would you be able to try this patch with the scenario you were testing before?

Sure. This works for me.

kmacy added a subscriber: kmacy.Dec 19 2017, 2:57 AM

This seems to fix dumps from panics caused by in-kernel page faults.

This revision was automatically updated to reflect the committed changes.