kern/68855: ipfw pipe changes causes system starvation

Vladimir Melnik melnik at silvercom.net
Fri Jul 9 06:20:25 PDT 2004


>Number:         68855
>Category:       kern
>Synopsis:       ipfw pipe changes causes system starvation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 09 13:20:23 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Vladimir Melnik
>Release:        FreeBSD 4.8-RELEASE-p20 i386
>Organization:
SilverCom, ISP
>Environment:
System: FreeBSD zorro.silvercom.net 4.8-RELEASE-p20 FreeBSD 4.8-RELEASE-p20 #5: Thu Jul 1 15:14:42 EEST 2004 root at zorro.silvercom.net:/usr/obj/usr/src/sys/ZORRO i386


dmesg:
Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 4.8-RELEASE-p20 #5: Thu Jul  1 15:14:42 EEST 2004
    root at zorro.silvercom.net:/usr/obj/usr/src/sys/ZORRO
Timecounter "i8254"  frequency 1193182 Hz
CPU: Intel Celeron (902.05-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x68a  Stepping = 10
  Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
real memory  = 267321344 (261056K bytes)
avail memory = 253558784 (247616K bytes)
Preloaded elf kernel "kernel" at 0xc0528000.
Pentium Pro MTRR support enabled
md0: Malloc disk
Using $PIR table, 9 entries at 0xc00fded0
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
agp0: <Intel 82815 (i815 GMCH) SVGA controller> mem 0xd6000000-0xd607ffff,0xd0000000-0xd3ffffff irq 5 at device 2.0 on pci0
pcib1: <Intel 82801BA/BAM (ICH2) Hub to PCI bridge> at device 30.0 on pci0
pci1: <PCI bus> on pcib1
rl0: <RealTek 8139 10/100BaseTX> port 0xc000-0xc0ff mem 0xd5100000-0xd51000ff irq 12 at device 5.0 on pci1
rl0: Ethernet address: 00:02:44:73:12:54
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: <Intel Pro 10/100B/100+ Ethernet> port 0xc400-0xc43f mem 0xd5000000-0xd50fffff,0xd5101000-0xd5101fff irq 11 at device 6.0 on pci1
fxp0: Ethernet address 00:d0:b7:08:18:51
inphy0: <i82555 10/100 media interface> on miibus1
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isab0: <Intel 82801BA/BAM (ICH2) PCI to LPC bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH2 ATA100 controller> port 0xf000-0xf00f at device 31.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <Intel 82801BA/BAM (ICH2) USB controller USB-A> port 0xd000-0xd01f irq 11 at device 31.2 on pci0
usb0: <Intel 82801BA/BAM (ICH2) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
pci0: <unknown card> (vendor=0x8086, dev=0x2443) at 31.3 irq 0
uhci1: <Intel 82801BA/BAM (ICH2) USB controller USB-B> port 0xd400-0xd41f irq 11 at device 31.4 on pci0
usb1: <Intel 82801BA/BAM (ICH2) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
pci0: <unknown card> (vendor=0x8086, dev=0x2445) at 31.5 irq 9
orm0: <Option ROMs> at iomem 0xc0000-0xc9fff,0xcc000-0xcd7ff on isa0
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
IP packet filtering initialized, divert enabled, rule-based forwarding enabled, default to deny, logging limited to 100 packets/entry by default
DUMMYNET initialized (011031)
ad0: 4125MB <FUJITSU MPD3043AT> [8940/15/63] at ata0-master UDMA66
acd0: CDROM <SONY CDU4811> at ata1-slave PIO4
Mounting root from ufs:/dev/ad0s1a
vlan22: promiscuous mode enabled
vlan23: promiscuous mode enabled
vlan250: promiscuous mode enabled
Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 4.8-RELEASE-p20 #5: Thu Jul  1 15:14:42 EEST 2004
    root at zorro.silvercom.net:/usr/obj/usr/src/sys/ZORRO
Timecounter "i8254"  frequency 1193182 Hz
CPU: Intel Celeron (902.05-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x68a  Stepping = 10
  Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
real memory  = 267321344 (261056K bytes)
avail memory = 253558784 (247616K bytes)
Preloaded elf kernel "kernel" at 0xc0528000.
Pentium Pro MTRR support enabled
md0: Malloc disk
Using $PIR table, 9 entries at 0xc00fded0
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
agp0: <Intel 82815 (i815 GMCH) SVGA controller> mem 0xd6000000-0xd607ffff,0xd0000000-0xd3ffffff irq 5 at device 2.0 on pci0
pcib1: <Intel 82801BA/BAM (ICH2) Hub to PCI bridge> at device 30.0 on pci0
pci1: <PCI bus> on pcib1
rl0: <RealTek 8139 10/100BaseTX> port 0xc000-0xc0ff mem 0xd5100000-0xd51000ff irq 12 at device 5.0 on pci1
rl0: Ethernet address: 00:02:44:73:12:54
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: <Intel Pro 10/100B/100+ Ethernet> port 0xc400-0xc43f mem 0xd5000000-0xd50fffff,0xd5101000-0xd5101fff irq 11 at device 6.0 on pci1
fxp0: Ethernet address 00:d0:b7:08:18:51
inphy0: <i82555 10/100 media interface> on miibus1
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isab0: <Intel 82801BA/BAM (ICH2) PCI to LPC bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH2 ATA100 controller> port 0xf000-0xf00f at device 31.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <Intel 82801BA/BAM (ICH2) USB controller USB-A> port 0xd000-0xd01f irq 11 at device 31.2 on pci0
usb0: <Intel 82801BA/BAM (ICH2) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
pci0: <unknown card> (vendor=0x8086, dev=0x2443) at 31.3 irq 0
uhci1: <Intel 82801BA/BAM (ICH2) USB controller USB-B> port 0xd400-0xd41f irq 11 at device 31.4 on pci0
usb1: <Intel 82801BA/BAM (ICH2) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
pci0: <unknown card> (vendor=0x8086, dev=0x2445) at 31.5 irq 9
orm0: <Option ROMs> at iomem 0xc0000-0xc9fff,0xcc000-0xcd7ff on isa0
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
IP packet filtering initialized, divert enabled, rule-based forwarding enabled, default to deny, logging limited to 100 packets/entry by default
DUMMYNET initialized (011031)
ad0: 4125MB <FUJITSU MPD3043AT> [8940/15/63] at ata0-master UDMA66
acd0: CDROM <SONY CDU4811> at ata1-slave PIO4
Mounting root from ufs:/dev/ad0s1a
WARNING: / was not properly dismounted


cat /etc/sysctl.conf:
net.inet.ip.fw.one_pass=0


cat /etc/ipfw.conf:
# Flushing rules #######################################################
flush
pipe flush
queue flush
#
# Traffic shaping ######################################################
#  queueing
#   pipes
#    vlan22
pipe 3000 config bw 1280Kbit/s # in
pipe 3001 config bw 1280Kbit/s # out
#   pipes
#    vlan23
pipe 3010 config bw 8192Kbit/s # in
pipe 3011 config bw 1536Kbit/s # out
#   pipes
#    vlan25
pipe 3020 config bw 2048Kbit/s # in
pipe 3021 config bw 2048Kbit/s # out
#   queues
#    high priority for vlan 22
queue 3100 config pipe 3000 weight 100 # in
queue 3101 config pipe 3001 weight 100 # out
#    high priority traffic for vlan 23
queue 3110 config pipe 3010 weight 100 # in
queue 3111 config pipe 3011 weight 100 # out
#    high priority traffic for vlan 25
queue 3120 config pipe 3020 weight 100 # in
queue 3121 config pipe 3021 weight 100 # out
#    low priority traffic for vlan 22
queue 3200 config pipe 3000 weight 1 # in
queue 3201 config pipe 3001 weight 1 # out
#    low priority traffic for vlan 23
queue 3210 config pipe 3010 weight 1 # in
queue 3211 config pipe 3011 weight 1 # out
#    low priority traffic for vlan 25
queue 3220 config pipe 3020 weight 1 # in
queue 3221 config pipe 3021 weight 1 # out
#   traffic from A.A.A.A/X to A.A.A.A/X has prio=100
add 3100 queue 3100 ip from A.A.A.A/X to A.A.A.A/X recv vlan22 in
add 3101 queue 3101 ip from A.A.A.A/X to A.A.A.A/X xmit vlan22 out
add 3110 queue 3110 ip from A.A.A.A/X to A.A.A.A/X recv vlan23 in
add 3111 queue 3111 ip from A.A.A.A/X to A.A.A.A/X xmit vlan23 out
add 3120 queue 3120 ip from A.A.A.A/X to A.A.A.A/X recv vlan25 in
add 3121 queue 3121 ip from A.A.A.A/X to A.A.A.A/X xmit vlan25 out
add 3199 skipto 4000 ip from A.A.A.A/X to A.A.A.A/X
#   traffic from any to any has prio=1
add 3200 queue 3200 ip from any to any recv vlan22 in
add 3201 queue 3201 ip from any to any xmit vlan22 out
add 3210 queue 3210 ip from any to any recv vlan23 in
add 3211 queue 3211 ip from any to any xmit vlan23 out
add 3220 queue 3220 ip from any to any recv vlan25 in
add 3221 queue 3221 ip from any to any xmit vlan25 out
add 3299 skipto 4000 ip from any to any
	[...skipped....]
# Allowing everything ##################################################
add 65534 allow ip from any to any



>Description:
	My ipfw-script (/etc/ipfw.conf) executes fine and router works
	for a weeks without any problem with it, but when I want to
	change some pipe's parameters "on the fly" (for example, when I
	run something like `ipfw pipe 3000 config bw 2048Kbit/s` in a
	command prompt of shell), my system hangs: no pings, no reaction
	on a keypressess.

	http://docs.freebsd.org/cgi/getmsg.cgi?fetch=91026+0+archive/2000/freebsd-bugs/20001029.freebsd-bugs ?



>How-To-Repeat:
	sysctl net.inet.ip.fw.one_pass=0
	ipfw pipe 1000 config bw 1Mbit/s
	ipfw add 1000 allow ip from any to any xmit fxp0 out
	ping -f -c ...
	ipfw pipe 1000 config bw 512Kbit/s



>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list