Legacy enumerators hang laptop

Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

Killing enum-pccard unblocked everything and it booted. We’re dealing
with some sort of funny side effect. PCcard enumerator hangs, but only
if we run isapnp before.

No, remember that enum-pccard hangs around to handle insertion and
removal events. It’s normal that it’s sitting RECEIVE blocked. I’m surprised
that enum-pnpisa wasn’t running though. Could you capture the log
of the enum-devices output when you kill enum-pccard (leave a card
in a slot, it’ll make it easier to figure out the log). I’m begining
to suspect we’ve got a problem in the pipe manager. All the bus
enumerators write their output into a single pipe, which enum-devices
reads from. If pipe forgets to deliver the data from enum-pnpisa until
after enum-pccard goes away, that would explain what we’re seeing.

\

Brian Stecher (bstecher@qnx.com) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M 1W8

Brian Stecher wrote:

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
Killing enum-pccard unblocked everything and it booted. We’re dealing
with some sort of funny side effect. PCcard enumerator hangs, but only
if we run isapnp before.

No, remember that enum-pccard hangs around to handle insertion and
removal events. It’s normal that it’s sitting RECEIVE blocked. I’m surprised
that enum-pnpisa wasn’t running though. Could you capture the log
of the enum-devices output when you kill enum-pccard (leave a card
in a slot, it’ll make it easier to figure out the log). I’m begining
to suspect we’ve got a problem in the pipe manager. All the bus
enumerators write their output into a single pipe, which enum-devices
reads from. If pipe forgets to deliver the data from enum-pnpisa until
after enum-pccard goes away, that would explain what we’re seeing.

Hmm. Not to jump to conclusions, but I’ve suspected such problems for a
long time. Seen similar situations with processes getting stuck on pipe
(e.g., when doing gzip -cd | tar -xvf -). Not only with pipe, devb
drivers and fs-nfs2 too.

Here is the log. As soon as I kill enum-pccard it unblocks and then I
see one meaningful line followed by lots of rubbish (at the moment
rubbish appears speed is dropping so much you can see individual
characters appearing). Not sure why is that, may be because devc-ser is
getting started twice (speed sure drops when it is started twice, but
data is not garbled in my experience).

Checking config file ‘/etc/system/enum/common’: processing

