Skip to contentSkip to conversation

loading ipmi_watchdog causes tons of other watchdog modules to be loaded

DISCUSSION Arkadiusz Miskiewicz 3 participants 9 messages Oct 9, 2008

lore
Share & tools
lore
#0 lore raw

No udev on the system. kernel 2.6.25.18-1.

After loading ipmi_watchdog and doing "cat /dev/watchdog" tons of other, useles, watchdog modules is loaded. Any idea what introduced such weird behaviour?

# zgrep WATCH /proc/config.gz
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_IPMI_WATCHDOG=m
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set
CONFIG_SOFT_WATCHDOG=m
CONFIG_HP_WATCHDOG=m
CONFIG_SBC_EPX_C3_WATCHDOG=m
CONFIG_PCIPCWATCHDOG=m
CONFIG_USBPCWATCHDOG=m
[ 1428.949724] ipmi message handler version 39.1
[ 1428.954908] IPMI Watchdog: driver initialized
[ 1428.991475] WDT driver for Wafer 5823 single board computer initialising.
[ 1428.991475] Wafer 5823 WDT: initialized. timeout=60 sec (nowayout=0)
[ 1428.999069] W83977F WDT: W83977F WDT driver, v1.00
[ 1428.999069] W83977F WDT: cannot register miscdev on minor=130 (err=-16)
[ 1429.018171] w83877f_wdt: I/O address 0x0443 already in use
[ 1429.029361] w83697hf/hg WDT: WDT driver for W83697HF/HG initializing
[ 1429.029361] w83697hf/hg WDT: Looking for watchdog at address 0x2e
[ 1429.029361] w83697hf/hg WDT: watchdog not found at address 0x2e
[ 1429.029361] w83697hf/hg WDT: No W83697HF/HG could be found
[ 1429.039465] WDT driver for the Winbond(TM) W83627HF/THF/HG Super I/O chip 
initialising.
[ 1429.039465] w83627hf/thf/hg WDT: cannot register miscdev on minor=130 
(err=-16)
[ 1429.049504] SoftDog: cannot register miscdev on minor=130 (err=-16)
[ 1429.059574] SMsC 37B787 watchdog component driver 1.1 initialising...
[ 1429.059574] smsc37b787_wdt: Unable to register miscdev on minor 130
[ 1429.069971] sc520_wdt: cannot register miscdev on minor=130 (err=-16)
[ 1429.080149] sc1200wdt: build 20020303
[ 1429.080149] sc1200wdt: io parameter must be specified
[ 1429.096875] epx_c3: cannot register miscdev on minor=130 (err=-16)
[ 1429.106937] sbc8360: failed to register misc device
[ 1429.116985] sbc60xxwdt: I/O address 0x0443 already in use
[ 1429.127056] usbcore: registered new interface driver pcwd_usb
[ 1429.127056] pcwd_usb: Berkshire USB-PC Watchdog driver v1.02 (21 Jan 2007)
[ 1429.128503] pc87413 WDT: Version 1.1 at io 0x2E
[ 1429.128507] pc87413 WDT: cannot register miscdev on minor=130 (err=-16)
[ 1429.150453] machzwd: MachZ ZF-Logic Watchdog driver initializing.
[ 1429.150453] machzwd: no ZF-Logic found
[ 1429.180669] ib700wdt: WDT driver for IB700 single board computer 
initialising.
[ 1429.180676] ib700wdt: START method I/O 443 is not available.
[ 1429.180676] ib700wdt: probe of ib700wdt failed with error -5
[ 1429.180695] iTCO_vendor_support: vendor-support=0
[ 1429.183584] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.02 (26-Jul-2007)
[ 1429.183700] iTCO_wdt: No card detected
[ 1429.211892] eurwdt: can't misc_register on minor=130
[ 1429.235205] cpu5wdt: misc_register failed
[ 1429.245262] alim7101_wdt: Steve Hill <[email protected]>.
[ 1429.245262] alim7101_wdt: ALi M7101 PMU not present - WDT not set
[ 1429.265354] WDT driver for Advantech single board computer initialising.
[ 1429.265361] advantechwdt: I/O address 0x0443 already in use
[ 1429.265361] advantechwdt: probe of advantechwdt failed with error -5
[ 1429.265378] WDT driver for Acquire single board computer initialising.
[ 1429.265385] acquirewdt: I/O address 0x0043 already in use
[ 1429.265385] acquirewdt: probe of acquirewdt failed with error -5
Signature · 2 lines
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
#1 lore raw
Quoted 6 lines · Arkadiusz Miskiewicz

