Bug 243890 - md may hang in mddestroy
Summary: md may hang in mddestroy
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.3-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-05 04:13 UTC by Mikhail Teterin
Modified: 2020-02-10 05:09 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Teterin freebsd_committer freebsd_triage 2020-02-05 04:13:41 UTC
If an md you're trying to unconfigure is part of a ccd, the attempt will hang in an uninterruptible syscall mddestroy until all of the ccds involving the md are unconfigured:

load: 2.10  cmd: mdconfig 54293 [mddestroy] 6.10r 0.00u 0.00s 0% 2384k
load: 1.84  cmd: mdconfig 54293 [mddestroy] 43.38r 0.00u 0.00s 0% 2384k
load: 1.66  cmd: mdconfig 54293 [mddestroy] 184.61r 0.00u 0.00s 0% 2384k

Worse, while this is happening, any attempt to use mdconfig (even to just list the configured mds) will crash (segmentation fault).

The good news is, once the ccds are all destroyed, the hanging mdconfig will exit nicely.

But it, probably, should fail immediately with an EBUSY or equivalent...