2008-10-09 11:48:36

by Arkadiusz Miskiewicz

[permalink] [raw]
Subject: loading ipmi_watchdog causes tons of other watchdog modules to be loaded


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

--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/


2008-10-09 13:36:19

by Kay Sievers

[permalink] [raw]
Subject: Re: loading ipmi_watchdog causes tons of other watchdog modules to be loaded

On Thu, Oct 9, 2008 at 1:48 PM, Arkadiusz Miskiewicz
<[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?

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

2008-10-09 17:22:41

by Arkadiusz Miskiewicz

[permalink] [raw]
Subject: Re: loading ipmi_watchdog causes tons of other watchdog modules to be loaded

On Thursday 09 October 2008, Kay Sievers wrote:
> On Thu, Oct 9, 2008 at 1:48 PM, Arkadiusz Miskiewicz
>
> <[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?
>
> 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?

> Kay

--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/

2008-10-09 18:09:44

by Andrey Borzenkov

[permalink] [raw]
Subject: Re: loading ipmi_watchdog causes tons of other watchdog modules to be loaded

Arkadiusz Miskiewicz wrote:

> On Thursday 09 October 2008, Kay Sievers wrote:
>> On Thu, Oct 9, 2008 at 1:48 PM, Arkadiusz Miskiewicz
>>
>> <[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?
>>
>> 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.

2008-10-09 18:59:00

by Kay Sievers

[permalink] [raw]
Subject: Re: loading ipmi_watchdog causes tons of other watchdog modules to be loaded

On Thu, Oct 9, 2008 at 7:22 PM, Arkadiusz Miskiewicz
<[email protected]> wrote:
> On Thursday 09 October 2008, Kay Sievers wrote:
>> On Thu, Oct 9, 2008 at 1:48 PM, Arkadiusz Miskiewicz
>>
>> <[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?
>>
>> 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

2008-10-09 19:02:32

by Arkadiusz Miskiewicz

[permalink] [raw]
Subject: Re: loading ipmi_watchdog causes tons of other watchdog modules to be loaded

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


> Kay



--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/

2008-10-09 19:19:41

by Kay Sievers

[permalink] [raw]
Subject: Re: loading ipmi_watchdog causes tons of other watchdog modules to be loaded

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/
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

2008-10-09 20:18:45

by Arkadiusz Miskiewicz

[permalink] [raw]
Subject: Re: loading ipmi_watchdog causes tons of other watchdog modules to be loaded

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.

> Kay

--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/

2008-10-09 21:37:18

by Kay Sievers

[permalink] [raw]
Subject: Re: loading ipmi_watchdog causes tons of other watchdog modules to be loaded

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?