Checking config file ‘/etc/system/enum/include’: is a directory
Checking config file ‘/etc/system/enum/devices’: is a directory
Checking config file ‘/etc/system/enum/include’: up to date
Checking config file ‘/etc/system/enum/include/isa-types’: processing
Checking config file ‘/etc/system/enum/include/block’: processing
Checking config file ‘/etc/system/enum/include/pci-vendors’: processing
Checking config file ‘/etc/system/enum/include/pci-class’: processing
Checking config file ‘/etc/system/enum/include/net’: processing
Checking config file ‘/etc/system/enum/include/pnpbios-types’:
processing
Checking config file ‘/etc/system/enum/include/par-class’: processing
Checking config file ‘/etc/system/enum/include/pccard-types’: processing
Checking config file ‘/etc/system/enum/include/pccard-vendors’:
processing
Checking config file ‘/etc/system/enum/devices’: up to date
Checking config file ‘/etc/system/enum/devices/graphics’: processing
Checking config file ‘/etc/system/enum/devices/block’: processing
Checking config file ‘/etc/system/enum/devices/bridge’: processing
Checking config file ‘/etc/system/enum/devices/char’: processing
Checking config file ‘/etc/system/enum/devices/net’: processing
Checking config file ‘/etc/system/enum/devices/input’: processing
Checking config file ‘/etc/system/enum/devices/serial’: processing
Checking config file ‘/etc/system/enum/devices/audio’: processing
Checking config file ‘/etc/system/enum/devices/printer’: processing
Starting enumerator: ‘bootdev’
Enumerator data: ‘a90124 bus=pci class=01’
Enumerator data: ‘a90124 bus=pnpbios type=01’
Enumerator data: 'F90124 ’
Starting: devc-pty -n32
Starting: mqueue (skipped: already running)
Starting enumerator: ‘pnpbios’
Starting: io-net -pttcpip -ppppmgr
Enumerator data: ‘#94222 PNPBIOS version = 1.00’
Enumerator data: ‘#94222 Control = 0x1’
Enumerator data: ‘#94222 Notification = Through polling’
Enumerator data: ‘#94222 Event flag address = 0x4b4h (for polling)’
Enumerator data: ‘’
Enumerator data: ‘#94222 Nodes count = 17, size = 138’
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0C02 type=08 subtype=80
progif=00 ioport=80 ioport1=398 ioport2=3810 mem=fff80000 device=0’
Unable to find definition for device:
bus=pnpbios
devid=PNP0C02
type=08
subtype=80
progif=00
ioport=80
ioport1=398
ioport2=3810
mem=fff80000
device=0
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0C01 type=05 subtype=00
progif=00 mem=0 mem1=dc000 mem2=100000 device=1’
Unable to find definition for device:
bus=pnpbios
devid=PNP0C01
type=05
subtype=00
progif=00
mem=0
mem1=dc000
mem2=100000
device=1
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0200 type=08 subtype=01
progif=01 ioport=0 ioport1=81 ioport2=c0 dma=4 device=2’
Unable to find definition for device:
bus=pnpbios
devid=PNP0200
type=08
subtype=01
progif=01
ioport=0
ioport1=81
ioport2=c0
dma=4
device=2
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0000 type=08 subtype=00
progif=01 ioport=20 ioport1=a0 irq=2 device=3’
Unable to find definition for device:
bus=pnpbios
devid=PNP0000
type=08
subtype=00
progif=01
ioport=20
ioport1=a0
irq=2
device=3
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0100 type=08 subtype=02
progif=01 ioport=40 irq=0 device=4’
Unable to find definition for device:
bus=pnpbios
devid=PNP0100
type=08
subtype=02
progif=01
ioport=40
irq=0
device=4
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0B00 type=08 subtype=03
progif=01 ioport=70 irq=8 device=5’
Unable to find definition for device:
bus=pnpbios
devid=PNP0B00
type=08
subtype=03
progif=01
ioport=70
irq=8
device=5
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0303 type=09 subtype=00
progif=00 ioport=60 ioport1=64 irq=1 device=6’
Potential match: primary 0=>1, secondary 0=>2
‘bus=pnpbios’
‘.type=09’
‘.subtype=00’
Checking config file ‘/etc/system/enum/devices/input’: up to date
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0C04 type=0b subtype=80
progif=00 ioport=f0 irq=13 device=7’
Unable to find definition for device:
bus=pnpbios
devid=PNP0C04
type=0b
subtype=80
progif=00
ioport=f0
irq=13
device=7
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0800 type=04 subtype=01
progif=00 ioport=61 device=8’
Potential match: primary 0=>1, secondary 0=>2
‘bus=pnpbios’
‘.type=04’
‘.subtype=01’
Checking config file ‘/etc/system/enum/devices/audio’: up to date
Enumerator data: ‘B94222 bus=pnpbios devid=PNP0A03 type=06 subtype=04
progif=00 ioport=cf8 device=9’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pnpbios’
‘.type=06’
Potential match: primary 1=>1, secondary 1=>2
‘bus=pnpbios’
‘.type=06’
‘.subtype=04’
Checking config file ‘/etc/system/enum/devices/bridge’: up to date
Starting: pci-bios (skipped: already running)
Starting enumerator: ‘pci’
Enumerator data: ‘B94222 bus=pnpbios devid=PNP0C02 type=06 subtype=01
progif=00 ioport=4d0 ioport1=8000 ioport2=1040 device=10’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pnpbios’
‘.type=06’
Checking config file ‘/etc/system/enum/devices/bridge’: up to date
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0C02 type=05 subtype=00
progif=00 mem=0 mem1=0 mem2=0 mem3=0 mem4=0 mem5=0 device=11’
Unable to find definition for device:
bus=pnpbios
devid=PNP0C02
type=05
subtype=00
progif=00
mem=0
mem1=0
mem2=0
mem3=0
mem4=0
mem5=0
device=11
Enumerator data: ‘B94222 bus=pnpbios devid=PNP0E03 type=06 subtype=05
progif=00 ioport=3e0 device=12’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pnpbios’
‘.type=06’
Checking config file ‘/etc/system/enum/devices/bridge’: up to date
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0700 type=01 subtype=02
progif=00 ioport=3f0 ioport1=3f7 irq=6 dma=2 device=13’
Already running: <bus=pnpbios> <type=01>
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0F13 type=09 subtype=02
progif=00 irq=12 device=14’
Potential match: primary 0=>1, secondary 0=>2
‘bus=pnpbios’
‘.type=09’
‘.subtype=02’
Checking config file ‘/etc/system/enum/devices/input’: up to date
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0501 type=07 subtype=00
progif=02 ioport=3f8 irq=4 device=15’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pnpbios’
‘.type=07’
Potential match: primary 1=>1, secondary 1=>2
‘bus=pnpbios’
‘.type=07’
‘.subtype=00’
Checking config file ‘/etc/system/enum/devices/char’: up to date
Enumerator data: ‘D94222 bus=pnpbios devid=PNP0400 type=07 subtype=01
progif=01 ioport=378 irq=7 device=21’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pnpbios’
‘.type=07’
Potential match: primary 1=>1, secondary 1=>2
‘bus=pnpbios’
‘.type=07’
‘.subtype=01’
Checking config file ‘/etc/system/enum/devices/char’: up to date
Potential match: primary 0=>1, secondary 0=>0
‘symbolic=spooler’
Checking config file ‘/etc/system/enum/devices/printer’: up to date
Enumerator data: 'F94222 ’
Enumerator data: ‘#98318 PCI version = 2.10’
Enumerator data: ‘B98318 bus=pci ven=8086 dev=7190 class=06 subclass=00
progif=00 busnum=0 device=0 function=0 index=0 irq=0’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pci’
‘.class=06’
Potential match: primary 1=>1, secondary 1=>2
‘bus=pci’
‘.class=06’
‘.subclass=00’
Checking config file ‘/etc/system/enum/devices/bridge’: up to date
Enumerator data: ‘B98318 bus=pci ven=8086 dev=7191 class=06 subclass=04
progif=00 busnum=0 device=1 function=0 index=0 irq=0’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pci’
‘.class=06’
Potential match: primary 1=>1, secondary 1=>2
‘bus=pci’
‘.class=06’
‘.subclass=04’
Checking config file ‘/etc/system/enum/devices/bridge’: up to date
Enumerator data: ‘D98318 bus=pci ven=125d dev=1968 class=04 subclass=01
progif=00 busnum=0 device=4 function=0 index=0 subven=125d subsys=1968
ioport=f800 irq=5 pin=A’
Potential match: primary 0=>1, secondary 0=>2
‘bus=pci’
‘.class=04’
‘.subclass=01’
Checking config file ‘/etc/system/enum/devices/audio’: up to date
Enumerator data: ‘B98318 bus=pci ven=8086 dev=7110 class=06 subclass=01
progif=00 busnum=0 device=7 function=0 index=0 irq=0’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pci’
‘.class=06’
Potential match: primary 1=>1, secondary 1=>2
‘bus=pci’
‘.class=06’
‘.subclass=01’
Checking config file ‘/etc/system/enum/devices/bridge’: up to date
Starting enumerator: ‘pnpisa’
Enumerator data: ‘D98318 bus=pci ven=8086 dev=7111 class=01 subclass=01
progif=80 busnum=0 device=7 function=1 index=0 ioport=fcd0 irq=0’
Already running: <bus=pci> <class=01>
Enumerator data: ‘D98318 bus=pci ven=8086 dev=7112 class=0c subclass=03
progif=00 busnum=0 device=7 function=2 index=0 ioport=fce0 irq=5 pin=D’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pci’
‘.class=0c’
Checking config file ‘/etc/system/enum/devices/serial’: up to date
Enumerator data: ‘B98318 bus=pci ven=8086 dev=7113 class=06 subclass=80
progif=00 busnum=0 device=7 function=3 index=0 irq=0’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pci’
‘.class=06’
Checking config file ‘/etc/system/enum/devices/bridge’: up to date
Enumerator data: ‘B98318 bus=pci ven=104c dev=ac16 class=06 subclass=07
progif=00 busnum=0 device=10 function=0 index=0 pin=A’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pci’
‘.class=06’
Potential match: primary 1=>1, secondary 1=>2
‘bus=pci’
‘.class=06’
‘.subclass=07’
Checking config file ‘/etc/system/enum/devices/bridge’: up to date
Starting: devp-pccard
Starting enumerator: ‘pccard’
Enumerator data: ‘B98318 bus=pci ven=104c dev=ac16 class=06 subclass=07
progif=00 busnum=0 device=10 function=1 index=1 pin=A’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pci’
‘.class=06’
Potential match: primary 1=>1, secondary 1=>3
‘bus=pci’
‘.class=06’
‘.subclass=07’
‘.function=1’
Checking config file ‘/etc/system/enum/devices/bridge’: up to date
Enumerator data: ‘D98318 bus=pci ven=1023 dev=939a class=03 subclass=00
progif=00 busnum=1 device=0 function=0 index=0 subven=1023 subsys=939a
mem=fd800000 mem1=fedc0000 mem2=fe000000 irq=9 pin=A’
Potential match: primary 0=>1, secondary 0=>1
‘bus=pci’
‘.class=03’
Checking config file ‘/etc/system/enum/devices/graphics’: up to date
Enumerator data: 'F98318 ’
Enumerator data: 'd106512 bus=pcmcia removal_id=1 ven=0101 dev=0556
class=0600 ioport=0200 irq=3 index=0 ’
Unable to find definition for device:
bus=pcmcia
removal_id=1
ven=0101
dev=0556
class=0600
ioport=0200
irq=3
index=0
Enumerator data: 'F106512 ’
[hanging here]

