From nobody@FreeBSD.org  Sun Apr 14 20:29:54 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 4ED7C37B400
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 14 Apr 2002 20:29:49 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g3F3TnZ79327;
	Sun, 14 Apr 2002 20:29:49 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200204150329.g3F3TnZ79327@freefall.freebsd.org>
Date: Sun, 14 Apr 2002 20:29:49 -0700 (PDT)
From: Alexandr <AVShutko@mail.khstu.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: kernel trap 12
X-Send-Pr-Version: www-1.0

>Number:         37086
>Category:       i386
>Synopsis:       kernel trap 12
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 14 20:30:00 PDT 2002
>Closed-Date:    Fri Jul 19 06:46:26 PDT 2002
>Last-Modified:  Fri Jul 19 06:46:26 PDT 2002
>Originator:     Alexandr
>Release:        FreeBSD 4.5-RELEASE #4: Sat Apr 13 20:09:44 VLAST 2002
>Organization:
KhSTU
>Environment:
FreeBSD service.khstu.ru 4.5-RELEASE FreeBSD 4.5-RELEASE #4: Sat Apr 13 20:09:44 VLAST 2002     regressor@service.khstu.ru:/usr/src/sys/compile/SERVICE  i386
>Description:
fatal trap 12: page fault while in kernel mode
mp_lock = 00000002 ; cpuid = 0 ; lapic.id = 03000000

fault virtual addr  = 0xc12bd000
fault code          = supervisor read, page not present
instruction pointer = 0x8 : c0272502
stack pointer       = 0x10 : 0xd6ffcc30
frame pointer       = 0x10 : 0xd6ffcc58
code segment        = base 0x0, limit 0xfffff, type 0x1b
                    = DPL 0, pres 1, def32 1, gran 1

processor eflags    = interrupt enabled, resume, IOPL = 0
current process     = (316) iserverd
interrupt mask      = net <- SMP : XXX

kernel: type 12 trap, code 0

Stopped at generic_body + 0x1a : repe movsl (%esi), %es:(%edi)

----------------------------------------------------------------

>How-To-Repeat:
I dont know.... This problem appears on heavy load...
>Fix:
:(     
>Release-Note:
>Audit-Trail:

From: Shutko <AVShutko@mail.khstu.ru>
To: freebsd-gnats-submit@FreeBSD.org, AVShutko@mail.khstu.ru
Cc:  
Subject: Re: i386/37086: kernel trap 12
Date: Mon, 15 Apr 2002 15:30:47 +1100

 Also I forgot to write about sysclt variables....
 Here are content of my /etc/sysctl.conf file:
 
 net.inet.tcp.delayed_ack=0
 net.local.stream.recvspace=65535
 net.local.stream.sendspace=32768
 net.inet.tcp.sendspace=32768
 net.inet.tcp.recvspace=65535
 net.inet.tcp.always_keepalive=1
 
 vfs.vmiodirenable=1
 kern.maxfiles=65536
 kern.ipc.somaxconn=4096
 
 kern.ipc.shm_use_phys=1
 
 net.inet.icmp.drop_redirect=0
 net.inet.icmp.log_redirect=0
 net.inet.ip.redirect=0
 net.inet.icmp.icmplim=400
 net.inet.ip.sourceroute=0
 net.inet.ip.accept_sourceroute=0
 net.link.ether.inet.max_age=1200
 net.inet.icmp.bmcastecho=0
 
 
 
 

From: Hiten Pandya <hitmaster2k@yahoo.com>
To: bug-followup@FreeBSD.org
Cc: Alexandr <AVShutko@mail.khstu.ru>
Subject: Re: i386/37086 (Kern trap 12)
Date: Tue, 16 Apr 2002 04:52:03 -0700 (PDT)

 Have you tried increasing the value of NMBCLUSTERS, or did you try 
 increasing the various tunables to see if that works?  Also, it would be
 nice to have yours full spec (CPU, RAM etc.) , and kernel config.  
 
 I used to get this type of seg fault when using IPFW with BRIDGE-ing under 
 FreeBSD 4.5, but everything went OK, when I tweaked the various tunables, 
 although this might be a different case completely. :)
 
   -- Hiten Pandya
 
 __________________________________________________
 Do You Yahoo!?
 Yahoo! Tax Center - online filing with TurboTax
 http://taxes.yahoo.com/

