Re: fxp changes between 4.2 and earlier releases causing stability problems?

2007-11-25 Thread Josh

I do believe this has solved the problems I was having.

Cheers :)

sounds like you hit the memory leak we just found  fixed.

Index: pf.c
===
RCS file: /cvs/src/sys/net/pf.c,v
retrieving revision 1.564
diff -u -p -r1.564 pf.c
--- pf.c18 Nov 2007 21:53:47 -  1.564
+++ pf.c22 Nov 2007 01:15:47 -
@@ -816,6 +816,8 @@ pf_insert_state(struct pfi_kif *kif, str
TAILQ_FOREACH(sp, cur-states, next)
if (sp-kif == kif) {/* collision! */
pf_stateins_err(tree_lan_ext, s, kif);
+   pf_detach_state(s,
+   PF_DT_SKIP_LANEXT|PF_DT_SKIP_EXTGWY);
return (-1);
}
pf_detach_state(s, PF_DT_SKIP_LANEXT|PF_DT_SKIP_EXTGWY);
@@ -958,10 +960,8 @@ pf_src_tree_remove_state(struct pf_state
u_int32_t timeout;
 
 	if (s-src_node != NULL) {

-   if (s-state_key-proto == IPPROTO_TCP) {
-   if (s-src.tcp_est)
-   --s-src_node-conn;
-   }
+   if (s-src.tcp_est)
+   --s-src_node-conn;
if (--s-src_node-states = 0) {
timeout = s-rule.ptr-timeout[PFTM_SRC_NODE];
if (!timeout)




Re: fxp changes between 4.2 and earlier releases causing stability problems?

2007-11-22 Thread Henning Brauer
* Josh [EMAIL PROTECTED] [2007-11-20 22:35]:
 I am having large stability problems since running 4.2 as firewalls. I have 
 1x fxp and 2x dual box fxp cards, and after a while, the boxes freeze up, 

 Any suggestions/ideas?

sounds like you hit the memory leak we just found  fixed.

Index: pf.c
===
RCS file: /cvs/src/sys/net/pf.c,v
retrieving revision 1.564
diff -u -p -r1.564 pf.c
--- pf.c18 Nov 2007 21:53:47 -  1.564
+++ pf.c22 Nov 2007 01:15:47 -
@@ -816,6 +816,8 @@ pf_insert_state(struct pfi_kif *kif, str
TAILQ_FOREACH(sp, cur-states, next)
if (sp-kif == kif) {   /* collision! */
pf_stateins_err(tree_lan_ext, s, kif);
+   pf_detach_state(s,
+   PF_DT_SKIP_LANEXT|PF_DT_SKIP_EXTGWY);
return (-1);
}
pf_detach_state(s, PF_DT_SKIP_LANEXT|PF_DT_SKIP_EXTGWY);
@@ -958,10 +960,8 @@ pf_src_tree_remove_state(struct pf_state
u_int32_t timeout;
 
if (s-src_node != NULL) {
-   if (s-state_key-proto == IPPROTO_TCP) {
-   if (s-src.tcp_est)
-   --s-src_node-conn;
-   }
+   if (s-src.tcp_est)
+   --s-src_node-conn;
if (--s-src_node-states = 0) {
timeout = s-rule.ptr-timeout[PFTM_SRC_NODE];
if (!timeout)


-- 
Henning Brauer, [EMAIL PROTECTED], [EMAIL PROTECTED]
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting - Hamburg  Amsterdam



Re: fxp changes between 4.2 and earlier releases causing stability problems?

2007-11-22 Thread Josh
 Will try test it today, cheers.

Henning Brauer wrote:

  * Josh   [EMAIL PROTECTED]   [2007-11-20 22:35]:

I am having large stability problems since running 4.2 as firewalls. I have 
1x fxp and 2x dual box fxp cards, and after a while, the boxes freeze up, 

Any suggestions/ideas?

  sounds like you hit the memory leak we just found  fixed.
  
  Index: pf.c
  ===
  RCS file: /cvs/src/sys/net/pf.c,v
  retrieving revision 1.564
  diff -u -p -r1.564 pf.c
  --- pf.c18 Nov 2007 21:53:47 -  1.564
  +++ pf.c22 Nov 2007 01:15:47 -
  @@ -816,6 +816,8 @@ pf_insert_state(struct pfi_kif *kif, str
  TAILQ_FOREACH(sp, cur-states, next)
  if (sp-kif == kif) {   /* collision! */
  pf_stateins_err(tree_lan_ext, s, kif);
  +   pf_detach_state(s,
  +   PF_DT_SKIP_LANEXT|PF_DT_SKIP_EXTGWY);
  return (-1);
  }
  pf_detach_state(s, PF_DT_SKIP_LANEXT|PF_DT_SKIP_EXTGWY);
  @@ -958,10 +960,8 @@ pf_src_tree_remove_state(struct pf_state
  u_int32_t timeout;
   
  if (s-src_node != NULL) {
  -   if (s-state_key-proto == IPPROTO_TCP) {
  -   if (s-src.tcp_est)
  -   --s-src_node-conn;
  -   }
  +   if (s-src.tcp_est)
  +   --s-src_node-conn;
  if (--s-src_node-states = 0) {
  timeout = s-rule.ptr-timeout[PFTM_SRC_NODE];
  if (!timeout)



fxp changes between 4.2 and earlier releases causing stability problems?

2007-11-20 Thread Josh

Hello,

I am having large stability problems since running 4.2 as firewalls. I 
have 1x fxp and 2x dual box fxp cards, and after a while, the boxes 
freeze up, this was the last log of vmstat on the master machine:


procs   memorypagedisks traps cpu
r b wavmfre   flt  re  pi  po  fr  sr wd0 fd0  int   sys   cs 
us sy id
021 0  47364724   196   0   1   0   0   4   3   0  562   355   14  
0  2 97


And on the secondary ( also frozen ):

procs   memorypagedisks traps cpu
r b wavmfre   flt  re  pi  po  fr  sr wd0 fd0  int   sys   cs 
us sy id
0 6 0  13900676   195   0   1   0   0   4   3   0  376   331   12  
0  2 97



I went into ddb on the backup machine ( it was otherwise unresponsive ) 
and I saw a bunch of processes in the netio state.


So basically, im trying to figure out what the problem is, as I would 
rather fix it than move back to obsd 4.1 or something else. At the 
moment I am guessing that it has something to do with the fxp driver ( 
from plus42.html - For fxp(4) 
http://www.openbsd.org/cgi-bin/man.cgi?query=fxpsektion=4format=html, 
nudge the interrupt coalescing timeout to 128 ms. Lessens the interrupt 
load on busy fxp(4) 
http://www.openbsd.org/cgi-bin/man.cgi?query=fxpsektion=4format=html 
cards a lot. )


But I could be barking up the wrong tree.

Any suggestions/ideas?


Thanks,
   Josh

OpenBSD 4.2 (GENERIC) #375: Tue Aug 28 10:38:44 MDT 2007
   [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Celeron (GenuineIntel 686-class, 128KB L2 cache) 399 MHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR

real mem  = 268005376 (255MB)
avail mem = 251502592 (239MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 11/24/98, BIOS32 rev. 0 @ 0xec700, 
SMBIOS rev. 2.1 @ 0xf1941 (48 entries)

bios0: vendor Compaq version 686T5 date 11/24/98
bios0: Compaq Deskpro EN Series SFF
pcibios0 at bios0: rev 2.1 @ 0xec700/0x3900
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf74f0/112 (5 entries)
pcibios0: PCI Interrupt Router at 000:20:0 (Intel 82371AB PIIX4 ISA 
rev 0x00)

pcibios0: PCI bus #3 is the last bus
bios0: ROM list: 0xc/0x8000 0xe/0x8000!
acpi at mainbus0 not configured
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 Intel 82443BX AGP rev 0x03
ppb0 at pci0 dev 1 function 0 Intel 82443BX AGP rev 0x03
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 ATI Rage Pro rev 0x5c
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
fxp0 at pci0 dev 10 function 0 Intel 8255x rev 0x05, i82558: irq 11, 
address 00:04:54:1e:7d:04

inphy0 at fxp0 phy 1: i82555 10/100 PHY, rev. 0
ppb1 at pci0 dev 13 function 0 DEC 21152 PCI-PCI rev 0x03
pci2 at ppb1 bus 2
fxp1 at pci2 dev 4 function 0 Intel 8255x rev 0x05, i82558: irq 11, 
address 00:50:8b:68:74:b8

inphy1 at fxp1 phy 1: i82555 10/100 PHY, rev. 0
fxp2 at pci2 dev 5 function 0 Intel 8255x rev 0x05, i82558: irq 11, 
address 00:50:8b:68:74:b9

inphy2 at fxp2 phy 1: i82555 10/100 PHY, rev. 0
ppb2 at pci0 dev 14 function 0 DEC 21152 PCI-PCI rev 0x03
pci3 at ppb2 bus 3
fxp3 at pci3 dev 4 function 0 Intel 8255x rev 0x05, i82558: irq 11, 
address 00:50:8b:66:7a:74

inphy3 at fxp3 phy 1: i82555 10/100 PHY, rev. 0
fxp4 at pci3 dev 5 function 0 Intel 8255x rev 0x05, i82558: irq 11, 
address 00:09:54:1e:3d:07

inphy4 at fxp4 phy 1: i82555 10/100 PHY, rev. 0
piixpcib0 at pci0 dev 20 function 0 Intel 82371AB PIIX4 ISA rev 0x02
pciide0 at pci0 dev 20 function 1 Intel 82371AB IDE rev 0x01: DMA, 
channel 0 wired to compatibility, channel 1 wired to compatibility

wd0 at pciide0 channel 0 drive 0: WDC WD64AA
wd0: 16-sector PIO, LBA, 6149MB, 12594960 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 disabled (no drives)
uhci0 at pci0 dev 20 function 2 Intel 82371AB USB rev 0x01: irq 11
piixpm0 at pci0 dev 20 function 3 Intel 82371AB Power rev 0x02: SMI
iic0 at piixpm0
admtemp0 at iic0 addr 0x4c: adm1021
isa0 at piixpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
usb0 at uhci0: USB revision 1.0
uhub0 at usb0: Intel UHCI root hub, rev 1.00/1.00, addr 1
biomask fffd netmask fffd ttymask 
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a swap on wd0b dump on wd0b