Wasting time for fun and profit
I just spent a total of about two days bisecting the FreeBSD kernel to find the cause of a particular panic I’d been getting while booting on a Jetway NF9HG Mini-ITX mainboard.
Of course, -CURRENT being what is, some revisions between the branch point and releng/12.0 aren’t exactly amenable to compilation, and where they are, other bugs like to hide the behavior I’m looking for.
(Having to react to “fatal trap 12” with git bisect good
is also
somewhat unnatural, but that’s not what I was looking for, after all.)
Anyway, at some point during my travails, I became aware of a
particular kernel tunable, introduced to prevent trouble with
something called “EFI runtime services”. The name of the thing was
efi.rt_disabled
. I put it into loader.conf
and happily kept
bisecting. It even worked, preventing some crashes on kernels that had
not previously booted.
Then things became confusing. The problem appeared to be fluctuating; rather than the “trap 12” on earlier revisions and the panic on later ones the two seemed intermixed somehow.
End of day 1.
On day 2, being the present day, I started over from the beginning, and the results made sense again. At first anyway. I had forgotten about the tunable, which turned out to have been a very good thing.
Five hours into bisecting, I had just arrived at the very last commit
to test, the commit message reminded me, and I looked in UPDATING
again to refresh my memory.
Then my eyes went wide … where did that dot come from … no, they didn’t … did they?
Yes, they did. Back in July, someone
renamed
the tunable, replacing the underscore with a second period; what had
been efi.rt_disabled
now became efi.rt.disabled
. When I first
found it in UPDATING
I must have been on a commit before this
change. Later on, I obviously had no reason to recheck the spelling.
Anyway, setting the correctly spelled tunable fixed the panic.