No udev on the system. kernel 2.6.25.18-1.

After loading ipmi_watchdog and doing "cat /dev/watchdog" tons of other, useles, watchdog modules is loaded. Any idea what introduced such weird behaviour?

I guess the /proc/sys/kernel/modprobe, which lets the kernel fork a modprobe process when you touch a "dangling" device node, which does not have corresponding driver.

Kay

#2 lore raw
Quoted 5 lines · Kay Sievers

On Thu, Oct 9, 2008 at 1:48 PM, Arkadiusz Miskiewicz

Quoted 2 lines · <[email protected]> wrote:

No udev on the system. kernel 2.6.25.18-1.

Quoted 7 lines
Quoted 3 lines

After loading ipmi_watchdog and doing "cat /dev/watchdog" tons of other, useles, watchdog modules is loaded. Any idea what introduced such weird behaviour?

I guess the /proc/sys/kernel/modprobe, which lets the kernel fork a modprobe process when you touch a "dangling" device node, which does not have corresponding driver.

... but that ipmi_watchdog is the correct driver that handles /dev/watchdog, so this shouldn't be happening, correct?

Quoted 1 line

Kay

Signature · 2 lines
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
#3 lore raw
Quoted 10 lines · Arkadiusz Miskiewicz
Quoted 9 lines · Kay Sievers

On Thu, Oct 9, 2008 at 1:48 PM, Arkadiusz Miskiewicz

Quoted 5 lines · <[email protected]> wrote:

No udev on the system. kernel 2.6.25.18-1.

After loading ipmi_watchdog and doing "cat /dev/watchdog" tons of other, useles, watchdog modules is loaded. Any idea what introduced such weird behaviour?

Quoted 7 lines
Quoted 3 lines

I guess the /proc/sys/kernel/modprobe, which lets the kernel fork a modprobe process when you touch a "dangling" device node, which does not have corresponding driver.

... but that ipmi_watchdog is the correct driver that handles /dev/watchdog, so this shouldn't be happening, correct?

That's true, but it declares itself as handler for this device entry very deep in some callback. It is quite possible that event that would have triggered this callback did not yet happen.

#4 lore raw
In reply to Arkadiusz Miskiewicz
Quoted 10 lines · Arkadiusz Miskiewicz
Quoted 9 lines · Kay Sievers

On Thu, Oct 9, 2008 at 1:48 PM, Arkadiusz Miskiewicz

Quoted 5 lines · <[email protected]> wrote:

No udev on the system. kernel 2.6.25.18-1.

After loading ipmi_watchdog and doing "cat /dev/watchdog" tons of other, useles, watchdog modules is loaded. Any idea what introduced such weird behaviour?

Quoted 6 lines
Quoted 3 lines

I guess the /proc/sys/kernel/modprobe, which lets the kernel fork a modprobe process when you touch a "dangling" device node, which does not have corresponding driver.

... but that ipmi_watchdog is the correct driver that handles /dev/watchdog, so this shouldn't be happening, correct?

While the driver you expect to work is loaded, what does:
ls -l /dev/watchdog
print?

If the devno of this node is 10:130, what does:
find /sys/class /sys/devices/ -name dev | xargs grep 10:130
print?

Kay

