tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ipfilter causes panic when setting tcp_idle_timeout



> Stopped in pid 323.323 (ipf) at netbsd:mutex_vector_enter+0x82: movq    0(%r12), %rax
I think that's mutex_oncpu(owner) (inlined) which claims dereferencing 
MUTEX_OWNER(owner) is safe for reasons I don't understand.
[...]
> mutex_vector_enter() at netbsd:mutex_vector_enter+0x82
> ipf_settimeout_tcp() at netbsd:ipf_settimeout_tcp+0x60
> ipf_settimeout() at netbsd:ipf_settimeout+0x1c
> ipf_ipftune() at netbsd:ipf_ipftune+0x3ef
[...]
> rdi         ffffbf8007b8e3e8
That's the mtx argument to mutex_vector_enter()
[...]
That's mtx's owner field
> r14         fffffffffffffff0
That's MUTEX_THREAD, so it looks like the mutex has been mutex_destroy()ed

So to me it looks like the IPF_TCPS_ESTABLISHED entry of IPFilter's 
softs->ipf_state_tcptq timeout tail queue (ipftq_t) had it's ifq_lock 
(which is initialized by ipf_sttab_init() calling IPFTQT_INIT(), which 
calls (IPFilter's) MUTEX_INIT(), which is NetBSD's mutex_init()) 
somehow mutex_destroy()ed.

I fail to see how that can happen.

You may try to verify my analysis on a crash dump.


Home | Main Index | Thread Index | Old Index