slay -f enum-pccard

Enumerator data: ‘#102414 PNPBIOS version=1.00’

Enumerator data: ëŬ¹òîèäãäàåàèíêïèíèëëîìèëîêîìèèëìëíîîíìëëâáâëîêêíèîëí
[the rest of rubbish deleted]

Later,

  • igor

Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

Brian Stecher wrote:
… I’m begining
to suspect we’ve got a problem in the pipe manager. All the bus
enumerators write their output into a single pipe, which enum-devices
reads from. If pipe forgets to deliver the data from enum-pnpisa until
after enum-pccard goes away, that would explain what we’re seeing.

Hmm. Not to jump to conclusions, but I’ve suspected such problems for a
long time. Seen similar situations with processes getting stuck on pipe
(e.g., when doing gzip -cd | tar -xvf -). Not only with pipe, devb
drivers and fs-nfs2 too.

OK, we’ve definitely found a problem in pipe when the buffer is full and
you’ve got two or more things waiting to write more data to it. I don’t
know if it’s this problem or not, but we’re working on it.


Brian Stecher (bstecher@qnx.com) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M 1W8

Brian Stecher wrote:

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
Brian Stecher wrote:
… I’m begining
to suspect we’ve got a problem in the pipe manager. All the bus
enumerators write their output into a single pipe, which enum-devices
reads from. If pipe forgets to deliver the data from enum-pnpisa until
after enum-pccard goes away, that would explain what we’re seeing.