From: Shutko <AVShutko@mail.khstu.ru>
To: freebsd-gnats-submit@FreeBSD.org, AVShutko@mail.khstu.ru
Cc:  
Subject: Re: i386/37086: kernel trap 12
Date: Tue, 16 Apr 2002 12:33:10 +1100

 And one more thing..... :) 
 Server dropped to DDB because of panic two times more (backtraces the same) and then I shuted down gigabit interface (intelpro1000T) on server and fire up builtin 100Mbit Intel pro100  network 
 adapter.... Now it working several hours without panics on very heavy load and all is just fine... 
 
 Is that wx (Intel Pro1000T) driver problem or hardware faults ?
 
 
 
 

From: "Alexandr V. Shutko" <AVShutko@mail.khstu.ru>
To: freebsd-gnats-submit@FreeBSD.org, AVShutko@mail.khstu.ru
Cc:  
Subject: Re: i386/37086: kernel trap 12
Date: Wed, 17 Apr 2002 10:35:09 +1100

 Hello Hiten,
 Tuesday, April 16, 2002, 10:52:03 PM, you wrote:
 
 HP> Have you tried increasing the value of NMBCLUSTERS, or did you try 
 HP> increasing the various tunables to see if that works?  Also, it would be
 HP> nice to have yours full spec (CPU, RAM etc.) , and kernel config.  
 
 I increased NMBCLUSTERS just after installing... System dropped to DDB
 several times on Intel Pro1000T adapter so I enabled another netcard
 and disable wx0 interface and now system works just fine... It is not NMBCLUSTERS problem...
 It seems to me it is wx0 driver problem...
 
 I said in bug report that system running Intel SR1200 server.... It
 have 512Mb of ram (real memory  = 536608768)and two procesors PIII (CPU: Pentium III/Pentium III
 Xeon/Celeron (997.46-MHz 686-class CPU).
 
 -- Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
 
 Also It have 3 network interfaces:
 
 -- fxp0: <Intel Pro 10/100B/100+ Ethernet> port 0x1480-0x14bf mem
 -- 0xfe760000-0xfe77ffff,0xfe790000-0xfe790fff irq 7 at device 3.0 on pci0
 
 -- fxp1: <Intel Pro 10/100B/100+ Ethernet> port 0x14c0-0x14ff mem
 -- 0xfe720000-0xfe73ffff,0xfe750000-0xfe750fff irq 9 at device 4.0 on pci0
 
 -- wx0: <Intel PRO/1000 T Gigabit Ethernet> mem
 -- 0xfebd0000-0xfebdffff,0xfebe0000-0xfebfffff irq 2 at device 8.0 on pci1
 
 Also there is  IDE RAID massive ar0: 76345MB <ATA SPAN array>
 [9732/255/63] that have device driver with unsupported dump routine so
 I can't produce kernel memory dump for debugging... I used DDB to get
 backtrace that I post in bug report...
 
 *******************************************************************
 Kernel config:
 
 makeoptions     DEBUG=-g
                                  
 machine         i386             
 cpu             I686_CPU         
 ident           SERVICE          
 maxusers        128              
                                  
 options         SMP              
 options         APIC_IO          
                                  
 options         MATH_EMULATE     
 options         FFS              
 options         FFS_ROOT         
 options         SOFTUPDATES      
 options         UFS_DIRHASH      
 options         MFS              
 options         MD_ROOT          
 options         NFS              
 options         NFS_ROOT         
 options         MSDOSFS          
 options         CD9660           
 options         CD9660_ROOT      
 options         PROCFS           
 options         COMPAT_43        
 options         SCSI_DELAY=15000 
 options         UCONSOLE         
 options         USERCONFIG       
 options         VISUAL_USERCONFIG
 options         KTRACE           
 
 
 options         NBUF=4096
 options         NMBCLUSTERS=8192          
 options         PANIC_REBOOT_WAIT_TIME=240
 options         DDB
 
 options         SYSVSHM
 options         SHMMAXPGS=1025                  
 options         SHMALL=1025                     
 options         SHMMAX="(SHMMAXPGS*PAGE_SIZE+1)"
 
 options         SHMMIN=2
 options         SHMMNI=33  
 options         SHMSEG=9   
                            
 options         SYSVSEM    
 options         SEMMAP=61  
 options         SEMMNI=61  
 options         SEMMNS=127 
 options         SEMMNU=61  
 options         SEMMSL=61  
 options         SEMOPM=101 
 options         SEMUME=31
 options         SYSVMSG
 
 options         MSGMNB=2049
 options         MSGMNI=41  
 options         MSGSEG=2049
 options         MSGSSZ=16  
 options         MSGTQL=41
 
 options         P1003_1B
 options         _KPOSIX_PRIORITY_SCHEDULING
 options         ICMP_BANDLIM               
 options         KBD_INSTALL_CDEV           
                                            
 device          isa                        
 device          eisa                       
 device          pci
 
 pseudo-device   loop
 pseudo-device   ether
 pseudo-device   tun  
 pseudo-device   pty  
 pseudo-device   md   
 pseudo-device   bpf  
 
 options         INET
 options         IPSEC    
 options         IPSEC_ESP
 
 options         NETSMB
 options         NETSMBCRYPTO
 options         LIBMCHAIN   
 options         LIBICONV
 
 options         IPFIREWALL
 options         IPFIREWALL_VERBOSE           
 options         IPFIREWALL_FORWARD           
 options         IPFIREWALL_VERBOSE_LIMIT=1000
 options         IPDIVERT                     
 options         IPFILTER                     
 options         IPFILTER_LOG                 
 options         IPFIREWALL_DEFAULT_TO_ACCEPT 
 options         IPSTEALTH
 
 options         RANDOM_IP_ID
 options         ICMP_BANDLIM
 options         DUMMYNET
 
 options         QUOTA
 
 pseudo-device   splash
 
 device          fdc0    at isa? port IO_FD1 irq 6 drq 2
 device          fd0     at fdc0 drive 0                
 device          fd1     at fdc0 drive 1
 
 device          ata0    at isa? port IO_WD1 irq 14
 device          ata1    at isa? port IO_WD2 irq 15
 device          ata                               
 device          atadisk
 device          atapicd
 device          atapifd
 options         ATA_STATIC_ID
 
 device          atkbdc0 at isa? port IO_KBD
 device          atkbd0  at atkbdc? irq 1 flags 0x1
 device          psm0    at atkbdc? irq 12         
 device          vga0    at isa?
 
 device          sc0     at isa? flags 0x100
 device          npx0    at nexus? port IO_NPX irq 13
 device          apm0    at nexus? disable flags 0x20
 
 device          sio0    at isa? port IO_COM1 flags 0x10 irq 4
 device          sio1    at isa? port IO_COM2 irq 3
 
 device          miibu
 device          fxp  
 device          wx
 
 *******************************************************************
 
 HP> I used to get this type of seg fault when using IPFW with BRIDGE-ing under
 HP> FreeBSD 4.5, but everything went OK, when I tweaked the various tunables, 
 HP> although this might be a different case completely. :)
 
 I tried to play with tunables... But it doesn't help... System crashes
 on sendto syscall almost every hour :( when load is high...
 
 # netstat -m
 344/1744/32768 mbufs in use (current/peak/max):
         333 mbufs allocated to data                  
         11 mbufs allocated to packet headers         
 322/1118/8192 mbuf clusters in use (current/peak/max)
 
 -- 
 With respect,
 Alexandr V. Shutko                           mailto:AVShutko@mail.khstu.ru
 

From: "Alexandr V. Shutko" <AVShutko@mail.khstu.ru>
To: freebsd-gnats-submit@FreeBSD.org, AVShutko@mail.khstu.ru
Cc:  
Subject: Re: i386/37086: kernel trap 12
Date: Wed, 17 Apr 2002 12:40:42 +1100

 Hiten Pandya <hitmaster2k@yahoo.com> wrote:
 
 > Hmm, this reminds me, maybe it could be that the load is enough to overclock
 > the interrupts.  Have you tried to use the DEVICE_POLLING code with your
 > 'fxp' drivers.  The Polling code is stable enough to work, and trust me it
 > is pretty good, although this is just a suggestion, no guarantees.
 
 > Maybe the wx0 interface needs a perf. check, but I am working on adding
 > DEVICE_POLLING support for the various network cards, which should be able
 > to deal with pretty high loads.
 
 > If you don't mind, could you please send a bug-followup to this PR, and ask
 > if some committer can change its state to 'suspended'.  I am currently not
 > a committer, otherwise I would have done it myself before bothering you. :)
 
 Please, somebody, change state of this pr to 'suspended'...
 
 -- 
 With respect,
 Alexandr V. Shutko                           mailto:AVShutko@mail.khstu.ru
 

