Solving the « panic: resource_list_release: can’t find resource » kernel crash on FreeNAS after inserting an unsupported transceiver in an Intel 10G adapter

Crashed…

Sometimes FreeBSD/FreeNAS has a weird crash which should not happen. I had to connect a server to a 10G switch and I didn’t have any DAC cables left. The only thing available was a couple of Cisco coded SFP+.

After turning on the server (which was working fine until then), a kernel crash happens:

panic: resource_list_release: can't find resource

It took some time to understand that this was actually related to the line just before:

ix2: Unsupported SFP+ module detected!

OK indeed, I do have an unsupported SFP+ module in the card. Is it really enough to make the kernel panic during boot?

So I restarted and set an option in grub to prevent the ix driver from loading. The boot finishes successfully. But without any network since I didn’t load the Intel driver…

After some research, I found this page https://forums.freenas.org/index.php?threads/intel-520-10-gig-and-usupported-sfp-on-9-3.26286/

Let’s try it. A little « e » in grub and adding kFreeBSD.hw.ixgbe.unsupported_sfp= »1″ there, then booting. Crashed again…

And again the message about the unsupported transceiver… as if the line didn’t change anything. What better place to find answers than the source code of the driver?

$ grep -n -r unsup *
if_ix.c:344: * of unsupported SFP+ modules, note that
if_ix.c:347:static int allow_unsupported_sfp = FALSE;
src/if_ix.c:348:TUNABLE_INT("hw.ix.unsupported_sfp", &allow_unsupported_sfp);

The answer comes very quickly. The correct tunable is hw.ix.unsupported_sfp and not hw.ixgbe.unsupported_sfp! Not saying the author of the post on the forum is not correct, it probably changed between versions…

Last step, need to make it persistent. FreeNAS stores the configuration in various places so the best is to use the GUI:

One little reboot, et voilà! Everything is back in order.