Discussion:
converted iwi(4) for testing Was: [Testers needed!] WiFi drivers changes
(too old to reply)
Gleb Smirnoff
2015-06-02 16:20:21 UTC
Permalink
Michael,

I've converted iwi(4) and refreshed the D2655. I will appreciate
if you test it. Please report if there are any problems. Thanks!

https://reviews.freebsd.org/D2655
--
Totus tuus, Glebius.
Michael Moll
2015-06-02 21:47:36 UTC
Permalink
Hi,
Post by Gleb Smirnoff
I've converted iwi(4) and refreshed the D2655. I will appreciate
if you test it. Please report if there are any problems. Thanks!
Some seconds after bringing it up I'm getting:

kernel trap 12 with interrupts disabled

Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address = 0x6864733b
fault code = supervisor read, page not present
instruction pointer = 0x20:0xc0babee6
stack pointer = 0x28:0xc7211ac0
frame pointer = 0x28:0xc7211b24
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = resume, IOPL = 0
current process = 0 (iwi0 net80211 taskq)
[ thread pid 0 tid 100048 ]
Stopped at thread_lock_flags_+0x56: movl 0x10(%edi),%eax
db> bt
Tracing pid 0 tid 100048 td 0xc82cf960
thread_lock_flags_(c8223400,10,c12d590d,d2,c0bdec1d,...) at thread_lock_flags_+0x56/frame 0xc7211b24
propagate_priority(c82cf960,c758f900,c12d590d,2da,11,...) at propagate_priority+0xcb/frame 0xc7211b50
turnstile_wait(c758f900,c8223400,0,c82cf960,87abb22,...) at turnstile_wait+0x3fe/frame 0xc7211b80
__mtx_lock_sleep(c759d7d0,c82cf960,0,0,0,...) at __mtx_lock_sleep+0x17f/frame 0xc7211bf0
iwi_update_wme(c78e0000,1,c7775c98,0,c12c0692,...) at iwi_update_wme+0xa4/frame 0xc7211c20
taskqueue_run_locked(c7775c80,c7775c98,0,c12c0692,0,...) at taskqueue_run_locked+0x176/frame 0xc7211c6c
taskqueue_thread_loop(c78e00ac,c7211ce8,0,0,0,...) at taskqueue_thread_loop+0x117/frame 0xc7211ca4
fork_exit(c0c308b0,c78e00ac,c7211ce8) at fork_exit+0xa2/frame 0xc7211cd4
fork_trampoline() at fork_trampoline+0x8/frame 0xc7211cd4
--- trap 0, eip = 0, esp = 0xc7211d20, ebp = 0 ---

Regards
--
Michael Moll
Gleb Smirnoff
2015-06-02 22:48:06 UTC
Permalink
On Tue, Jun 02, 2015 at 11:47:36PM +0200, Michael Moll wrote:
M> On Tue, Jun 02, 2015 at 07:20:21PM +0300, Gleb Smirnoff wrote:
M> > I've converted iwi(4) and refreshed the D2655. I will appreciate
M> > if you test it. Please report if there are any problems. Thanks!
M>
M> Some seconds after bringing it up I'm getting:
M>
M> kernel trap 12 with interrupts disabled

Oh, we have just uncovered a very funny bug in the current iwi(4) code.

Look at this!

https://lists.freebsd.org/pipermail/svn-src-head/2015-June/072615.html

I have fixed the bug in head, and updated the phab revision. The current
phab revision will apply only to the fresh head.

Please retry! And thanks a lot for your efforts. :)
--
Totus tuus, Glebius.
Michael Moll
2015-06-02 23:35:01 UTC
Permalink
Hi,
Post by Gleb Smirnoff
M> > I've converted iwi(4) and refreshed the D2655. I will appreciate
M> > if you test it. Please report if there are any problems. Thanks!
M>
M>
M> kernel trap 12 with interrupts disabled
Oh, we have just uncovered a very funny bug in the current iwi(4) code.
Nice one. :)
Post by Gleb Smirnoff
I have fixed the bug in head, and updated the phab revision. The current
phab revision will apply only to the fresh head.
Please retry! And thanks a lot for your efforts. :)
This already is resulting in a working connection. I'll test more
extensively tomorrow and report back.

Thanks!
--
Michael Moll
Gleb Smirnoff
2015-06-03 10:42:22 UTC
Permalink
Michael,

On Wed, Jun 03, 2015 at 01:35:01AM +0200, Michael Moll wrote:
M> > I have fixed the bug in head, and updated the phab revision. The current
M> > phab revision will apply only to the fresh head.
M> >
M> > Please retry! And thanks a lot for your efforts. :)
M>
M> This already is resulting in a working connection. I'll test more
M> extensively tomorrow and report back.

Thanks a lot. Please check that 'netstat -hI wlan0 1' reports sane data
about packets and bytes.
--
Totus tuus, Glebius.
Michael Moll
2015-06-03 19:51:56 UTC
Permalink
Hi,
Post by Gleb Smirnoff
M> This already is resulting in a working connection. I'll test more
M> extensively tomorrow and report back.
Thanks a lot. Please check that 'netstat -hI wlan0 1' reports sane data
about packets and bytes.
All working well, the only thing I'm seeing is that a shutdown or reboot
is hanging, tracing via kdb shows:

Tracing command wpa_supplicant pid 293 tid 100075 td 0xc81b7960
sched_switch(c81b7960,0,104,0,0,...) at sched_switch+0x2d8/frame 0xc72b88f4
mi_switch(104,0,c81b7960,c72b8944,c81b7960,c78e00b0) at mi_switch+0x11e/frame 0xc72b8928
sleepq_switch(c81b7960,0,c12d53b2,276,2710,...) at sleepq_switch+0x15b/frame 0xc72b8950
sleepq_wait(c78e00b0,6c,c12c0672,0,0,...) at sleepq_wait+0x3f/frame 0xc72b897c
_sleep(c78e00b0,c7775c98,6c,c12c0672,0,...) at _sleep+0x311/frame 0xc72b89c0
taskqueue_drain(c7775c80,c78e00b0,c81b7960,c72b8a48,c0d0f121,...) at taskqueue_drain+0x1a5/frame 0xc72b89fc
ieee80211_waitfor_parent(c78e0014,0,0,0,0,...) at ieee80211_waitfor_parent+0x30/frame 0xc72b8a10
ieee80211_ioctl(c7879400,80206910,c72b8b78,c72b8a78,c0b9515c,...) at ieee80211_ioctl+0x391/frame 0xc72b8a48
ifioctl(c88fe720,80206910,c72b8b78,c81b7960,10000000,...) at ifioctl+0x144a/frame 0xc72b8ad4
soo_ioctl(c8664700,80206910,c72b8b78,c76ee900,c81b7960,...) at soo_ioctl+0x25d/frame 0xc72b8b08
kern_ioctl(c81b7960,3,80206910,c72b8b78,10,...) at kern_ioctl+0x31d/frame 0xc72b8b50
sys_ioctl(c81b7960,c72b8ca8,28ce9000,283f8f12,c77189c0,...) at sys_ioctl+0x11b/frame 0xc72b8c10
syscall(c72b8ce8) at syscall+0x5e0/frame 0xc72b8cdc
Xint0x80_syscall() at Xint0x80_syscall+0x21/frame 0xc72b8cdc
--- syscall (54, FreeBSD ELF32, sys_ioctl), eip = 0x284a1d4f, esp = 0xbfbfec3c, ebp = 0xbfbfec98 ---

But i guess that might be another iwi bug that got uncovered now and
is not related to the conversion.

Regards
--
Michael Moll
Gleb Smirnoff
2015-06-03 19:57:44 UTC
Permalink
On Wed, Jun 03, 2015 at 09:51:56PM +0200, Michael Moll wrote:
M> On Wed, Jun 03, 2015 at 01:42:22PM +0300, Gleb Smirnoff wrote:
M> > M> This already is resulting in a working connection. I'll test more
M> > M> extensively tomorrow and report back.
M> >
M> > Thanks a lot. Please check that 'netstat -hI wlan0 1' reports sane data
M> > about packets and bytes.
M>
M> All working well, the only thing I'm seeing is that a shutdown or reboot
M> is hanging, tracing via kdb shows:
M>
M> Tracing command wpa_supplicant pid 293 tid 100075 td 0xc81b7960
M> sched_switch(c81b7960,0,104,0,0,...) at sched_switch+0x2d8/frame 0xc72b88f4
M> mi_switch(104,0,c81b7960,c72b8944,c81b7960,c78e00b0) at mi_switch+0x11e/frame 0xc72b8928
M> sleepq_switch(c81b7960,0,c12d53b2,276,2710,...) at sleepq_switch+0x15b/frame 0xc72b8950
M> sleepq_wait(c78e00b0,6c,c12c0672,0,0,...) at sleepq_wait+0x3f/frame 0xc72b897c
M> _sleep(c78e00b0,c7775c98,6c,c12c0672,0,...) at _sleep+0x311/frame 0xc72b89c0
M> taskqueue_drain(c7775c80,c78e00b0,c81b7960,c72b8a48,c0d0f121,...) at taskqueue_drain+0x1a5/frame 0xc72b89fc
M> ieee80211_waitfor_parent(c78e0014,0,0,0,0,...) at ieee80211_waitfor_parent+0x30/frame 0xc72b8a10
M> ieee80211_ioctl(c7879400,80206910,c72b8b78,c72b8a78,c0b9515c,...) at ieee80211_ioctl+0x391/frame 0xc72b8a48
M> ifioctl(c88fe720,80206910,c72b8b78,c81b7960,10000000,...) at ifioctl+0x144a/frame 0xc72b8ad4
M> soo_ioctl(c8664700,80206910,c72b8b78,c76ee900,c81b7960,...) at soo_ioctl+0x25d/frame 0xc72b8b08
M> kern_ioctl(c81b7960,3,80206910,c72b8b78,10,...) at kern_ioctl+0x31d/frame 0xc72b8b50
M> sys_ioctl(c81b7960,c72b8ca8,28ce9000,283f8f12,c77189c0,...) at sys_ioctl+0x11b/frame 0xc72b8c10
M> syscall(c72b8ce8) at syscall+0x5e0/frame 0xc72b8cdc
M> Xint0x80_syscall() at Xint0x80_syscall+0x21/frame 0xc72b8cdc
M> --- syscall (54, FreeBSD ELF32, sys_ioctl), eip = 0x284a1d4f, esp = 0xbfbfec3c, ebp = 0xbfbfec98 ---
M>
M> But i guess that might be another iwi bug that got uncovered now and
M> is not related to the conversion.