From: Shutko <AVShutko@mail.khstu.ru>
To: freebsd-gnats-submit@FreeBSD.org, AVShutko@mail.khstu.ru
Cc:  
Subject: Re: i386/37086: kernel trap 12
Date: Thu, 18 Apr 2002 10:36:07 +1100

 Problem solved.....
 I compiled wrong device driver into kernel....
 There is 'gx' driver for Intel Pro1000T exist, I changed wx to gx and system forks just fine....
 
 BUT... I think system should not panic if I compiled wrong driver in kernel....
 I should not even attach it to wrong device...
 
 Is it bug ?
 
 
 
 
State-Changed-From-To: open->closed 
State-Changed-By: jon 
State-Changed-When: Fri Jul 19 06:45:00 PDT 2002 
State-Changed-Why:  
by originator request. 
(wx and gx are both for the same card, but wx is deprecated, which is why they both can attach) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=37086 
>Unformatted:
 >trace
 generic_copy(c12bcf00, c2b447e2, 3c, c2447b0, c2b3c50) at generic_copy+0x1a
 catchpacket(c2b3c500, c12bcf00, 3c, 5ea, c019bac8) at catchpacket+0x15e
 bpf_mtap(c285aa00, c12bcf00) at bpf_mtap+0x58
 wx_start(c285aa00, c12bcf00, c2bfadd0, c2c46500, c12bcf00) at wx_start+0x392
 ip_output(c12bcf00, 0, d54cdbfc, 0, 0) at ip_output+0xbc4
 udp_output(d54cdbc0, C12bcf00, c2c21f10, 0d49dba40) at udp_output+24a
 udp_send(d540bf80, 0, c12bcf00, c2c21f10, 0) at udp_send+0x10
 sosend(d540bf80, 0, c12bcf00, c2c21f10, 0) at sosend+0x5df
 sendit(d49dba40, 1, d6fbcf08, 0, 8089d04) at sendit+0x253
 sendto(d49dba40, d6fbcf80, 80888c0, bfbfe44c, 8089cd4) at sendto+0x4e
 syscall2(2f,2f,2f, 8089cd4, bfbfe44c) at syscall2+0x221
 Xint0x80_SYScall() at Xint0x80_SYScall+0x26
 
 -----------------------------------------------------------------
 System: i386, Intel SR1200 server, netcard: intel pro1000T, 
         dual PIII-1000.
 
 ------------------------------------------------------------------
 System running: inn, squid, iserverd, postgresql, apache 
 and snort (Intrusion Detection System that use bpf)
 securelevel=3, ipfw contain 108 rules
 
 ------------------------------------------------------------------
 Kernel config (cuts): 
 
 makeoptions     DEBUG=-g 
                          
 machine         i386     
 cpu             I686_CPU 
 ident           SERVICE  
 maxusers        128
   
 options         SMP    
 options         APIC_IO
 
 options         NBUF=4096                 
 options         NMBCLUSTERS=8192          
 options         PANIC_REBOOT_WAIT_TIME=240
 options         DDB                       
 
 pseudo-device   loop 
 pseudo-device   ether
 pseudo-device   tun  
 pseudo-device   pty  
 pseudo-device   md   
 pseudo-device   bpf  
 
 options         IPFIREWALL                   
 options         IPFIREWALL_VERBOSE           
 options         IPFIREWALL_FORWARD           
 options         IPFIREWALL_VERBOSE_LIMIT=1000
 options         IPDIVERT                     
 options         IPFILTER                     
 options         IPFILTER_LOG                 
 options         IPFIREWALL_DEFAULT_TO_ACCEPT 
 options         IPSTEALTH                    
                                              
 options         RANDOM_IP_ID                 
 options         ICMP_BANDLIM                 
 options         DUMMYNET                     
 
 device          miibus
 device          fxp   
 device          wx    
      
