| Summary: | 'kldload bktr' stuck in state swwrt, exercising the disk | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Volker Stolz <vs> |
| Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
i got simmilar problems, tho this is not 100% reproduceable here. most of the time (say 70%) kldloading bktr will hang - but sometimes it will load ok. if somebody wants to run some tests i'd be glad to help. the machine is an Athlon 500 on a Irongate (v4?) chipset. cheerz simon -- /"\ http://corecode.ath.cx/#donate \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News i've tracked the problem down a bit and found out that loading bktr_mem can be the problem. if everything works ok, it runs somehow like this # kldload bktr_mem bktr_mem memory holder loaded [or something like this] # if that message appears bktr will load OK. though most of the time it won't spit out the message and trying to load bktr results in described process hang. i noticed that loading bktr_mem right after the start (before login into wdm) it will result most of the time. now that i have already loged in and run several programs, bktr_mem seems not to be able to reserve the needed memory or something like that. cheerz simon -- /"\ http://corecode.ath.cx/#donate \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News Responsible Changed From-To: freebsd-bugs->roger Over to bktr maintainer. Responsible Changed From-To: roger->freebsd-bugs It is not a bug wih the bktr driver. The bug lies in the kernel's contiguous memory allocation function which never returns. There is no way to check in advance if the contiguous memory callocation will pass or fail. When the bktr driver loads, it asks for contiguous memory. Contiguous memory is memory which is not fragmented and so you only get contiguous memory at boot time, or shortly after booting before large programs have run. So, on my own machines, I can boot, run a few small programs and then kldload the bktr driver. But if I start X and then quit X, I cannot load it because memory is fragmented. So, the problem is the kernel's memory allocation routine failing to return memory or an error. There is nothing the bktr driver can do. State Changed From-To: open->closed As explained by roger, this is due to kldloading the module after the system is already in operation. |
If I try to kldload bktr, the kldload process gets stuck in state swwrt and exercises the disk (it doesn't seem to fill the disk though). Only the first line of the detected devices show up in the kernel log. Here the boot-dmesg and the output after kldloading: FreeBSD 4.6-RC #9: Sun Jun 2 17:57:53 CEST 2002 root@monster.ikea.net:/usr/src/sys/compile/MONSTER Timecounter "i8254" frequency 1193182 Hz CPU: Pentium III/Pentium III Xeon/Celeron (751.71-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x683 Stepping = 3 Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE> real memory = 134152192 (131008K bytes) avail memory = 125857792 (122908K bytes) Programming 24 pins in IOAPIC #0 IOAPIC #0 intpin 2 -> irq 0 FreeBSD/SMP: Multiprocessor motherboard cpu0 (BSP): apic id: 0, version: 0x00040011, at 0xfee00000 cpu1 (AP): apic id: 1, version: 0x00040011, at 0xfee00000 io0 (APIC): apic id: 2, version: 0x00178011, at 0xfec00000 Preloaded elf kernel "kernel" at 0xc0496000. Preloaded elf module "linux.ko" at 0xc049609c. Preloaded elf module "agp.ko" at 0xc049613c. Preloaded elf module "drm.ko" at 0xc04961d8. ccd0-3: Concatenated disk drivers Pentium Pro MTRR support enabled md0: Malloc disk Using $PIR table, 8 entries at 0xc00fdd20 apm0: <APM BIOS> on motherboard apm: found APM BIOS v1.2, connected at v1.2 npx0: <math processor> on motherboard npx0: INT 16 interface pcib0: <Host to PCI bridge> on motherboard pci0: <PCI bus> on pcib0 agp0: <VIA 82C691 (Apollo Pro) host to PCI bridge> mem 0xe8000000-0xefffffff at device 0.0 on pci0 pcib1: <VIA 82C598MVP (Apollo MVP3) PCI-PCI (AGP) bridge> at device 1.0 on pci0 pci1: <PCI bus> on pcib1 pci1: <3Dfx Voodoo 3 graphics accelerator> at 0.0 irq 5 isab0: <VIA 82C686 PCI-ISA bridge> at device 7.0 on pci0 isa0: <ISA bus> on isab0 atapci0: <VIA 82C686 ATA100 controller> port 0xd000-0xd00f at device 7.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 uhci0: <VIA 83C572 USB controller> port 0xd400-0xd41f irq 10 at device 7.2 on pci0 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 0xd800-0xd81f irq 10 at device 7.3 on pci0 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 pci0: <unknown card> (vendor=0x1106, dev=0x3057) at 7.4 sym0: <810a> port 0xdc00-0xdcff mem 0xf7001000-0xf70010ff irq 11 at device 9.0 on pci0 sym0: No NVRAM, ID 7, Fast-10, SE, parity checking de0: <Digital 21041 Ethernet> port 0xe000-0xe07f mem 0xf7000000-0xf700007f irq 10 at device 10.0 on pci0 de0: 21041 [10Mb/s] pass 2.1 de0: address 00:40:05:a6:fc:01 pcm0: <Creative EMU10K1> port 0xe400-0xe41f irq 5 at device 11.0 on pci0 pci0: <unknown card> (vendor=0x109e, dev=0x036e) at 12.0 irq 11 pci0: <unknown card> (vendor=0x109e, dev=0x0878) at 12.1 irq 11 orm0: <Option ROM> at iomem 0xc0000-0xc9fff 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> flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 psm0: <PS/2 Mouse> irq 12 on atkbdc0 psm0: model IntelliMouse, device ID 3 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 (EPP/NIBBLE) in COMPATIBLE mode plip0: <PLIP network interface> on ppbus0 lpt0: <Printer> on ppbus0 lpt0: Interrupt-driven port ppi0: <Parallel I/O> on ppbus0 APIC_IO: Testing 8254 interrupt delivery APIC_IO: routing 8254 via IOAPIC #0 intpin 2 IPsec: Initialized Security Association Processing. IP Filter: v3.4.27 initialized. Default = pass all, Logging = enabled SMP: AP CPU #1 Launched! ================================= bktr_mem: memory holder loaded bktr0: <BrookTree 878> mem 0xf7002000-0xf7002fff irq 11 at device 12.0 on pci0 However, the remaining lines make it into the log when shutting down the machine! The bktr deviceo is not usable in this state. Fix: Build bktr into the kernel. How-To-Repeat: On this particular machine 100% reliably reproducible. Just kldload bktr_mem and then bktr.