Well, if it wasn't the case before, I must fix it. Well take a look.
--
Totus tuus, Glebius.
Gleb Smirnoff
2015-06-04 11:29:22 UTC
Permalink
On Wed, Jun 03, 2015 at 09:51:56PM +0200, Michael Moll wrote:
M> All working well, the only thing I'm seeing is that a shutdown or reboot
M> is hanging, tracing via kdb shows:
M>
M> Tracing command wpa_supplicant pid 293 tid 100075 td 0xc81b7960
M> sched_switch(c81b7960,0,104,0,0,...) at sched_switch+0x2d8/frame 0xc72b88f4
M> mi_switch(104,0,c81b7960,c72b8944,c81b7960,c78e00b0) at mi_switch+0x11e/frame 0xc72b8928
M> sleepq_switch(c81b7960,0,c12d53b2,276,2710,...) at sleepq_switch+0x15b/frame 0xc72b8950
M> sleepq_wait(c78e00b0,6c,c12c0672,0,0,...) at sleepq_wait+0x3f/frame 0xc72b897c
M> _sleep(c78e00b0,c7775c98,6c,c12c0672,0,...) at _sleep+0x311/frame 0xc72b89c0
M> taskqueue_drain(c7775c80,c78e00b0,c81b7960,c72b8a48,c0d0f121,...) at taskqueue_drain+0x1a5/frame 0xc72b89fc
M> ieee80211_waitfor_parent(c78e0014,0,0,0,0,...) at ieee80211_waitfor_parent+0x30/frame 0xc72b8a10
M> ieee80211_ioctl(c7879400,80206910,c72b8b78,c72b8a78,c0b9515c,...) at ieee80211_ioctl+0x391/frame 0xc72b8a48
M> ifioctl(c88fe720,80206910,c72b8b78,c81b7960,10000000,...) at ifioctl+0x144a/frame 0xc72b8ad4
M> soo_ioctl(c8664700,80206910,c72b8b78,c76ee900,c81b7960,...) at soo_ioctl+0x25d/frame 0xc72b8b08
M> kern_ioctl(c81b7960,3,80206910,c72b8b78,10,...) at kern_ioctl+0x31d/frame 0xc72b8b50
M> sys_ioctl(c81b7960,c72b8ca8,28ce9000,283f8f12,c77189c0,...) at sys_ioctl+0x11b/frame 0xc72b8c10
M> syscall(c72b8ce8) at syscall+0x5e0/frame 0xc72b8cdc
M> Xint0x80_syscall() at Xint0x80_syscall+0x21/frame 0xc72b8cdc
M> --- syscall (54, FreeBSD ELF32, sys_ioctl), eip = 0x284a1d4f, esp = 0xbfbfec3c, ebp = 0xbfbfec98 ---
M>
M> But i guess that might be another iwi bug that got uncovered now and
M> is not related to the conversion.

Since, ieee80211_waitfor_parent() waits for 6 different taskqueues, I need to
determine which one is the bad.

Since you are running i386, and right now I don't have crossdebugger, it would
be easier to ask you, rather than check this out myself :)

Can you please run 'kgdb /boot/kernel/kernel', and there in the kgdb prompt
the following:

(kgdb) set $ic = (struct ieee80211com *)0
(kgdb) p &$ic->ic_parent_task
(kgdb) p &$ic->ic_mcast_task
(kgdb) p &$ic->ic_promisc_task
(kgdb) p &$ic->ic_chan_task
(kgdb) p &$ic->ic_bmiss_task
(kgdb) p &$ic->ic_chw_task
--
Totus tuus, Glebius.
Gleb Smirnoff
2015-06-04 18:21:06 UTC
Permalink
On Wed, Jun 03, 2015 at 09:51:56PM +0200, Michael Moll wrote:
M> All working well, the only thing I'm seeing is that a shutdown or reboot
M> is hanging, tracing via kdb shows:

I've uploaded updated patch that should fix this issue. Please try it
and report once you have time.

Thanks a lot!
--
Totus tuus, Glebius.
Michael Moll
2015-06-05 00:34:25 UTC
Permalink
Post by Gleb Smirnoff
I've uploaded updated patch that should fix this issue. Please try it
and report once you have time.
With this version of the patch everything is working as expected again,
thanks for your efforts.

Regards
--
Michael Moll
Continue reading on narkive:
Loading...