話說我家美人機到了之後總是會亂 panic 及亂七八糟的事情,在這一篇有稍微提到我後來換 ipnat 之後改善很多,不過偶爾還是會從網路上消失。後來大概在五月中的時候, 看到 mailing list 有人疑似有類似的情形,環境也是 smp ,後來過了不久某篇裡面談到:
This is very similar to the UID/GID filtering problem. What appears to
be happening is on the inbound path, we pickup the pfil lock and attempt
to pickup the inp info lock, while on the outbound path, we hold the inp
info lock across ip_output which will try to pickup the pfil lock.
This problem is the result of a layering violation, in reality the
firewall should not be picking up layer 4 related locks. Myself and a
few others have been discussing this problem for quite some time now,
and hopefully it won't be long before we can come up with a solution
that will make everyone happy.
For now, you should be able to set debug.mpsafenet to 0 which will
re-enable Giant in the network stack, in theory preventing the deadlock.
debug.mpsafenet=0
in your loader.conf
Let me know if this helps
於是乎,測試了一下,把腳踏車鎖關掉,開機會看到:「WARNING: MPSAFE network stack disabled, expect reduced performance.」
Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 6.1-STABLE #3: Wed May 17 22:41:10 CST 2006
cookys@ddbeauty.iecs.us:/usr/obj/usr/src/sys/DDBEAUTY
WARNING: MPSAFE network stack disabled, expect reduced performance.
ACPI APIC Table: <GBT AWRDACPI>
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) D CPU 2.66GHz (3340.93-MHz K8-class CPU)
Origin = "GenuineIntel" Id = 0xf47 Stepping = 7
然後「感覺上」pf 好像反應比 ipnat 好,不過可能是錯覺 XD。雖然說腳踏車鎖一次就會綁一大堆,不過在會亂 dead lock 的狀況下也只能先打開撐著,看什麼時候他們解決 XD。至少跑到現在,兩個禮拜多都沒消失了,除了前一個禮拜被學校裝笑為把她 halt 等停電以外 :p
這時候該高呼,"捷安特鎖"我愛你嗎?(我沒有打廣告喔 @_@)