Hmm. Not to jump to conclusions, but I’ve suspected such problems for a
long time. Seen similar situations with processes getting stuck on pipe
(e.g., when doing gzip -cd | tar -xvf -). Not only with pipe, devb
drivers and fs-nfs2 too.

OK, we’ve definitely found a problem in pipe when the buffer is full and
you’ve got two or more things waiting to write more data to it. I don’t
know if it’s this problem or not, but we’re working on it.

Thanks. Meanwhile, is there a way to disable enum-pnpisa permanently? I
don’t seem to miss anything when I disable it but it is annoying to have
to hit space/f11/f2 on every boot. What’s the effect of that?

  • igor

Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

Brian Stecher wrote:
OK, we’ve definitely found a problem in pipe when the buffer is full and
you’ve got two or more things waiting to write more data to it. I don’t
know if it’s this problem or not, but we’re working on it.

Thanks. Meanwhile, is there a way to disable enum-pnpisa permanently? I
don’t seem to miss anything when I disable it but it is annoying to have
to hit space/f11/f2 on every boot. What’s the effect of that?

Not cleanly. Setting those options puts the bus name (pnpisa in this case)
in an environment variable “EXCLUDE_BUSES” as a space separated list. You
could try manually setting that in the rc.devices script before running
enum-devices.

There’s an experimental pipe manager for you in:

http://staff.qnx.com/~bstecher/pipe.tar.gz

It’s got the bug we found fixed. Give it a whirl and let me know how
it works for you. If things are still screwed up, try giving enum-devices
a SIGCHLD signal when everything’s stopped and let me know what happened.

\

Brian Stecher (bstecher@qnx.com) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M 1W8

Brian,
sorry for long delay, I was carried away from this one.
The new pipe manager does not help. enum-devices is still being
REPLY-blocked on pipe. Sending SIGCHLD does not appear to have any effect.

Killing pipe unblocks everything though. Same behavior with new and old one.

  • Igor

Brian Stecher wrote:

OK, we’ve definitely found a problem in pipe when the buffer is full and
you’ve got two or more things waiting to write more data to it. I don’t
know if it’s this problem or not, but we’re working on it.

Thanks. Meanwhile, is there a way to disable enum-pnpisa permanently? I
don’t seem to miss anything when I disable it but it is annoying to have
to hit space/f11/f2 on every boot. What’s the effect of that?

Not cleanly. Setting those options puts the bus name (pnpisa in this case)
in an environment variable “EXCLUDE_BUSES” as a space separated list. You
could try manually setting that in the rc.devices script before running
enum-devices.

There’s an experimental pipe manager for you in:

http://staff.qnx.com/~bstecher/pipe.tar.gz

It’s got the bug we found fixed. Give it a whirl and let me know how
it works for you. If things are still screwed up, try giving enum-devices
a SIGCHLD signal when everything’s stopped and let me know what happened.

\

Brian Stecher (bstecher@qnx.com) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M 1W8