Bug 817760 - systemd-modules-load.service fails when asked to load a built-in module
Summary: systemd-modules-load.service fails when asked to load a built-in module
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 17
Hardware: i386
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-01 07:16 UTC by brice
Modified: 2012-10-12 16:46 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-20 18:46:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description brice 2012-05-01 07:16:09 UTC
Description of problem:
on every reboot, the systemd-modules-load.service failed to load.and i can use the wifi only if i switch off the wifi card and switch on again.another think that i noticed is that to use my cordless mouse,i need to plug out the usb receiver and plug it in again.

Version-Release number of selected component (if applicable):


How reproducible:
at every reboot

Steps to Reproduce:
1.boot the system
2.switch off and on the wifi card, unplug and plug the mouse usb receiver
3.reboot
  
Actual results:
# systemctl status systemd-modules-load.service 
systemd-modules-load.service - Load Kernel Modules
	  Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static)
	  Active: failed (Result: exit-code) since Tue, 01 May 2012 10:49:02 +0200
	 Process: 478 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
	  CGroup: name=systemd:/system/systemd-modules-load.service


Expected results:
the service load without error

Additional info:

 systemctl --version
systemd 44
fedora
+PAM +LIBWRAP +AUDIT +SELINUX +SYSVINIT +LIBCRYPTSETUP

Comment 1 brice 2012-05-01 07:19:09 UTC
other additional info:

systemctl | grep failed
NetworkM...online.service loaded failed failed        Network Manager Wait Online
systemd-...s-load.service loaded failed failed        Load Kernel Modules

Comment 2 Bill Nottingham 2012-05-01 16:54:49 UTC
Do you have any files in these locations:
 /lib/modules-load.d
 /usr/lib/modules-load.d
 /usr/local/lib/modules-load.d
 /etc/modules-load.d
 /run/modules-load.d

If so, what are their contents?

Comment 3 brice 2012-05-01 20:29:49 UTC
(In reply to comment #2)
> Do you have any files in these locations:
>  /lib/modules-load.d
>  /usr/lib/modules-load.d
>  /usr/local/lib/modules-load.d
>  /etc/modules-load.d
>  /run/modules-load.d
> 
> If so, what are their contents?

there is one file in /etc/modules-load.d. the file is apmd.conf and it contain one word: apm.

Comment 4 Bill Nottingham 2012-05-01 21:04:45 UTC
... which is built-in.

Arguably systemd-modules-load should let this pass without error - modprobe does.

Comment 5 Bill Nottingham 2012-05-01 21:06:16 UTC
Example from x86_64, when given a conf file with 'snd' (already loaded) and 'pcmcia' (built-in):

# /lib/systemd/systemd-modules-load 
Inserted module 'snd'
could not find module by name='0'
Failed to insert 'pcmcia': Function not implemented

Comment 6 Bill Nottingham 2012-05-01 21:06:46 UTC
That being said, apmd could be fixed to not ship a module-load file...

Comment 7 brice 2012-05-01 21:25:15 UTC
i've unistall apmd and the modules-load service start without error, but the Network Manager Wait Online service don't start.

Comment 8 Fdor 2012-06-27 17:46:09 UTC
Bug still alive with:

- apmd-3.2.2-16.fc17.i686
- systemd-44-14.fc17.i686

The problem seems to be at "/etc/modules-load.d/apmd.conf" file (installed by "apmd" rpm package), that produces a "Failed to insert 'apm': Function not implemented" error when loaded by "systemd-modules-load" binary:

--------- shell ----------
# systemctl stop systemd-modules-load.service
# systemctl start systemd-modules-load.service
# systemctl status systemd-modules-load.service
systemd-modules-load.service - Load Kernel Modules
          Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static)
          Active: failed (Result: exit-code) since Wed, 27 Jun 2012 18:57:02 +0200; 7min ago
            Docs: man:systemd-modules-load.service(8)
                  man:modules-load.d(5)
         Process: 1639 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/systemd-modules-load.service

Jun 27 18:57:02 localhost.localdomain systemd-modules-load[1639]: [48B blob data]
Jun 27 18:57:02 localhost.localdomain systemd-modules-load[1639]: Failed to insert 'apm': Function not implemented
--------- shell ----------