#5 lore raw
Quoted 6 lines · Kay Sievers

On Thu, Oct 9, 2008 at 7:22 PM, Arkadiusz Miskiewicz

Quoted 2 lines

... but that ipmi_watchdog is the correct driver that handles /dev/watchdog, so this shouldn't be happening, correct?

Quoted 7 lines

While the driver you expect to work is loaded, what does:
ls -l /dev/watchdog
print?

If the devno of this node is 10:130, what does:
find /sys/class /sys/devices/ -name dev | xargs grep 10:130
print?

# ls -l /dev/watchdog
crw------- 1 root root 10, 130 sie  8 17:00 /dev/watchdog
# find /sys/class /sys/devices/ -name dev | xargs grep 10:130
/sys/class/misc/watchdog/dev:10:130
Quoted 1 line

Kay

Signature · 2 lines
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
#6 lore raw
Quoted 11 lines · Arkadiusz Miskiewicz
Quoted 10 lines · Kay Sievers

On Thu, Oct 9, 2008 at 7:22 PM, Arkadiusz Miskiewicz

Quoted 2 lines

... but that ipmi_watchdog is the correct driver that handles /dev/watchdog, so this shouldn't be happening, correct?

While the driver you expect to work is loaded, what does:
ls -l /dev/watchdog
print?

Quoted 8 lines
Quoted 3 lines

If the devno of this node is 10:130, what does:
find /sys/class /sys/devices/ -name dev | xargs grep 10:130
print?

# ls -l /dev/watchdog
crw------- 1 root root 10, 130 sie  8 17:00 /dev/watchdog
# find /sys/class /sys/devices/ -name dev | xargs grep 10:130
/sys/class/misc/watchdog/dev:10:130

Ok, so you actually have a driver bound to that device number, and it should not trigger the usual module autoloading mechanism.

What does:
ls -l /sys/class/misc/watchdog/
and
ls -l /sys/class/misc/watchdog/device/
print?

Does the /sys/class/misc/watchdog/ directory exist, before you load the module you expect to be the driver behind /dev/watchdog?

To clarify, the other modules get loaded, after you loaded but module, the above /sys/class/misc/watchdog/ directory exists, and only if you read from the device, all the other modules get loaded?

Kay

#7 lore raw
Quoted 22 lines · Kay Sievers

On Thu, Oct 9, 2008 at 9:02 PM, Arkadiusz Miskiewicz

Quoted 10 lines · <[email protected]> wrote:
Quoted 9 lines · Kay Sievers

On Thu, Oct 9, 2008 at 7:22 PM, Arkadiusz Miskiewicz

Quoted 2 lines

... but that ipmi_watchdog is the correct driver that handles /dev/watchdog, so this shouldn't be happening, correct?

While the driver you expect to work is loaded, what does:
ls -l /dev/watchdog
print?

Quoted 8 lines
Quoted 3 lines

If the devno of this node is 10:130, what does:
find /sys/class /sys/devices/ -name dev | xargs grep 10:130
print?

# ls -l /dev/watchdog
crw------- 1 root root 10, 130 sie  8 17:00 /dev/watchdog
# find /sys/class /sys/devices/ -name dev | xargs grep 10:130
/sys/class/misc/watchdog/dev:10:130
Quoted 5 lines

Ok, so you actually have a driver bound to that device number, and it should not trigger the usual module autoloading mechanism.

What does:
ls -l /sys/class/misc/watchdog/

# ls -l /sys/class/misc/watchdog/
razem 0
-r--r--r-- 1 root root 4096 paź  9 22:02 dev
drwxr-xr-x 2 root root    0 paź  9 22:02 power
lrwxrwxrwx 1 root root    0 paź  9 22:22 subsystem -> ../../misc
-rw-r--r-- 1 root root 4096 paź  9 22:02 uevent
Quoted 3 lines

and
ls -l /sys/class/misc/watchdog/device/
print?

