From owner-freebsd-current@FreeBSD.ORG Fri Dec 16 16:34:29 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9ACBB16A41F for ; Fri, 16 Dec 2005 16:34:29 +0000 (GMT) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 412EB43D5E for ; Fri, 16 Dec 2005 16:34:29 +0000 (GMT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.13.4/8.13.4) with ESMTP id jBGGYQEC002838 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Dec 2005 11:34:26 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id jBGGYGNM035801; Fri, 16 Dec 2005 11:34:16 -0500 (EST) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17314.60552.595375.783753@grasshopper.cs.duke.edu> Date: Fri, 16 Dec 2005 11:34:16 -0500 (EST) To: freebsd-current@freebsd.org X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Subject: PREEMPTION vs ndisulator X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2005 16:34:29 -0000 I'm trying to use an ndis driver on an amd64 machine running FreeBSD/amd64 -current from yesterday. If I enable PREEMPTION, the machine hangs when loading the driver (kldload never returns): ndis0: mem 0xfc000000-0xfcffffff,0xfdf00000-0xfdffffff irq 18 at device 0.0 on pci5 ndis0: NDIS API version: 5.1 Witness detects no problems, and if I disable PREEMPTION, the driver seems to work fine. Is PREEMPTION not safe to be used with the ndisulator, or is there a problem with the ndis driver itself? I've included some very brief debugging info below.. Thanks, Drew KDB: enter: Line break on console [thread pid 11 tid 100002 ] Stopped at kdb_enter+0x2f: nop db> tr Tracing pid 11 tid 100002 td 0xffffff001ed499c0 kdb_enter() at kdb_enter+0x2f siointr1() at siointr1+0x400 siointr() at siointr+0x3d intr_execute_handlers() at intr_execute_handlers+0x124 lapic_handle_intr() at lapic_handle_intr+0x21 Xapic_isr1() at Xapic_isr1+0x7c --- interrupt, rip = 0xffffffff803d6972, rsp = 0xffffffff94e78bf0, rbp = 0xffffffff94e78c10 --- spinlock_exit() at spinlock_exit+0x32 ithread_loop() at ithread_loop+0x355 fork_exit() at fork_exit+0x86 fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffffff94e78d40, rbp = 0 --- db> ps pid proc uid ppid pgrp flag stat wmesg wchan cmd 637 ffffff00148f3700 0 0 0 0000204 [SLPQ KeWFS 0xffffffff966ffb80][SLP] Windows Workitem 3 636 ffffff00148f3380 0 0 0 0000204 [SLPQ KeWFS 0xffffffff966f6b80][SLP] Windows Workitem 2 635 ffffff0014c72a80 0 0 0 0000204 [SLPQ KeWFS 0xffffffff966edb80][SLP] Windows Workitem 1 634 ffffff00148f3a80 0 0 0 0000204 [SLPQ KeWFS 0xffffffff966e4b80][SLP] Windows Workitem 0 633 ffffff0014c72700 0 0 0 0000204 [RUNQ] Windows DPC 0 632 ffffff0014ccd380 0 519 632 0004002 [RUNQ] kldload 519 ffffff00152a2380 1387 518 519 0004002 [SLPQ pause 0xffffff00152a23e8][SLP] tcsh 518 ffffff0014f5f700 1387 516 516 0000100 [SLPQ select 0xffffffff805e5a20][SLP] sshd 516 ffffff00152a2000 0 460 516 0004100 [SLPQ sbwait 0xffffff0017b0b128][SLP] sshd 515 ffffff001ec53000 0 1 515 0004002 [SLPQ ttyin 0xffffff001ec94c10][SLP] getty 514 ffffff0015363a80 0 1 514 0004002 [SLPQ ttyin 0xffffff00009c6810][SLP] getty 513 ffffff00186f9000 0 1 513 0004002 [SLPQ ttyin 0xffffff00009c6c10][SLP] getty 512 ffffff0018778380 0 1 512 0004002 [SLPQ ttyin 0xffffff0000a8b010][SLP] getty 511 ffffff0015363380 0 1 511 0004002 [SLPQ ttyin 0xffffff0000a8b410][SLP] getty 510 ffffff0015363700 0 1 510 0004002 [SLPQ ttyin 0xffffff0000a8b810][SLP] getty 509 ffffff0015363000 0 1 509 0004002 [SLPQ ttyin 0xffffff0000a8bc10][SLP] getty 508 ffffff00152a2a80 0 1 508 0004002 [SLPQ ttyin 0xffffff0000a8c010][SLP] getty 507 ffffff00152a2700 0 1 507 0004002 [SLPQ ttyin 0xffffff0000a8c410][SLP] getty 482 ffffff001eb18380 0 1 482 0000000 [SLPQ nanslp 0xffffffff805de528][SLP] cron --More-- db> tr 633 Tracing pid 633 tid 100074 td 0xffffff0013e8f270 sched_switch() at sched_switch+0x11f mi_switch() at mi_switch+0x153 sleepq_wait() at sleepq_wait+0x9 cv_wait_unlock() at cv_wait_unlock+0x131 cv_wait() at cv_wait+0x2c KeWaitForSingleObject() at KeWaitForSingleObject+0x2a1 ntoskrnl_dpc_thread() at ntoskrnl_dpc_thread+0xcc fork_exit() at fork_exit+0x86 fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffffff966dbd40, rbp = 0 --- db> tr 632 Tracing pid 632 tid 100069 td 0xffffff001eb1a750 sched_switch() at sched_switch+0x11f mi_switch() at mi_switch+0x153 critical_exit() at critical_exit+0x9a spinlock_exit() at spinlock_exit+0x17 turnstile_unpend() at turnstile_unpend+0x2b2 KfLowerIrql() at KfLowerIrql+0x4a dmapbase() at 0xffffff001370b34e myri10ge_sys_drv_data_start() at myri10ge_sys_drv_data_start+0x46a9 ndis_attach() at ndis_attach+0x1b0 ndis_attach_pci() at ndis_attach_pci+0x4d2 device_attach() at device_attach+0x292 pci_driver_added() at pci_driver_added+0xe0 devclass_add_driver() at devclass_add_driver+0xc8 driver_module_handler() at driver_module_handler+0xad module_register_init() at module_register_init+0x58 linker_load_module() at linker_load_module+0x950 kldload() at kldload+0x109 syscall() at syscall+0x6b2 Xfast_syscall() at Xfast_syscall+0xa8 --- syscall (304, FreeBSD ELF64, kldload), rip = 0x80067901c, rsp = 0x7fffffffe6e8, rbp = 0x7fffffffe760 ---