Date: Thu, 24 Mar 2005 12:28:09 +0200 From: Oleg Tarasov <subscriber@osk.com.ua> To: freebsd-stable@FreeBSD.org Subject: kernel panics on sio interrupt-level overflows Message-ID: <15810317675.20050324122809@osk.com.ua>
next in thread | raw e-mail | index | archive | help
Hello, Hello, I have FreeBSD 5.3-STABLE installed. Since I've installed a new 115200 Kbit/s modem and established ppp connection using kernel ppp, I started recieving following messages: sio0: 296 more interrupt-level buffer overflows (total 57038) This message repeats almost every minute meaning serious malfunction in the channel. Bruce Evans <bde@zeta.org.au> wrote in http://lists.freebsd.org/pipermail/freebsd-bugs/2003-May/000687.html > Try changing this line in sio.c: > > cp4ticks = speed / 10 / hz * 4; > > to something like: > > cp4ticks = speed / 10 / hz * 40; > or if you use a non-default value for hz (default is 100): > > cp4ticks = speed / 10 / 100 * 40; the change to cp4ticks = speed / 10 / hz * 40; made my kernel panic every 20 minutes I use ipfw with dummynet and have set following all recommendations HZ=1000 in my kernel configuration. So, we have cp4ticks = speed / 10 / 100 * 40 == speed / 10 / 1000 * 4 (what is the default, unchanged value) and must work properly but due to unproper interrupt latency we have these overflows. So, changing cp4ticks to cp4ticks = speed / 10 / hz * 40; == speed / 10 / 1000 * 40 made my kernel panic. ################################################## The worse thing is that when I returned sio.c to default, my kernel never stopped panicing. This panic is definitely provoked by sio device, as if I turn off my modem (or kill pppd) kernel doesn't panic. ################################################## Here is some data that can help: /etc/ppp/options: /dev/cuaa1 115200 lock modem crtscts --- /etc/ppp/options.cuaa1: noauth persist call ukrtel --- /etc/ppp/peers/ukrtel: name ukrtel defaultroute ipcp-accept-local ipcp-accept-remote ???.???.???.???:???.???.???.??? - my/peers adresses connect /etc/ppp/peers/connect.inet # empty, 1 line - exit 0 --- I am bad debugger but I can provide some info extracted from my dump: (kgdb) backtrace #0 doadump () at pcpu.h:159 #1 0xc060b063 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:397 #2 0xc060b389 in panic (fmt=0xc080321d "spin lock held too long") at /usr/src/sys/kern/kern_shutdown.c:553 #3 0xc060270c in _mtx_lock_spin (m=0xc08d7800, td=0xc19ca320, opts=0, file=0x0, line=0) at /usr/src/sys/kern/kern_mutex.c:613 #4 0xc077c165 in siointr (arg=0xc1ab8800) at /usr/src/sys/dev/sio/sio.c:1710 #5 0xc0790ead in intr_execute_handlers (isrc=0xc19b8890, iframe=0xd541ac94) at /usr/src/sys/i386/i386/intr_machdep.c:203 #6 0xc07932be in lapic_handle_intr (frame= {if_vec = 52, if_fs = -717160424, if_es = -1067384816, if_ds = 16, if_edi = -1046699232, if_esi = -1064591424, if_ebp = -717116188, if_ebx = -1046425600, if_edx = -1064566184, if_ecx = 0, if_eax = -1046425600, if_eip = -1067440569, if _cs = 8, if_eflags = 582, if_esp = -1045200000, if_ss = 4}) at /usr/src/sys/i386/i386/local_apic.c:490 #7 0xc078d753 in Xapic_isr1 () at apic_vector.s:110 #8 0x00000034 in ?? () #9 0xd5410018 in ?? () #10 0xc0610010 in coredump (td=0xc08b9fc0) at vnode_if.h:1244 #11 0xc05f6f46 in ithread_loop (arg=0xc1981c80) at /usr/src/sys/kern/kern_intr.c:546 #12 0xc05f6001 in fork_exit (callout=0xc05f6df8 <ithread_loop>, arg=0xc1981c80, frame=0xd541ad48) at /usr/src/sys/kern/kern_fork.c:811 #13 0xc078d3fc in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:209 (kgdb) list *0xc077c165 0xc077c165 is in siointr (/usr/src/sys/dev/sio/sio.c:1710). 1705 1706 #ifndef COM_MULTIPORT 1707 com = (struct com_s *)arg; 1708 1709 mtx_lock_spin(&sio_lock); 1710 siointr1(com); 1711 mtx_unlock_spin(&sio_lock); 1712 #else /* COM_MULTIPORT */ 1713 bool_t possibly_more_intrs; 1714 int unit; (kgdb) list *0xc060270c 0xc060270c is in _mtx_lock_spin (cpufunc.h:305). 300 } 301 302 static __inline void 303 ia32_pause(void) 304 { 305 __asm __volatile("pause"); 306 } 307 308 static __inline u_int 309 read_eflags(void) (kgdb) list *0xc060b389 0xc060b389 is at /usr/src/sys/kern/kern_shutdown.c:553. 548 mtx_lock_spin(&sched_lock); 549 td->td_flags |= TDF_INPANIC; 550 mtx_unlock_spin(&sched_lock); 551 if (!sync_on_panic) 552 bootopt |= RB_NOSYNC; 553 boot(bootopt); 554 } 555 556 /* 557 * Support for poweroff delay. (kgdb) list *0xc07932be 0xc07932be is in lapic_handle_intr (/usr/src/sys/i386/i386/local_apic.c:491). 486 487 if (frame.if_vec == -1) 488 panic("Couldn't get vector from ISR!"); 489 isrc = intr_lookup_source(apic_idt_to_irq(frame.if_vec)); 490 intr_execute_handlers(isrc, &frame); 491 } 492 493 /* Translate between IDT vectors and IRQ vectors. */ 494 u_int 495 apic_irq_to_idt(u_int irq) --------- here is my dmesg: ACPI APIC Table: <VIA694 AWRDACPI> Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Pentium(R) III CPU family 1133MHz (1132.80-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x6b1 Stepping = 1 Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE> real memory = 536805376 (511 MB) avail memory = 515624960 (491 MB) FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0 <Version 1.1> irqs 0-23 on motherboard npx0: [FAST] npx0: <math processor> on motherboard npx0: INT 16 interface acpi0: <VIA694 AWRDACPI> on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 cpu0: <ACPI CPU (3 Cx states)> on acpi0 cpu1: <ACPI CPU (3 Cx states)> on acpi0 acpi_tz0: <Thermal Zone> on acpi0 acpi_button0: <Power Button> on acpi0 pcib0: <ACPI Host-PCI bridge> port 0x5000-0x500f,0x4080-0x40ff,0x4000-0x407f,0xcf8-0xcff on acpi0 pci0: <ACPI PCI bus> on pcib0 agp0: <VIA Generic host to PCI bridge> mem 0xf0000000-0xf3ffffff at device 0.0 on pci0 pcib1: <PCI-PCI bridge> at device 1.0 on pci0 pci1: <PCI bus> on pcib1 pci1: <display, VGA> at device 0.0 (no driver attached) atapci0: <Promise PDC20267 UDMA100 controller> port 0xb000-0xb03f,0xac00-0xac03,0xa800-0xa807,0xa400-0xa403,0xa000-0xa007 mem 0xfb100000-0xfb11ffff irq 18 at device 12.0 on pci0 ata2: channel #0 on atapci0 ata3: channel #1 on atapci0 fxp0: <Intel 82559 Pro/100 Ethernet> port 0xb400-0xb43f mem 0xfb000000-0xfb0fffff,0xfb120000-0xfb120fff irq 19 at device 13.0 on pci0 miibus0: <MII bus> on fxp0 inphy0: <i82555 10/100 media interface> on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:30:48:41:17:32 isab0: <PCI-ISA bridge> at device 17.0 on pci0 isa0: <ISA bus> on isab0 atapci1: <VIA 8233 UDMA100 controller> port 0xb800-0xb80f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 17.1 on pci0 ata0: channel #0 on atapci1 ata1: channel #1 on atapci1 uhci0: <VIA 83C572 USB controller> port 0xbc00-0xbc1f irq 10 at device 17.2 on pci0 uhci0: [GIANT-LOCKED] usb0: <VIA 83C572 USB controller> on uhci0 usb0: USB revision 1.0 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: <VIA 83C572 USB controller> port 0xc000-0xc01f irq 10 at device 17.3 on pci0 uhci1: [GIANT-LOCKED] usb1: <VIA 83C572 USB controller> on uhci1 usb1: USB revision 1.0 uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: <VIA 83C572 USB controller> port 0xc400-0xc41f irq 10 at device 17.4 on pci0 uhci2: [GIANT-LOCKED] usb2: <VIA 83C572 USB controller> on uhci2 usb2: USB revision 1.0 uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered fdc0: <floppy drive controller> port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0 fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A ppc0: <ECP parallel printer port> port 0x778-0x77b,0x378-0x37f irq 7 drq 3 on acpi0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/16 bytes threshold ppbus0: <Parallel port bus> on ppc0 plip0: <PLIP network interface> on ppbus0 lpt0: <Printer> on ppbus0 lpt0: Interrupt-driven port ppi0: <Parallel I/O> on ppbus0 atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0 atkbd0: <AT Keyboard> irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: <PS/2 Mouse> irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model IntelliMouse Explorer, device ID 4 orm0: <ISA Option ROMs> at iomem 0xcc000-0xd3fff,0xc0000-0xc7fff on isa0 pmtimer0 on isa0 sc0: <System console> at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounters tick every 1.000 msec ipfw2 initialized, divert enabled, rule-based forwarding enabled, default to accept, logging limited to 300 packets/entry by default ad4: 57241MB <ST360021A/3.19> [116301/16/63] at ata2-master UDMA100 ad6: 57241MB <ST360021A/3.19> [116301/16/63] at ata3-master UDMA100 ar0: 57241MB <ATA RAID1 array> [7297/255/63] status: READY subdisks: disk0 READY on ad4 at ata2-master disk1 READY on ad6 at ata3-master SMP: AP CPU #1 Launched! -- Best regards, Oleg Tarasov mailto:subscriber@osk.com.ua
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15810317675.20050324122809>