# LC_ALL=C ls -l /sys/class/misc/watchdog/device/
ls: cannot access /sys/class/misc/watchdog/device/: No such file or directory

Quoted 2 lines

Does the /sys/class/misc/watchdog/ directory exist, before you load the module you expect to be the driver behind /dev/watchdog?

It doesn't exist before. modprobe ipmi_watchdog,
then /sys/class/misc/watchdog/ becomes available.

Quoted 3 lines

To clarify, the other modules get loaded, after you loaded but module, the above /sys/class/misc/watchdog/ directory exists, and only if you read from the device, all the other modules get loaded?

Exactly. I load ipmi_watchdog, /sys/class/misc/watchdog/ becomes available (no /sys/class/misc/watchdog/device/ though), then cat /dev/watchdog and this causes that other watchdog modules are loaded.

Quoted 1 line

Kay

Signature · 2 lines
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/
#8 lore raw

On Thu, Oct 9, 2008 at 10:18 PM, Arkadiusz Miskiewicz<[email protected]> wrote:> On Thursday 09 of October 2008, Kay Sievers wrote:>> On Thu, Oct 9, 2008 at 9:02 PM, Arkadiusz Miskiewicz>>>> <[email protected]> wrote:>> > On Thursday 09 October 2008, Kay Sievers wrote:>> >> On Thu, Oct 9, 2008 at 7:22 PM, Arkadiusz Miskiewicz>> >>>> >> > ... but that ipmi_watchdog is the correct driver that handles>> >> > /dev/watchdog, so this shouldn't be happening, correct?>> >>>> >> While the driver you expect to work is loaded, what does:>> >> ls -l /dev/watchdog>> >> print?>> >>>> >> If the devno of this node is 10:130, what does:>> >> find /sys/class /sys/devices/ -name dev | xargs grep 10:130>> >> print?>> >>> > # ls -l /dev/watchdog>> > crw------- 1 root root 10, 130 sie 8 17:00 /dev/watchdog>> > # find /sys/class /sys/devices/ -name dev | xargs grep 10:130>> > /sys/class/misc/watchdog/dev:10:130>>>> Ok, so you actually have a driver bound to that device number, and it>> should not trigger the usual module autoloading mechanism.>>>> What does:>> ls -l /sys/class/misc/watchdog/>> # ls -l /sys/class/misc/watchdog/> razem 0> -r--r--r-- 1 root root 4096 paź 9 22:02 dev> drwxr-xr-x 2 root root 0 paź 9 22:02 power> lrwxrwxrwx 1 root root 0 paź 9 22:22 subsystem -> ../../misc> -rw-r--r-- 1 root root 4096 paź 9 22:02 uevent>>>> and>> ls -l /sys/class/misc/watchdog/device/>> print?>> # LC_ALL=C ls -l /sys/class/misc/watchdog/device/> ls: cannot access /sys/class/misc/watchdog/device/: No such file or directory>>>> Does the /sys/class/misc/watchdog/ directory exist, before you load>> the module you expect to be the driver behind /dev/watchdog?>> It doesn't exist before. modprobe ipmi_watchdog,> then /sys/class/misc/watchdog/ becomes available.>>> To clarify, the other modules get loaded, after you loaded but module,>> the above /sys/class/misc/watchdog/ directory exists, and only if you>> read from the device, all the other modules get loaded?>> Exactly. I load ipmi_watchdog, /sys/class/misc/watchdog/ becomes available> (no /sys/class/misc/watchdog/device/ though), then cat /dev/watchdog and this> causes that other watchdog modules are loaded.
Hmm, sounds strange.
Can you create an executable shell script "/mp" like: #!/bin/sh echo $3 >> /mp.log
point /proc/sys/kernel/modprobe to it: echo /mp > /proc/sys/kernel/modprobe
and open the device node. The /mp.log file shows us the alias thekernel is requesting? Kay���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