if_ioctl的锁问题?
今天尝试了一下触发zonelim的方法,不过zonelim没搞出来,却发现了另一个问题——如果并发执行ifconfig配置同一块网卡,似乎有由于欠锁导致的断言失败。打算找时间研究一下。
共 5 篇文章。
今天尝试了一下触发zonelim的方法,不过zonelim没搞出来,却发现了另一个问题——如果并发执行ifconfig配置同一块网卡,似乎有由于欠锁导致的断言失败。打算找时间研究一下。
You can obtain latest list from sys/sys/proc.h:
| |
I have enabled PREEMPTION, FULL_PREEMPTION with ULE. Now I get strange result here:
It seems that ts->ts_lockobj was touched by sched_lend_prio, for unknown reasons. Maybe there is some lock releases?
What’are LORs? To quote Robert Watson:
“These warnings are generated by Witness, a run-time lock diagnostic system found in FreeBSD 5-CURRENT kernels (but removed in releases). You can read more about Witness in the WITNESS(4) man page, which talks about its capabilities. Among other things, Witness performs run-time lock order verification using a combination of hard coded lock orders, and run-time detected lock orders, and generates console warnings when lock orders are violated. The intent of this is to detect the potential for deadlocks due to lock order violations; it’s worth observing that Witness is actually slightly conservative, and so it’s possible to get false positives. In the event that Witness is accurately reporting a lock order problem, it’s basically saying “If you were unlucky, a deadlock would have happened here”. There are a couple of “well known” false positives, which we need to do a better job of documenting to prevent spurious reports. The non-well-known ones typically correspond to bugs in newly added locking, as lock order reversals usually get fixed pretty quickly because Witness is busy generating warnings :-).”
The SMP case seems to have something wrong with it. My MARCH=p4 and -O optimized kernel often crashes when shutting down on beastieng.frontfree.net. Apparantly this is lock related (we can see the panic strings there not to be outputing atomically, and they just mixed with each other).