PREEMPTION vs ndisulator

From: Andrew Gallatin <gallatin_at_cs.duke.edu>
Date: Fri, 16 Dec 2005 11:34:16 -0500 (EST)
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: <Myricom Myri-10G Ethernet Adapter> mem 0xfc000000-0xfcffffff,0xfdf00000-0xfdffffff irq 18 at device 0.0 on pci5
ndis0: NDIS API version: 5.1
<hang>

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 ---
Received on Fri Dec 16 2005 - 15:34:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:49 UTC