The details are:
- "systemd-modules-load.service" is launched by the "systemctl" command (like when booting).
- "systemd-modules-load.service" launches the "/usr/lib/systemd/systemd-modules-load" command.
- "/usr/lib/systemd/systemd-modules-load" command reads config files from "/etc/modules-load.d/" dir, and finds "/etc/modules-load.d/apmd.conf" (which is installed by "apmd" rpm package).
- "/usr/lib/systemd/systemd-modules-load" doesn't like the contents of "/etc/modules-load.d/apmd.conf", because "apm" (the content) is not an implemented function.
- So "/usr/lib/systemd/systemd-modules-load" stops running and returns an error code, that is detected by systemctl.

In few words, "systemd-modules-load.service" fails because "/usr/lib/systemd/systemd-modules-load" doesn't like the contents of "/etc/modules-load.d/apmd.conf".

So there is a bug in "/etc/modules-load.d/apmd.conf" and/or in "/usr/lib/systemd/systemd-modules-load".

Please change status to "confirmed".
(And fix the bug)

Comment 9 Bill Nottingham 2012-06-27 17:55:03 UTC
apmd shouldn't ask to load a module that doesn't exist.

Comment 10 Bill Nottingham 2012-06-27 17:56:12 UTC
Actually, leaving with systemd - it should fail more gracefully.

Comment 11 Michal Schmidt 2012-06-27 18:01:32 UTC
The service reports an error, but it still loads all other configured modules, doesn't it?

Comment 12 Michal Schmidt 2012-06-27 19:56:20 UTC
Fixed the handling of builtin modules upstream:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=27fda47f40453e552ebccf7acb85f915cf34f23a

Comment 13 Fdor 2012-09-19 15:53:30 UTC
Bug still alive with:

apmd-3.2.2-16.fc17.i686
systemd-44-17.fc17.i686

Details:

--------- shell ----------
# systemctl status systemd-modules-load.service
systemd-modules-load.service - Load Kernel Modules
          Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static)
          Active: failed (Result: exit-code) since Wed, 19 Sep 2012 17:10:24 +0200; 8min ago
            Docs: man:systemd-modules-load.service(8)
                  man:modules-load.d(5)
         Process: 363 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/systemd-modules-load.service

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

# systemctl stop systemd-modules-load.service

# systemctl start systemd-modules-load.service
Job failed. See system journal and 'systemctl status' for details.

# systemctl status systemd-modules-load.service
systemd-modules-load.service - Load Kernel Modules
          Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static)
          Active: failed (Result: exit-code) since Wed, 19 Sep 2012 17:28:03 +0200; 7s ago
            Docs: man:systemd-modules-load.service(8)
                  man:modules-load.d(5)
         Process: 1612 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/systemd-modules-load.service

Sep 19 17:28:03 localhost.localdomain systemd-modules-load[1612]: [48B blob data]
Sep 19 17:28:03 localhost.localdomain systemd-modules-load[1612]: Failed to insert 'apm': Function not implemented
--------- shell ----------

I don't know if the service (systemd-modules-load) is still loading the rest of modules after the error has happened, since the only module (file) I see in my "/etc/modules-load.d/" directory is "apmd.conf".

Perhaps the bug should be asigned to "apmd" component instead of "systemd" component, since the error is caused by a wrong function call at "/etc/modules-load.d/apmd.conf" file, which belongs to "apmd" rpm package.

Probably the worst part of this bug is the boot line with a red warning ("FAILED"):

--------- boot ----------
[  OK  ] Reached target Local File Systems (Pre).
         Starting Load Random Seed...
[FAILED] Failed to start Load Kernel Modules.
         See 'systemctl status systemd-modules-load.service' for details.
         Mounting Configuration File System...
--------- boot ----------

Comment 14 Lennart Poettering 2012-09-20 18:46:39 UTC
OK, closing then.

Comment 15 Fedora Update System 2012-10-12 16:46:29 UTC
systemd-44-20.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/systemd-44-20.fc17


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