Bug 1809183 - weak-modules takes forever to run
Summary: weak-modules takes forever to run
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1851216 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-02 14:41 UTC by Richard W.M. Jones
Modified: 2020-06-25 23:59 UTC (History)
22 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-13 20:45:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2020-03-02 14:41:16 UTC
During installation of the latest kernel (5.6.0-0.rc3.git2.2.fc33.x86_64)
there is a post-install step that takes at least 25 minutes to run
(actually I'm still waiting for it to finish).

   2145 pts/0    S+     0:00  |           \_ sudo dnf update --best glibc kernel
   2147 pts/0    S+     0:14  |               \_ /usr/bin/python3 /usr/bin/dnf update --best glibc kernel
   2211 pts/0    S+     0:00  |                   \_ /bin/sh /var/tmp/rpm-tmp.zOSxPy 3
   2212 pts/0    S+     0:28  |                       \_ /usr/bin/bash /usr/sbin/weak-modules --add-kernel 5.6.0-0.rc3.git2.2.fc33.x86_64
  63587 pts/0    R+     0:02  |                           \_ /sbin/depmod -C /tmp/weak-modules.0Ig9Wa/depmod.conf -naeE /tmp/weak-modules.0Ig9Wa/symvers-5.6.0-0.rc3.git2.2.fc33.x86_64 5.6.0-0.rc3.git2.2.fc33.x86_64
  63588 pts/0    S+     0:00  |                           \_ grep /tmp/weak-modules.0Ig9Wa/5.6.0-0.rc3.git2.2.fc33.x86_64/weak-updates

This is on a very fast AMD machine.

Comment 1 Yanko Kaneti 2020-03-02 14:47:07 UTC
FWIW, here(Ryzen 7 2700X) it finished after 11 minutes, but this is with a working depmod (kmod-26) instead of the slightly broken one (kmod-27), bug 1808430)

Comment 2 Richard W.M. Jones 2020-03-02 15:20:09 UTC
I was using kmod-26-4.fc31.x86_64.  IMHO even 11 minutes is much too long.

Comment 3 Kevin Fenzi 2020-03-02 15:27:09 UTC
Yeah, I noticed this here as well... I'm not sure how long it took, but many minutes...

Comment 4 Jeremy Cline 2020-03-02 17:15:55 UTC
Gah. I've backed the weak-modules change out again. 5.6.0-0.rc4.git0 should behave properly. Sorry.

Comment 5 Yauheni Kaliuta 2020-03-26 15:45:16 UTC
(In reply to Richard W.M. Jones from comment #2)
> I was using kmod-26-4.fc31.x86_64.  IMHO even 11 minutes is much too long.

Richard, could you help me to find the root cause, if it's not https://bugzilla.redhat.com/show_bug.cgi?id=1817581 ?

I need more detailed information about the setup -- kernels and modules, especially in extra/ dirs.

Comment 6 Richard W.M. Jones 2020-03-26 16:20:26 UTC
Seems very different to me.  In any case you will need to ask someone
on the kernel team in order to get a definitive answer.

Comment 7 Richard W.M. Jones 2020-05-12 17:13:33 UTC
This bug seems to be back with
kernel-core-5.7.0-0.rc5.1.fc33.x86_64

It's been running the weak modules thing for 20+ minutes here.

Comment 8 Richard W.M. Jones 2020-05-12 17:14:01 UTC
  74058 pts/3    S+     0:00              \_ sudo dnf reinstall kernel-core
  74068 pts/3    S+     0:16                  \_ /usr/bin/python3 /bin/dnf reinstall kernel-core
  83518 pts/3    S+     0:00                      \_ /bin/sh /var/tmp/rpm-tmp.y0PrWR 3
  83519 pts/3    S+     0:01                          \_ /usr/bin/bash /usr/sbin/weak-modules --add-kernel 5.7.0-0.rc5.1.fc33.x86_64
 198035 pts/3    R+     0:01                              \_ /sbin/depmod -C /tmp/weak-modules.fRWcad/depmod.conf -naeE /tmp/weak-mo
 198036 pts/3    S+     0:00                              \_ grep /tmp/weak-modules.fRWcad/5.7.0-0.rc5.1.fc33.x86_64/weak-updates

Comment 9 Jeremy Cline 2020-05-12 17:50:49 UTC
So the root cause was the kernel-modules-extra package was installing modules to the wrong location. This has since been fixed, but if you've got old kernel-modules-extra packages sitting around the weak-modules script continues to pick them up. A workaround should be to remove all the old kernel-modules-extra packages you have installed.

Comment 10 Richard W.M. Jones 2020-05-13 19:41:19 UTC
I don't believe I had it installed.  It's not installed now (after the
upgrade finally finished):

$ rpm -q kernel-modules-extra
package kernel-modules-extra is not installed

and it's not mentioned in /var/log/dnf.log*:

$ sudo grep kernel-modules-extra /var/log/dnf.log*
[no output]

So I guess it hasn't been installed for a while (these logs go
back to 2019-07).

Could there be any other package which would cause this?

Comment 11 Yauheni Kaliuta 2020-05-13 20:07:05 UTC
Check contents of /lib/modules/*/extra dirs. Time is basically O(m * k) where m is amount of modules in extra/'s and k is number of installed kernels.

Comment 12 Richard W.M. Jones 2020-05-13 20:45:55 UTC
$ ls /lib/modules/*/extra
/lib/modules/5.2.0-0.rc3.git3.2.fc31.x86_64+debug/extra:
drivers  fs  net

/lib/modules/5.6.0-0.rc3.git0.1.fc32.x86_64+debug/extra:
drivers  fs  net

/lib/modules/5.7.0-0.rc5.1.fc33.x86_64+debug/extra:
(last one seems to be empty)

$ find /lib/modules/*/extra -type f | wc -l
271

Anyway I'll close this one again, thanks for the explanation.

Comment 13 Yauheni Kaliuta 2020-06-25 23:59:16 UTC
*** Bug 1851216 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.