Bug 3658 - 2_a1: Load fedora-loadmodules.service failure runlevel 3
Summary: 2_a1: Load fedora-loadmodules.service failure runlevel 3
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
: 4172 (view as bug list)
Depends on:
Blocks: 2120
  Show dependency treegraph
 
Reported: 2011-12-07 13:44 CET by Bit Twister
Modified: 2016-01-17 22:24 CET (History)
6 users (show)

See Also:
Source RPM: systemd
CVE:
Status comment:


Attachments
Exit with zero even if modprobe fails to load allready loaded module (294 bytes, patch)
2011-12-07 22:34 CET, Dave Hodgins
Details | Diff

Description Bit Twister 2011-12-07 13:44:42 CET
Description of problem:

Load fedora-loadmodules.service failure runlevel 3

# systemctl status fedora-loadmodules.service
fedora-loadmodules.service - Load legacy module configuration
          Loaded: loaded (/lib/systemd/system/fedora-loadmodules.service; static)
          Active: failed since Wed, 07 Dec 2011 06:11:24 -0600; 13min ago
         Process: 125 ExecStart=/lib/systemd/fedora-loadmodules (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/fedora-loadmodules.service


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


How reproducible: always


Steps to Reproduce:
1. clean install, all updates applied
2. modify /boot/grub/menu.lst to have space 3 on end of line
   and remove spash=silent
3. reboot

You may want to read https://bugs.mageia.org/show_bug.cgi?id=3649
before reboot
Manuel Hiebel 2011-12-07 17:54:38 CET

Blocks: (none) => 2120

Comment 1 Dave Hodgins 2011-12-07 22:34:38 CET
Created attachment 1195 [details]
Exit with zero even if modprobe fails to load allready loaded module

I don't know why modprobe is returning 1 without the --first-time option,
but it is.  This patch forces the script to return success anyway.
Comment 2 Manuel Hiebel 2012-01-19 13:20:34 CET
*** Bug 4172 has been marked as a duplicate of this bug. ***

CC: (none) => g.sprik

Comment 3 Bit Twister 2012-01-19 18:04:25 CET
Reply to comment 1
> Created attachment

Your patch breaks logging and no telling what else.  :(

A better patch would be to add /bin/true before 
if [ -n "$TOLOAD" ]; then

I suggest a 1 line addition of /bin/true. Example:

/bin/true # set success if module does not need loading

if [ -n "$TOLOAD" ]; then
Curtis Hildebrand 2012-01-19 20:53:37 CET

CC: (none) => curtis.h.news

D Morgan 2012-01-28 03:02:49 CET

CC: (none) => dmorganec
Source RPM: initscripts-9.34-2.mga2.src.rpm => systemd

Comment 4 Juan Magallon 2012-03-23 00:36:30 CET
Better solution, I think.
fedora-loadmodules can not ever fail...It can try to load a non-existent
module, or things like  that, but the script itself doesn't fail...
like if you try to start apache and it blows.

So add just the /bin/true at the end of fedora-loadmodules.

CC: (none) => jamagallon

Comment 5 Colin Guthrie 2012-03-25 03:34:19 CEST
Hmmm, I'd rather see that the service fails such that I can investigate issues.

e.g. cpufreq_performance is no longer a valid module name name, but if we return true at the end of the script we'll never know that the module setup is wrong and we may have to reassess the situation.

I do think it shouldn't complain about when a module is already loaded but things can get complicated.....

e.g. consider a modprobe rule like this:

install sdhci_pci /sbin/modprobe --first-time --ignore-install sdhci_pci && { /sbin/modprobe mmc_block; /bin/true; }


This is designed to only modprobe mmc_block (after sdhci_pci) then it is first installed.

However, due to the rule itself using --first-time, it will not return true if the module is already loaded and thus the whole "module load" cycle of "sdhci_pci" fails if it's done a second time and this is then reported back....


The only way to make this rule "work" in a larger context is to put an "; /bin/true" at the end of the whole block.... this masks errors from this particular module, but at least it doesn't report back an overall failure for the fedora-loadmodules.service itself.


The above is obviously just an example.

And clearly, none of this is really new. rc.modules is the same as it always was. It's just that it is now visible and bubbles to the surface with systemd.

So I'm not convinced this is a huge problem overall (please correct me if there are knock on ramifications) and as such I would not like to mask away any issues.

Comments welcome.

CC: (none) => mageia

Comment 6 Bit Twister 2012-03-25 05:51:47 CEST
(In reply to comment #5)
> Hmmm, I'd rather see that the service fails such that I can investigate issues.

I agree there.

 
> And clearly, none of this is really new. rc.modules is the same as it always
> was. It's just that it is now visible and bubbles to the surface with systemd.

And what is worse, it has now disappeared. :( 

I just checked again, systemctl status fedora-loadmodules.service shows
success and yet, cat /etc/modprobe.preload.d/*
still shows cpufreq_performance being requested.   :(

> So I'm not convinced this is a huge problem overall (please correct me if there
> are knock on ramifications) and as such I would not like to mask away any
> issues.

I'll second that.
Comment 7 Colin Guthrie 2012-03-25 12:25:32 CEST
(In reply to comment #6)
> > And clearly, none of this is really new. rc.modules is the same as it always
> > was. It's just that it is now visible and bubbles to the surface with systemd.
> 
> And what is worse, it has now disappeared. :( 
> 
> I just checked again, systemctl status fedora-loadmodules.service shows
> success and yet, cat /etc/modprobe.preload.d/*
> still shows cpufreq_performance being requested.   :(

I think that was probably a bad example on my part as cpufreq_performance is a built-in and thus modprobe ignores it:

[root@jimmy ~]# modprobe cpufreq_performance; echo $?
0
[root@jimmy ~]# modprobe cpufreq_performancex; echo $?
FATAL: Module cpufreq_performancex not found.
1

So my bad for picking this as an example.
Comment 8 Bit Twister 2012-03-25 14:45:26 CEST
(In reply to comment #7)

> I think that was probably a bad example on my part as cpufreq_performance is a
> built-in and thus modprobe ignores it:
> So my bad for picking this as an example.

Not necessarily so, I have to go resolve bug 4196.

Since fedora-loadmodules.service is no longer failing I will resolve this bug.

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 9 Kim Garren 2016-01-17 22:21:11 CET
It's not fixed yet.
It's failing on boot for me, I get the error several times on boot. Referring thread:
http://bjoernvold.com/forum/viewtopic.php?f=20&t=4000


Relevant outputs:
[root@localhost ~]# journalctl _PID=647
-- Logs begin at Fri 2015-11-06 20:45:37 MST, end at Sun 2016-01-17 14:08:22 MST. --
Dec 08 10:22:04 dedanna.rocks.net systemd-fsck[647]: Reiserfs super block in block 16
Dec 08 10:22:04 dedanna.rocks.net systemd-fsck[647]: Blocks (total/free): 81227008/75
Dec 08 10:22:04 dedanna.rocks.net systemd-fsck[647]: Filesystem is clean
-- Reboot --
Dec 08 21:35:30 dedanna.rocks.net systemd-fsck[647]: Reiserfs super block in block 16
Dec 08 21:35:30 dedanna.rocks.net systemd-fsck[647]: Blocks (total/free): 81227008/75
Dec 08 21:35:30 dedanna.rocks.net systemd-fsck[647]: Filesystem is clean
-- Reboot --
Jan 13 16:57:06 localhost.localdomain fedora-loadmodules[647]: Loading modules: nvram
Jan 13 16:57:06 localhost.localdomain fedora-loadmodules[647]: modprobe: ERROR: could
lines 1-11/11 (END)...skipping...
-- Logs begin at Fri 2015-11-06 20:45:37 MST, end at Sun 2016-01-17 14:08:22 MST. --
Dec 08 10:22:04 dedanna.rocks.net systemd-fsck[647]: Reiserfs super block in block 16 on 0x808 of format 3.6 with standard journal
Dec 08 10:22:04 dedanna.rocks.net systemd-fsck[647]: Blocks (total/free): 81227008/75241260 by 4096 bytes
Dec 08 10:22:04 dedanna.rocks.net systemd-fsck[647]: Filesystem is clean
-- Reboot --
Dec 08 21:35:30 dedanna.rocks.net systemd-fsck[647]: Reiserfs super block in block 16 on 0x808 of format 3.6 with standard journal
Dec 08 21:35:30 dedanna.rocks.net systemd-fsck[647]: Blocks (total/free): 81227008/75243679 by 4096 bytes
Dec 08 21:35:30 dedanna.rocks.net systemd-fsck[647]: Filesystem is clean
-- Reboot --
Jan 13 16:57:06 localhost.localdomain fedora-loadmodules[647]: Loading modules: nvram evdev hdaps acpi-cpufreq cpufreq_powersave cpufreq_conservative cpufreq_ondemand
Jan 13 16:57:06 localhost.localdomain fedora-loadmodules[647]: modprobe: ERROR: could not insert 'hdaps': No such device
~
~
~
~
~
~                                                                                                                                                                           
~                                                                                                                                                                           
~                                                                                                                                                                           
~                                                                                                                                                                           
~                                                                                                                                                                           
~                                                                                                                                                                           
~                                                                                                                                                                           
~                                                                                                                                                                           
~                                                                                                                                                                           
~                                                                                                                                                                           
~                                                                                                                                                                           
~                                                                                                                                                                           
~                                                                                                                                                                           
~                                                                                                                                                                           
~
~
~
~
~
~
~
~
~
~
~
~
~
~
-- Logs begin at Fri 2015-11-06 20:45:37 MST, end at Sun 2016-01-17 14:08:22 MST. --
Dec 08 10:22:04 dedanna.rocks.net systemd-fsck[647]: Reiserfs super block in block 16
Dec 08 10:22:04 dedanna.rocks.net systemd-fsck[647]: Blocks (total/free): 81227008/75
Dec 08 10:22:04 dedanna.rocks.net systemd-fsck[647]: Filesystem is clean
-- Reboot --
Dec 08 21:35:30 dedanna.rocks.net systemd-fsck[647]: Reiserfs super block in block 16
Dec 08 21:35:30 dedanna.rocks.net systemd-fsck[647]: Blocks (total/free): 81227008/75
Dec 08 21:35:30 dedanna.rocks.net systemd-fsck[647]: Filesystem is clean
-- Reboot --
Jan 13 16:57:06 localhost.localdomain fedora-loadmodules[647]: Loading modules: nvram
Jan 13 16:57:06 localhost.localdomain fedora-loadmodules[647]: modprobe: ERROR: could
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
lines 1-11/11 (END)


[root@localhost ~]# systemctl status fedora-loadmodules.service
â fedora-loadmodules.service - Load legacy module configuration
   Loaded: loaded (/usr/lib/systemd/system/fedora-loadmodules.service; static)
   Active: failed (Result: exit-code) since Wed 2016-01-13 16:56:58 MST; 18min ago
  Process: 647 ExecStart=/lib/systemd/fedora-loadmodules (code=exited, status=1/FAILURE)
 Main PID: 647 (code=exited, status=1/FAILURE)
 
Jan 13 16:56:50 localhost.localdomain systemd[1]: fedora-loadmodules.service: main process exited, code=exited, stat...ILURE
Jan 13 16:56:50 localhost.localdomain systemd[1]: Failed to start Load legacy module configuration.
Jan 13 16:56:50 localhost.localdomain systemd[1]: Unit fedora-loadmodules.service entered failed state.
Jan 13 16:56:50 localhost.localdomain systemd[1]: fedora-loadmodules.service failed.
Jan 13 16:56:58 localhost.localdomain systemd[1]: fedora-loadmodules.service: main process exited, code=exited, stat...ILURE
Jan 13 16:56:58 localhost.localdomain systemd[1]: Failed to start Load legacy module configuration.
Jan 13 16:56:58 localhost.localdomain systemd[1]: Unit fedora-loadmodules.service entered failed state.
Jan 13 16:56:58 localhost.localdomain systemd[1]: fedora-loadmodules.service failed.
Jan 13 16:57:06 localhost.localdomain fedora-loadmodules[647]: Loading modules: nvram evdev hdaps acpi-cpufreq cpufre...mand
Jan 13 16:57:06 localhost.localdomain fedora-loadmodules[647]: modprobe: ERROR: could not insert 'hdaps': No such device
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]#


[root@localhost ~]# 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: active (exited) since Wed 2016-01-13 16:56:49 MST; 26min ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 451 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=0/SUCCESS)
 Main PID: 451 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/systemd-modules-load.service
 
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
[root@localhost ~]#


This is on a fully updated Lenovo Z70-80 17.3" laptop (of which, admittedly, I have some work to do on drivers-wise:

[root@localhost ~]# uname -a
Linux localhost.localdomain 4.1.15-desktop-1.mga5 #1 SMP Thu Dec 24 22:04:24 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]#



[root@localhost ~]# lspcidrake
Card:NVIDIA GeForce 420 series and later: NVIDIA Corporation|GM108M [GeForce 840M] [DISPLAY_3D] (rev: a2)
ath10k_pci      : Qualcomm Atheros|QCA6174 802.11ac Wireless Network Adapter [NETWORK_OTHER] (rev: 20)
r8169           : Realtek Semiconductor Co., Ltd.|RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [NETWORK_ETHERNET] (rev: 10)
i2c_i801        : Intel Corporation|Wildcat Point-LP SMBus Controller [SERIAL_SMBUS] (rev: 03)
unknown         : Intel Corporation|Wildcat Point-LP SATA Controller [AHCI Mode] [STORAGE_SATA] (rev: 03)
lpc_ich         : Intel Corporation|Wildcat Point-LP LPC Controller [BRIDGE_ISA] (rev: 03)
shpchp          : Intel Corporation|Wildcat Point-LP PCI Express Root Port #5 [BRIDGE_PCI] (rev: e3)
shpchp          : Intel Corporation|Wildcat Point-LP PCI Express Root Port #4 [BRIDGE_PCI] (rev: e3)
shpchp          : Intel Corporation|Wildcat Point-LP PCI Express Root Port #3 [BRIDGE_PCI] (rev: e3)
shpchp          : Intel Corporation|Wildcat Point-LP PCI Express Root Port #1 [BRIDGE_PCI] (rev: e3)
snd_hda_intel   : Intel Corporation|Wildcat Point-LP High Definition Audio Controller [MULTIMEDIA_AUDIO_DEV] (rev: 03)
mei_me          : Intel Corporation|Wildcat Point-LP MEI Controller #1 [COMMUNICATION_OTHER] (rev: 03)
xhci_pci        : Intel Corporation|Wildcat Point-LP USB xHCI Controller [SERIAL_USB] (rev: 03)
snd_hda_intel   : Intel Corporation|Broadwell-U Audio Controller [MULTIMEDIA_AUDIO_DEV] (rev: 09)
Card:Intel 810 and later: Intel Corporation|Broadwell-U Integrated Graphics [DISPLAY_VGA] (rev: 09)
unknown         : Intel Corporation|Broadwell-U Host Bridge -OPI [BRIDGE_HOST] (rev: 09)
hub             : Linux 4.1.15-desktop-1.mga5 xhci-hcd|xHCI Host Controller [Hub|Unused|Full speed (or root) hub]
hub             : Linux 4.1.15-desktop-1.mga5 xhci-hcd|xHCI Host Controller [Hub|Unused|Full speed (or root) hub]
usb_storage     : Western Digital|My Passport 0827 [Mass Storage|SCSI|Bulk-Only]
rtsx_usb        : Generic|USB2.0-CRW
uvcvideo        : Acer, Inc|Lenovo EasyCamera  [Video|Video Control]
btusb           : Atheros Communications, Inc.|Unknown [Wireless|Radio Frequency|Bluetooth]
[root@localhost ~]#


Thanks!

Resolution: FIXED => (none)
Status: RESOLVED => REOPENED
CC: (none) => dedanna1029

Comment 10 David Walser 2016-01-17 22:24:26 CET
This service fails if it fails to insert any modules listed in /etc/modprobe.conf or /etc/modprobe.conf.d/*.

Your log shows hdaps is the module failing to load, so you need to remove that from your configuration.  If some Mageia tool is the one that put that in the configuration and it shouldn't have, you can file a bug for that.

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED


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