Summary: | Autoloading module 8 times. | ||
---|---|---|---|
Product: | Base System | Reporter: | Bjoern A. Zeeb <bz> |
Component: | bin | Assignee: | Warner Losh <imp> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | ota |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
Bjoern A. Zeeb
![]() ![]() I happen to look into this case as I also noticed multiple attempts to load. It uses kldload -n option so that it doesn't reload what's been loaded. https://cgit.freebsd.org/src/blame/libexec/rc/rc.d/devmatch#n70 "Autoloading module:" is printed for each try and a bit excessive but no harm. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=5549c6a62f0f4fc5d7e80973b28ebcf7f556edf8 commit 5549c6a62f0f4fc5d7e80973b28ebcf7f556edf8 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2021-07-08 19:53:18 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-08 21:22:22 +0000 devmatch: don't announce autoloading so much devmatch rc script would announce it was loading a module multiple times. It used kldload -n so it really wasn't loading it that many times, but the message is confusing. Use kldstat to see if we need to load the module before saying we do. This fixes the vast majority of the problems. It may be possible to race devmatch with a user invocation and devd, though quite hard. In that case we'll announce things twice, but still only load it once. No attempt is made to fix this. PR: 232782 MFC After: 2 weeks Sponsored by: Netflix libexec/rc/rc.d/devmatch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=66c5e65030ca055ada3eae1c18cbbafe8131fa86 commit 66c5e65030ca055ada3eae1c18cbbafe8131fa86 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2021-07-08 19:53:18 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-16 17:45:11 +0000 devmatch: don't announce autoloading so much devmatch rc script would announce it was loading a module multiple times. It used kldload -n so it really wasn't loading it that many times, but the message is confusing. Use kldstat to see if we need to load the module before saying we do. This fixes the vast majority of the problems. It may be possible to race devmatch with a user invocation and devd, though quite hard. In that case we'll announce things twice, but still only load it once. No attempt is made to fix this. PR: 232782 MFC After: 2 weeks Sponsored by: Netflix libexec/rc/rc.d/devmatch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=00ed9aa54bec137327e37c25fcd5d59347bbf4e6 commit 00ed9aa54bec137327e37c25fcd5d59347bbf4e6 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2021-07-08 19:53:18 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-16 18:28:44 +0000 devmatch: don't announce autoloading so much devmatch rc script would announce it was loading a module multiple times. It used kldload -n so it really wasn't loading it that many times, but the message is confusing. Use kldstat to see if we need to load the module before saying we do. This fixes the vast majority of the problems. It may be possible to race devmatch with a user invocation and devd, though quite hard. In that case we'll announce things twice, but still only load it once. No attempt is made to fix this. PR: 232782 MFC After: 2 weeks Sponsored by: Netflix (cherry picked from commit 5549c6a62f0f4fc5d7e80973b28ebcf7f556edf8) libexec/rc/rc.d/devmatch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) |